Mobile/GeckoView

From MozillaWiki
Jump to: navigation, search

What is GeckoView

GeckoView is an Android library project that allows third-party developers to use Gecko as an Android View in their own applications. GeckoView is similar to Android's built in WebView, but it is not a drop in replacement for WebView.

Note that GeckoView is NOT ready to be used in a production environment. It is currently possible to load pages and do some basic stuff, but features are limited.

Current API documentation can be viewed here: https://mozilla.github.io/geckoview/javadoc/mozilla-central/

Using GeckoView

Add Nightly taskcluster repo to your build.gradle

repositories {
    maven {
       url 'https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.nightly.latest.mobile.android-api-16-opt/artifacts/public/android/maven'
    }
}

Add geckoview to dependencies

Again, in build.gradle

dependencies {
    compile 'org.mozilla:geckoview-nightly-armeabi-v7a:+'
}

This will always use the latest Nightly in the repository. As GeckoView development continues, we will have Beta and Release repositories that have the expected version names (61.0.0, etc).


Loading a page in GeckoView

You can now use GeckoView your app by including the following in a layout XML file:

<org.mozilla.gecko.GeckoView
  android:id="@+id/geckoview"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content" />

You can then load a page in your Activity with:

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");
}

Example App

Firefox Focus has a build variant that uses Gecko. To build, check out the Focus code from https://github.com/mozilla-mobile/focus-android and follow the instructions. The only difference is you need to select one of the Gecko build variants from the Android Studio 'Build' menu.

The Gecko-related code for Focus lives in WebViewProvider.java

Bugs

Klar Blockers

P1 GeckoView bugs:

Full Query
ID Priority Summary Whiteboard Assigned to
1441059 P1 onLoadRequest can change the order of loads [geckoview:fenix] Dylan Roeh (:droeh)
1442176 P1 GeckoView: Do not scroll while moving text selection handles [geckoview:klar] James Willcox (:snorp) (jwillcox@mozilla.com)
1447850 P1 Move Gamepad support from GeckoView to GeckoSession. [geckoview:crow] Randall Barker [:rbarker]
1457231 P1 Crash reporting not working in child process James Willcox (:snorp) (jwillcox@mozilla.com)
1462714 P1 Klar+GV does not support Service Workers [geckoview:klar] Kevin Brosnan [:kbrosnan]
1462715 P1 Klar+GV does not support storing Blob or ArrayBuffer objects in IndexedDB [geckoview:crow] Kevin Brosnan [:kbrosnan]
1463484 P1 Find in Page API [geckoview:fenix][geckoview:klar] Jim Chen [:jchen] [:darchons]
1463565 P1 Focus/GeckoView crash loading noizz.de Eugen Sawin [:esawin]
1463772 P1 Move tracking protection blocklist selection to GeckoRuntimeSettings Eugen Sawin [:esawin]
1464096 P1 SessionTextInput.Delegate showKeyboard and hideKeyboard appear to be fired inconsistently. [geckoview:fxr] Jim Chen [:jchen] [:darchons]

10 Total; 10 Open (100%); 0 Resolved (0%); 0 Verified (0%);


[geckoview:klar:p1] non-GeckoView bugs:

Full Query
ID Priority Summary Whiteboard Assigned to
751769 P1 [AccessFu] attaching AccessFu to more than one window raises havoc [geckoview:klar:p1] Eitan Isaacson [:eeejay]
1454606 P1 Preserve the semantics of scalar operations when restoring the persisted state [geckoview:klar:p1] Jan-Erik Rediger [:janerik]

2 Total; 2 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Klar Blockers: Unassigned

Unassigned P1 GeckoView bugs:

Full Query
ID Priority Summary Whiteboard Assigned to
1454474 P1 Nimbledroid page load performance difference between Webview and Geckoview
1454477 P1 Investigate progressbar behavior difference between geckoview and webview
1463904 P1 Video playback on Oculus Go consumes more CPU than expected [geckoview:fxr]

3 Total; 3 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Unassigned [geckoview:klar:p1] non-GeckoView bugs:

Full Query
ID Priority Summary Whiteboard Assigned to
1459037 P1 Break out Disconnect category into its own blocklist [geckoview:klar:p1]
1460206 P1 Enable Chrome fling physics on Android by default (and ride the trains) [geckoview:fenix] [geckoview:klar:p1]
1454902 P3 Verify GeckoView Telemetry [geckoview:klar:p1]
1457388 P3 Telemetry QA coverage for the GeckoView consumer application [geckoview:klar:p1]

4 Total; 4 Open (100%); 0 Resolved (0%); 0 Verified (0%);


GeckoView Triage Bugs

Unprioritized GeckoView bugs:

Full Query
ID Priority Summary Whiteboard Assigned to
1463913 -- API for location of cursor on screen. [geckoview:fxr]

1 Total; 1 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Unprioritized [geckoview:klar] non-GeckoView bugs:

No results.

0 Total; 0 Open (0%); 0 Resolved (0%); 0 Verified (0%);


Klar Backlog

P2 GeckoView bugs:

