Changes

Jump to: navigation, search

Mobile/GeckoView

80 bytes added, 19:29, 22 March 2018
Using GeckoView
== Using GeckoView ==
# Download a recent GeckoView AAR from treeherder (Add Nightly taskcluster repo to your build.gradle <pre>repositories { maven { url 'https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central tree). The AAR is available from the 'Android API16+ Gradle opt' job under the 'Bng' symbol. After clicking that, there is a link to 'geckoview-0nightly.0latest.1mobile.aarandroid-api-16-opt/artifacts/public/android/maven' in the bottom pane. }}</pre> # Add the GeckoView AAR geckoview to your Gradle / Android Studio projectdependencies Again, in build. In Android Studio you can add the gradle <pre>dependencies { compile 'org.aar as followsmozilla:## Move the geckoview aar to your project-nightly-armeabi-v7a:+'s 'app}</libs' folder.pre> ## Use This will always use the 'New Module' option under latest Nightly in the 'File' menurepository.## Import As GeckoView development continues, we will have Beta and Release repositories that have the expected version names (61.aar file0.0, etc).  ## Add the new Using GeckoView AAR module as a dependency to the application.
You can now use GeckoView your app by including the following in a layout XML file:
<pre>
onCreate(...) { // Find the GeckoView in our layout GeckoView geckoView = (GeckoView) findViewById(R.id.geckoview);
// Attach the GeckoView to a new GeckoSession GeckoSession session = new GeckoSession(); geckoView.setSession(session);
// Load a URL session.loadUri("http://mozilla.com");}
</pre>
Confirm
414
edits

Navigation menu