Android Question is it possible to use GeckoView ?

Johan Schoeman

Expert
Licensed User
Longtime User
hi all
i have some webpages that need to run on firefox
is it possible to use GeckoView in B4A ?

https://wiki.mozilla.org/Mobile/GeckoView
I have been busy since this morning trying to wrap this. I have managed to get the library to compile (after a long search to find GeckoView.java that contains all the necessary methods). But now the B4A project crashes:
B4X:
LogCat connected to: 24be32de
--------- beginning of /dev/log/system--------- beginning of /dev/log/main~i:** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
java.lang.Exception: Error loading sqlite libraries
    at org.mozilla.gecko.mozglue.GeckoLoader.loadSQLiteLibsNative(Native Method)
    at org.mozilla.gecko.mozglue.GeckoLoader.loadSQLiteLibs(GeckoLoader.java:243)
    at org.mozilla.gecko.GeckoThread.initGeckoEnvironment(GeckoThread.java:114)
    at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:167)

No idea how to solve it. So, I downloaded and installed GeckoBrowser.apk from here http://people.mozilla.org/~mfinkle/geckoview/ but it also crashes. I found the link on this website http://starkravingfinkle.org/blog/2013/10/geckoview-embedding-gecko-in-your-android-application/ which seems to be from the same author of the project that I am trying to wrap.

Anyone with any ideas how to solve this problem? All the .so files are in the lib that I have built.

The same problem is also reported here https://bugzilla.mozilla.org/show_bug.cgi?id=1093645
 
Upvote 0

Devv

Active Member
Licensed User
Longtime User


i really have no idea about your problem , but im glad there is a progress
 
Upvote 0

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Almost the same .
I spent many hours trying to find a version with getCurrentBrowser method so it can compile then I got stuck at
B4X:
Load sqlite start
Couldn't get a handle to libnss3!
Throw
Load sqlite done
>>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 6519 ("Gecko")
java.lang.Exception: Error loading sqlite libraries
    at org.mozilla.gecko.mozglue.GeckoLoader.loadSQLiteLibsNative(Native Method)
    at org.mozilla.gecko.mozglue.GeckoLoader.loadSQLiteLibs(GeckoLoader.java:250)
    at org.mozilla.gecko.GeckoThread.initGeckoEnvironment(GeckoThread.java:114)
    at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:165)
Main thread (1) stack:
    android.os.BinderProxy.transactNative(Native Method)
    android.os.BinderProxy.transact(Binder.java:496)
    com.android.internal.view.IInputMethodManager$Stub$Proxy.windowGainedFocus(IInputMethodManager.java:730)
    android.view.inputmethod.InputMethodManager.startInputInner(InputMethodManager.java:1230)
    android.view.inputmethod.InputMethodManager.onWindowFocus(InputMethodManager.java:1447)
    android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3423)
    android.os.Handler.dispatchMessage(Handler.java:102)
    android.os.Looper.loop(Looper.java:135)
    android.app.ActivityThread.main(ActivityThread.java:5595)
    java.lang.reflect.Method.invoke(Native Method)
    java.lang.reflect.Method.invoke(Method.java:372)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Error getting package info
android.content.pm.PackageManager$NameNotFoundException: org.mozilla.fennec
    at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:123)
    at org.mozilla.gecko.CrashHandler.getCrashExtras(CrashHandler.java:234)
    at org.mozilla.gecko.GeckoAppShell$1.getCrashExtras(GeckoAppShell.java:143)
    at org.mozilla.gecko.CrashHandler.reportException(CrashHandler.java:377)
    at org.mozilla.gecko.GeckoAppShell$1.reportException(GeckoAppShell.java:187)
    at org.mozilla.gecko.CrashHandler.uncaughtException(CrashHandler.java:428)
    at org.mozilla.gecko.GeckoAppShell$1.uncaughtException(GeckoAppShell.java:162)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)

But for me I found a .jar not .java .
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
Also using the jars from here http://people.mozilla.org/~mfinkle/geckoview/. I had the same problem to try and solve getCurrentBrowser until I found the right jar that contains GeckoView with all the required methods. But now I am stuck....
 
Upvote 0

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…