Full Query
ID Priority Summary Whiteboard Assigned to
1291380 P2 [geckoview] Document and improve Gecko logging controls in GeckoView
1314759 P2 Stop building and packaging libplugin-container.so in Fennec APK
1316241 P2 [geckoview] Make WebRTC work with GeckoView [geckoview:crow][geckoview:klar]
1317200 P2 [geckoview] Audit and minimize GeckoView dependencies
1322580 P2 [geckoview] Consider using Web Extensions to allow content script access
1350924 P2 [geckoview] Fix content process shutdown Eugen Sawin [:esawin]
1398067 P2 Fully support context menu and "tab" related functionality in GeckoView-based custom tabs/web apps [pwa-front-end]
1405081 P2 [geckoview] Add high-level fetch API
1415318 P2 Enable GeckoView to send console.log to logcat Randall Barker [:rbarker]
1436754 P2 Remove LayerSession Jim Chen [:jchen] [:darchons]
1440904 P2 Crash in java.lang.NullPointerException: NativeException NullHandle() [T = nsWindow::NPZCSupport] at org.mozilla.gecko.gfx.NativePanZoomController.handleMotionEvent(Native Method)
1444135 P2 Figure out downloadable content in GeckoView
1444215 P2 GeckoSessionTestRule.synthesizeTap doesn't seem to work under e10s
1445285 P2 Animating GeckoView [geckoview:klar]
1447406 P2 Eliminate initial navigation to about:blank
1448056 P2 Put BasicPromptDelegate in GeckoView AAR [geckoview:klar] James Willcox (:snorp) (jwillcox@mozilla.com)
1449058 P2 When GeckoView loses focus it should ensure Gecko input fields no longer have focus. Randall Barker [:rbarker]
1451476 P2 Add a page load error API to GeckoView [geckoview:klar]
1454444 P2 New method request to get the user agent
1454722 P2 Add about:geckoview or about:gecko
1454752 P2 GeckoView memory pressure handling
1455740 P2 Make GeckoView example app more useful James Willcox (:snorp) (jwillcox@mozilla.com)
1457596 P2 Eliminate unnecessary GeckoView:SaveState messages and clean up orphaned callbacks in saveState implementation Dylan Roeh (:droeh)
1458073 P2 Nimbledroid's abcnews.go.com page load test is 2x slower in GeckoView than WebView [geckoview:klar]
1458076 P2 Nimbledroid's buzzfeed.com page load test is 2x slower in GeckoView than WebView [geckoview:klar] [qf:investigate]
1458079 P2 Nimbledroid's wikia.com page load test is 2x slower in GeckoView than WebView [geckoview:klar]
1458668 P2 Create change log for public API James Willcox (:snorp) (jwillcox@mozilla.com)
1461961 P2 Support Android Autofill API in GeckoView [geckoview:fenix][geckoview:klar]
1462019 P2 Developer tools are unable to attach to applications with embedded GeckoView [geckoview:fxr] Makoto Kato [:m_kato]
1463576 P2 Write tests for SelectionActionDelegate Jim Chen [:jchen] [:darchons]
1463878 P2 Reconsider a synchronous saveState API for GeckoView Dylan Roeh (:droeh)

31 Total; 31 Open (100%); 0 Resolved (0%); 0 Verified (0%);


[geckoview:klar:p2] non-GeckoView bugs:

Full Query
ID Priority Summary Whiteboard Assigned to
1453691 P1 Create a system addon for overriding Fennec UA string for Google and Facebook properties [webcompat] [geckoview:klar:p2] twisniewski
1457382 P2 Tweak the persistence timer for GeckoView [geckoview:klar:p2]
1461965 P2 Investigate enabling xpcshell tests for GV telemetry code [geckoview:klar:p2]
1433198 P2 Publish GeckoView Maven repo on Bintray/JCenter [geckoview:klar:p2][releng:q22018] Chris AtLee [:catlee]
1454918 P2 JIT test suite failures on Android [geckoview:klar:p2]
1309021 P3 Cancel flywheel if the user scrolls slowly between the two fast flings [gfx-noted][geckoview:klar:p2]
1457586 P3 Fennec's initial fling velocity is lower than in Chrome, even when using Chrome's fling physics [geckoview:klar:p2][gfx-noted]

7 Total; 7 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Crow Bugs

  • All [geckoview:crow] and [geckoview:fxr] bugs:
Full Query
ID Priority Summary Whiteboard Assigned to
1463913 -- API for location of cursor on screen. [geckoview:fxr]
1463904 P1 Video playback on Oculus Go consumes more CPU than expected [geckoview:fxr]
1464096 P1 SessionTextInput.Delegate showKeyboard and hideKeyboard appear to be fired inconsistently. [geckoview:fxr] Jim Chen [:jchen] [:darchons]
1447850 P1 Move Gamepad support from GeckoView to GeckoSession. [geckoview:crow] Randall Barker [:rbarker]
1462715 P1 Klar+GV does not support storing Blob or ArrayBuffer objects in IndexedDB [geckoview:crow] Kevin Brosnan [:kbrosnan]
1441473 P1 ARM64 mmap loop is slow and will defeat ASLR [geckoview:crow]
1316241 P2 [geckoview] Make WebRTC work with GeckoView [geckoview:crow][geckoview:klar]
1462019 P2 Developer tools are unable to attach to applications with embedded GeckoView [geckoview:fxr] Makoto Kato [:m_kato]
1439570 P3 Run JS test suite on ARM64 hardware [geckoview:crow]
1446819 P3 Crash [@ mozalloc_abort] with UNIMPLEMENTED abort message and Debugger [jsbugmon:update,bisect][fuzzblocker][geckoview:crow]
1458662 P3 Re-enable ARM64 regex JIT [geckoview:crow:p2]
1437547 P3 Bring back Fennec's error pages for GeckoView in apps that don't show their own error pages [geckoview:crow] James Willcox (:snorp) (jwillcox@mozilla.com)
1446898 P3 [meta] ARM64 JS baseline failures [geckoview:crow]
1451720 P3 MaybeEnterJIT SIGSEGV crashes on Android/ARM64 (occasional) [geckoview:crow]

14 Total; 14 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Other Bug Queries