Hybrid app crashes when in landscape mode - android

This is funny... I've written hybrid apps earlier which don't crash when mobiles are in landscape mode.
I wrote a sample hybrid app that uses phonegap, cordova, HTML, Bootstrap, css, js to explain to a junior. I took this link for explaining to my junior.
The only change that I did was in HTML file was:
<!DOCTYPE HTML>
<html>
<head>
<title>Bootstrap Form</title>
<link rel="stylesheet" type="text/css" href="support/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" charset="utf-8" src="js/cordova-2.7.0.js"></script>
<script type="text/javascript" charset="utf-8" src="support/bootstrap/scripts/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="support/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<h1>Hello Form</h1>
<div class="container">
<div class="row">
<div class="col-sm-12">
<form role="form">
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</div>
</div>
</body>
</html>
It works perfectly in portrait mode, but crashes when mobiles are put to landscape mode. Is preferences for orientation missing from androidmanifest.xml? How can I fix this?
logcat:
08-17 03:35:44.856: I/CordovaLog(12233): Changing log level to DEBUG(3)
08-17 03:35:44.856: D/CordovaActivity(12233): CordovaActivity.onCreate()
08-17 03:35:44.956: I/WebViewFactory(12233): Loading com.google.android.webview version 44.0.2403.90 (code 240309050)
08-17 03:35:45.016: I/LibraryLoader(12233): Time to load native libraries: 2 ms (timestamps 5548-5550)
08-17 03:35:45.016: I/LibraryLoader(12233): Expected native library version number "",actual native library version number ""
08-17 03:35:45.026: V/WebViewChromiumFactoryProvider(12233): Binding Chromium to main looper Looper (main, tid 1) {2a10f43e}
08-17 03:35:45.026: I/LibraryLoader(12233): Expected native library version number "",actual native library version number ""
08-17 03:35:45.026: I/chromium(12233): [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0
08-17 03:35:45.036: I/BrowserStartupController(12233): Initializing chromium process, singleProcess=true
08-17 03:35:45.036: W/art(12233): Attempt to remove local handle scope entry from IRT, ignoring
08-17 03:35:45.036: E/SysUtils(12233): ApplicationContext is null in ApplicationStatus
08-17 03:35:45.056: W/chromium(12233): [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
08-17 03:35:45.056: E/libEGL(12233): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
08-17 03:35:45.056: E/libEGL(12233): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
08-17 03:35:45.066: I/Adreno-EGL(12233): <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: LNXBUILD_AU_LINUX_ANDROID_LA.BR.1.1.2_RB2.05.00.02.045.011+PATCH[ES]_msm8916_64_refs/tags/AU_LINUX_ANDROID_LA.BR.1.1.2_RB2.05.00.02.045.011__release_ENGG (I5c5bbe66dc)
08-17 03:35:45.066: I/Adreno-EGL(12233): OpenGL ES Shader Compiler Version: E031.25.03.01
08-17 03:35:45.066: I/Adreno-EGL(12233): Build Date: 02/10/15 Tue
08-17 03:35:45.066: I/Adreno-EGL(12233): Local Branch:
08-17 03:35:45.066: I/Adreno-EGL(12233): Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.BR.1.1.2_RB2.05.00.02.045.011
08-17 03:35:45.066: I/Adreno-EGL(12233): Local Patches: 3664e49f034d0377f8c106f6aeb4ff30255be59c rb: Enable the multithreading texture upload for all A4xx chipsets
08-17 03:35:45.066: I/Adreno-EGL(12233): Reconstruct Branch: LOCAL_PATCH[
08-17 03:35:45.106: W/AudioManagerAndroid(12233): Requires BLUETOOTH permission
08-17 03:35:45.156: W/art(12233): Attempt to remove local handle scope entry from IRT, ignoring
08-17 03:35:45.176: W/AwContents(12233): onDetachedFromWindow called when already detached. Ignoring
08-17 03:35:45.176: D/EgretLoader(12233): EgretLoader(Context context)
08-17 03:35:45.196: D/EgretLoader(12233): The context is not activity
08-17 03:35:45.206: D/CordovaWebView(12233): CordovaWebView is running on device made by: Xiaomi
08-17 03:35:45.216: D/JsMessageQueue(12233): Set native->JS mode to 2
08-17 03:35:45.226: W/art(12233): Attempt to remove local handle scope entry from IRT, ignoring
08-17 03:35:45.226: W/art(12233): Attempt to remove local handle scope entry from IRT, ignoring
08-17 03:35:45.226: D/CordovaActivity(12233): CordovaActivity.init()
08-17 03:35:45.236: D/CordovaWebView(12233): >>> loadUrl(file:///android_asset/www/index.html)
08-17 03:35:45.236: D/PluginManager(12233): init()
08-17 03:35:45.236: D/CordovaWebView(12233): >>> loadUrlNow()
08-17 03:35:45.406: D/Config(12233): Unlimited access to network resources
08-17 03:35:45.406: I/CordovaLog(12233): Found start page location: index.html
08-17 03:35:45.406: I/CordovaLog(12233): Changing log level to DEBUG(3)
08-17 03:35:45.406: D/CordovaActivity(12233): Resuming the App
08-17 03:35:45.406: D/CordovaActivity(12233): CB-3064: The errorUrl is null
08-17 03:35:45.406: D/OpenGLRenderer(12233): Render dirty regions requested: true
08-17 03:35:45.416: D/CordovaActivity(12233): Paused the application!
08-17 03:35:45.416: D/CordovaWebView(12233): Handle the pause
08-17 03:35:45.416: W/chromium(12233): [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
08-17 03:35:45.436: D/SoftKeyboardDetect(12233): Ignore this event
08-17 03:35:45.466: I/OpenGLRenderer(12233): Initialized EGL, version 1.4
08-17 03:35:45.466: D/OpenGLRenderer(12233): Enabling debug mode 0
08-17 03:35:45.496: I/qdutils(12233): PartialUpdate status: Disabled
08-17 03:35:45.496: I/qdutils(12233): Left Align: 0
08-17 03:35:45.496: I/qdutils(12233): Width Align: 0
08-17 03:35:45.496: I/qdutils(12233): Top Align: 0
08-17 03:35:45.496: I/qdutils(12233): Height Align: 0
08-17 03:35:45.496: I/qdutils(12233): Min ROI Width: 0
08-17 03:35:45.496: I/qdutils(12233): Min ROI Height: 0
08-17 03:35:45.496: I/qdutils(12233): Needs ROI Merge: 0
08-17 03:35:45.496: I/qdutils(12233): Dynamic Fps: Enabled
08-17 03:35:45.496: I/qdutils(12233): Min Panel fps: 45
08-17 03:35:45.496: I/qdutils(12233): Max Panel fps: 60
08-17 03:35:45.506: D/SoftKeyboardDetect(12233): Ignore this event
08-17 03:35:45.546: D/SoftKeyboardDetect(12233): Ignore this event
08-17 03:35:45.546: I/Timeline(12233): Timeline: Activity_idle id: android.os.BinderProxy#2a6da025 time:12466089
08-17 03:35:45.566: D/CordovaActivity(12233): onMessage(onPageStarted,file:///android_asset/www/index.html)
08-17 03:35:45.596: D/CordovaLog(12233): : Line 1 : exception firing pause event from native
08-17 03:35:45.596: I/chromium(12233): [INFO:CONSOLE(1)] "exception firing pause event from native", source: (1)
08-17 03:35:45.636: W/BindingManager(12233): Cannot call determinedVisibility() - never saw a connection for the pid: 12233
08-17 03:35:45.776: E/AndroidProtocolHandler(12233): Unable to open asset URL: file:///android_asset/www/cordova_plugins.json
08-17 03:35:46.326: D/CordovaWebViewClient(12233): onPageFinished(file:///android_asset/www/index.html)
08-17 03:35:46.326: D/CordovaActivity(12233): onMessage(onPageFinished,file:///android_asset/www/index.html)
08-17 03:35:46.446: D/CordovaNetworkManager(12233): Connection Type: wifi
08-17 03:35:46.446: D/CordovaActivity(12233): onMessage(networkconnection,wifi)
08-17 03:35:46.446: D/CordovaNetworkManager(12233): Connection Type: wifi
08-17 03:35:46.456: D/CordovaActivity(12233): onMessage(spinner,stop)
08-17 03:35:48.326: D/CordovaActivity(12233): onMessage(spinner,stop)
08-17 03:35:52.816: D/SoftKeyboardDetect(12233): Ignore this event
08-17 03:35:58.286: D/Config(12233): Unlimited access to network resources
08-17 03:35:58.286: I/CordovaLog(12233): Found start page location: index.html
08-17 03:35:58.286: I/CordovaLog(12233): Changing log level to DEBUG(3)
08-17 03:35:58.286: D/CordovaActivity(12233): Resuming the App
08-17 03:35:58.286: D/CordovaActivity(12233): CB-3064: The errorUrl is null
08-17 03:35:58.296: I/Timeline(12233): Timeline: Activity_idle id: android.os.BinderProxy#2a6da025 time:12478836
08-17 03:36:08.666: D/CordovaActivity(12233): Paused the application!
08-17 03:36:08.666: D/CordovaWebView(12233): Handle the pause
08-17 03:36:08.666: D/CordovaActivity(12233): CordovaActivity.onDestroy()
08-17 03:36:08.666: D/CordovaWebView(12233): >>> loadUrlNow()
08-17 03:36:08.786: D/Config(12233): Unlimited access to network resources
08-17 03:36:08.786: I/CordovaLog(12233): Found start page location: index.html
08-17 03:36:08.796: I/CordovaLog(12233): Changing log level to DEBUG(3)
08-17 03:36:08.796: D/CordovaActivity(12233): CordovaActivity.onCreate()
08-17 03:36:08.816: W/art(12233): Attempt to remove local handle scope entry from IRT, ignoring
08-17 03:36:08.826: W/AwContents(12233): onDetachedFromWindow called when already detached. Ignoring
08-17 03:36:08.826: D/EgretLoader(12233): EgretLoader(Context context)
08-17 03:36:08.826: D/EgretLoader(12233): The context is not activity
08-17 03:36:08.836: D/CordovaWebView(12233): CordovaWebView is running on device made by: Xiaomi
08-17 03:36:08.846: D/JsMessageQueue(12233): Set native->JS mode to 2
08-17 03:36:08.846: W/art(12233): Attempt to remove local handle scope entry from IRT, ignoring
08-17 03:36:08.846: W/art(12233): Attempt to remove local handle scope entry from IRT, ignoring
08-17 03:36:08.846: D/CordovaActivity(12233): CordovaActivity.init()
08-17 03:36:08.856: D/CordovaWebView(12233): >>> loadUrl(file:///android_asset/www/index.html)
08-17 03:36:08.856: D/PluginManager(12233): init()
08-17 03:36:08.856: D/CordovaWebView(12233): >>> loadUrlNow()
08-17 03:36:08.876: D/Config(12233): Unlimited access to network resources
08-17 03:36:08.876: I/CordovaLog(12233): Found start page location: index.html
08-17 03:36:08.876: I/CordovaLog(12233): Changing log level to DEBUG(3)
08-17 03:36:08.876: D/CordovaActivity(12233): Resuming the App
08-17 03:36:08.876: D/CordovaActivity(12233): CB-3064: The errorUrl is null
08-17 03:36:08.916: D/SoftKeyboardDetect(12233): Ignore this event
08-17 03:36:08.956: D/SoftKeyboardDetect(12233): Ignore this event
08-17 03:36:08.956: W/BindingManager(12233): Cannot call determinedVisibility() - never saw a connection for the pid: 12233
08-17 03:36:08.966: D/CordovaWebViewClient(12233): onPageFinished(about:blank)
08-17 03:36:08.966: D/CordovaActivity(12233): onMessage(onPageFinished,about:blank)
08-17 03:36:08.966: D/CordovaActivity(12233): onMessage(exit,null)
08-17 03:36:09.006: D/CordovaActivity(12233): Paused the application!
08-17 03:36:09.006: D/CordovaWebView(12233): Handle the pause
08-17 03:36:09.086: D/SoftKeyboardDetect(12233): Ignore this event
08-17 03:36:09.116: D/CordovaActivity(12233): CordovaActivity.onDestroy()
08-17 03:36:09.116: D/CordovaWebView(12233): >>> loadUrlNow()
08-17 03:36:09.166: D/CordovaActivity(12233): onMessage(onPageStarted,file:///android_asset/www/index.html)
08-17 03:36:09.186: D/CordovaLog(12233): : Line 1 : exception firing pause event from native
08-17 03:36:09.196: I/chromium(12233): [INFO:CONSOLE(1)] "exception firing pause event from native", source: (1)
08-17 03:36:09.196: D/CordovaLog(12233): : Line 1 : exception firing destroy event from native
08-17 03:36:09.196: I/chromium(12233): [INFO:CONSOLE(1)] "exception firing destroy event from native", source: (1)
08-17 03:36:09.206: W/BindingManager(12233): Cannot call determinedVisibility() - never saw a connection for the pid: 12233
08-17 03:36:09.206: D/CordovaWebViewClient(12233): onPageFinished(file:///android_asset/www/index.html)
08-17 03:36:09.206: D/CordovaActivity(12233): onMessage(onPageFinished,file:///android_asset/www/index.html)
08-17 03:36:09.216: W/BindingManager(12233): Cannot call determinedVisibility() - never saw a connection for the pid: 12233
08-17 03:36:09.226: D/CordovaWebViewClient(12233): onPageFinished(about:blank)
08-17 03:36:09.226: D/CordovaActivity(12233): onMessage(onPageFinished,about:blank)
08-17 03:36:09.226: D/CordovaActivity(12233): onMessage(exit,null)
08-17 03:36:09.836: W/IInputConnectionWrapper(12233): showStatusIcon on inactive InputConnection
08-17 03:36:11.216: D/CordovaActivity(12233): onMessage(spinner,stop)
08-17 03:36:11.226: D/CordovaActivity(12233): onMessage(spinner,stop)

Related

How do I install a Qt app as a system app on Android?

I'm building an embedded Android device and I have a Qt/QML app I'd like to install as a system app.
However, when I attempt to launch it after moving it to /system/app or /system/priv-app, I get a popup box "Your application encountered a fatal error and cannot continue"
I tried this on the simplest QML project and as standard an emulator config as I could, and still ran into the issue
I'm doing this on Windows now as I write this question, but I also ran into the same issue trying to do it from my main Linux development machine.
Steps I followed leading up to this (some may be in a different order than they were actually performed, I'm recalling from memory after trial and error):
Install Android Studio Canary (2021.1.1 Canary 7)
Install Android 29 SDK and the x86 emulator image (Google APIs, not Google Play), create a Pixel 5 API 29 virtual device
Install Qt 5.15.2 for Android from the Qt maintenance tool / online installer
Install AdoptOpenJDK 8
Run Qt Creator, head to Tools->Options->Devices->Android, point it to the AdoptOpenJDK installation, let it set up the tools it needs, and verify everything has green checkmarks
Start a new project and select the Qt Quick "Swipe" template (bare minimum QML example), 5.15.2 for Android. Named "QMLhello" in this case.
In "Projects" tab under the "Build" settings for 5.15.2 multi-abi, expand the "qmake" section and check the "x86" checkbox so that it builds an ABI for the Android emulator
Verify that Qt Creator can build and run the app as a "normal" app (the green "Run" button successfully deploys and launches the app, and can swipe between pages)
Steps I performed in order to prepare to move the app to the system:
Add environment variable studio.emu.params to the user environment, with the contents -writable-system
Restart Android Studio and cold boot the AVD emulator to start with a writable system as specified in the environment variable
adb devices lists the emulator as a device
adb root and adb remount successfully remounts
What I tried after some rummaging around, combining some older answers on StackOverflow into my attempt:
adb shell
mv /data/app/org.qtproject.example.QMLhello-LpZtuoO0ejyQPg_I-8pWnQ==/lib/x86/* /system/lib
mv /data/app/org.qtproject.example.QMLhello-LpZtuoO0ejyQPg_I-8pWnQ== /system/app
The contents of that lib directory were:
generic_x86:/data/app/org.qtproject.example.QMLhello-LpZtuoO0ejyQPg_I-8pWnQ==/lib/x86 # ls -al
total 32892
drwxr-xr-x 2 system system 4096 2021-08-17 10:48 .
drwxr-xr-x 3 system system 4096 2021-08-17 10:48 ..
-rwxr-xr-x 1 system system 18100 1981-01-01 01:01 libQMLhello_x86.so
-rwxr-xr-x 1 system system 5885892 1981-01-01 01:01 libQt5Core_x86.so
-rwxr-xr-x 1 system system 4916776 1981-01-01 01:01 libQt5Gui_x86.so
-rwxr-xr-x 1 system system 1548420 1981-01-01 01:01 libQt5Network_x86.so
-rwxr-xr-x 1 system system 478836 1981-01-01 01:01 libQt5QmlModels_x86.so
-rwxr-xr-x 1 system system 47632 1981-01-01 01:01 libQt5QmlWorkerScript_x86.so
-rwxr-xr-x 1 system system 4236260 1981-01-01 01:01 libQt5Qml_x86.so
-rwxr-xr-x 1 system system 181004 1981-01-01 01:01 libQt5QuickControls2_x86.so
-rwxr-xr-x 1 system system 1392176 1981-01-01 01:01 libQt5QuickTemplates2_x86.so
-rwxr-xr-x 1 system system 4880080 1981-01-01 01:01 libQt5Quick_x86.so
-rwxr-xr-x 1 system system 562364 1981-01-01 01:01 libQt5RemoteObjects_x86.so
-rwxr-xr-x 1 system system 931652 1981-01-01 01:01 libc++_shared.so
-rwxr-xr-x 1 system system 56196 1981-01-01 01:01 libplugins_bearer_qandroidbearer_x86.so
-rwxr-xr-x 1 system system 26304 1981-01-01 01:01 libplugins_imageformats_qgif_x86.so
-rwxr-xr-x 1 system system 34944 1981-01-01 01:01 libplugins_imageformats_qicns_x86.so
-rwxr-xr-x 1 system system 22208 1981-01-01 01:01 libplugins_imageformats_qico_x86.so
-rwxr-xr-x 1 system system 399040 1981-01-01 01:01 libplugins_imageformats_qjpeg_x86.so
-rwxr-xr-x 1 system system 18112 1981-01-01 01:01 libplugins_imageformats_qtga_x86.so
-rwxr-xr-x 1 system system 432080 1981-01-01 01:01 libplugins_imageformats_qtiff_x86.so
-rwxr-xr-x 1 system system 18112 1981-01-01 01:01 libplugins_imageformats_qwbmp_x86.so
-rwxr-xr-x 1 system system 673576 1981-01-01 01:01 libplugins_imageformats_qwebp_x86.so
-rwxr-xr-x 1 system system 1200076 1981-01-01 01:01 libplugins_platforms_qtforandroid_x86.so
-rwxr-xr-x 1 system system 150600 1981-01-01 01:01 libplugins_qmltooling_qmldbg_debugger_x86.so
-rwxr-xr-x 1 system system 67868 1981-01-01 01:01 libplugins_qmltooling_qmldbg_inspector_x86.so
-rwxr-xr-x 1 system system 14076 1981-01-01 01:01 libplugins_qmltooling_qmldbg_local_x86.so
-rwxr-xr-x 1 system system 14076 1981-01-01 01:01 libplugins_qmltooling_qmldbg_messages_x86.so
-rwxr-xr-x 1 system system 22332 1981-01-01 01:01 libplugins_qmltooling_qmldbg_native_x86.so
-rwxr-xr-x 1 system system 45316 1981-01-01 01:01 libplugins_qmltooling_qmldbg_nativedebugger_x86.so
-rwxr-xr-x 1 system system 84564 1981-01-01 01:01 libplugins_qmltooling_qmldbg_preview_x86.so
-rwxr-xr-x 1 system system 63504 1981-01-01 01:01 libplugins_qmltooling_qmldbg_profiler_x86.so
-rwxr-xr-x 1 system system 22268 1981-01-01 01:01 libplugins_qmltooling_qmldbg_quickprofiler_x86.so
-rwxr-xr-x 1 system system 55248 1981-01-01 01:01 libplugins_qmltooling_qmldbg_server_x86.so
-rwxr-xr-x 1 system system 14072 1981-01-01 01:01 libplugins_qmltooling_qmldbg_tcp_x86.so
-rwxr-xr-x 1 system system 52096 1981-01-01 01:01 libqml_QtGraphicalEffects_private_qtgraphicaleffectsprivate_x86.so
-rwxr-xr-x 1 system system 50948 1981-01-01 01:01 libqml_QtGraphicalEffects_qtgraphicaleffectsplugin_x86.so
-rwxr-xr-x 1 system system 9928 1981-01-01 01:01 libqml_QtQml_Models.2_modelsplugin_x86.so
-rwxr-xr-x 1 system system 18128 1981-01-01 01:01 libqml_QtQml_RemoteObjects_qtqmlremoteobjects_x86.so
-rwxr-xr-x 1 system system 69520 1981-01-01 01:01 libqml_QtQml_StateMachine_qtqmlstatemachine_x86.so
-rwxr-xr-x 1 system system 9932 1981-01-01 01:01 libqml_QtQml_WorkerScript.2_workerscriptplugin_x86.so
-rwxr-xr-x 1 system system 9920 1981-01-01 01:01 libqml_QtQml_qmlplugin_x86.so
-rwxr-xr-x 1 system system 9924 1981-01-01 01:01 libqml_QtQuick.2_qtquick2plugin_x86.so
-rwxr-xr-x 1 system system 600836 1981-01-01 01:01 libqml_QtQuick_Controls.2_Fusion_qtquickcontrols2fusionstyleplugin_x86.so
-rwxr-xr-x 1 system system 1611660 1981-01-01 01:01 libqml_QtQuick_Controls.2_Imagine_qtquickcontrols2imaginestyleplugin_x86.so
-rwxr-xr-x 1 system system 744164 1981-01-01 01:01 libqml_QtQuick_Controls.2_Material_qtquickcontrols2materialstyleplugin_x86.so
-rwxr-xr-x 1 system system 602016 1981-01-01 01:01 libqml_QtQuick_Controls.2_Universal_qtquickcontrols2universalstyleplugin_x86.so
-rwxr-xr-x 1 system system 652988 1981-01-01 01:01 libqml_QtQuick_Controls.2_qtquickcontrols2plugin_x86.so
-rwxr-xr-x 1 system system 378820 1981-01-01 01:01 libqml_QtQuick_Templates.2_qtquicktemplates2plugin_x86.so
-rwxr-xr-x 1 system system 40492 1981-01-01 01:01 libqml_QtQuick_Window.2_windowplugin_x86.so
and Qt tries to load from /system/lib when running as a system app, so I needed to move them there (the patchset referenced in this StackOverflow answer was merged)
Here are the logs from logcat, from the moment I tap the app icon in the launcher to the time it appears to have terminated:
08-17 10:25:34.303 1965 4949 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.qtproject.example.QMLhello/org.qtproject.qt5.android.bindings.QtActivity bnds=[37,1236][238,1560]} from uid 10109
08-17 10:25:34.308 1965 2005 E system_server: Invalid ID 0x00000000.
08-17 10:25:34.308 1965 1965 W ActivityManager: Unable to start service Intent { act=android.service.appprediction.AppPredictionService cmp=com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiPredictionService } U=0: not found
08-17 10:25:34.308 1965 1965 W RemoteAppPredictionService: could not bind to Intent { act=android.service.appprediction.AppPredictionService cmp=com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiPredictionService } using flags 67108865
08-17 10:25:34.308 1965 2298 W InputReader: Device has associated, but no associated display id.
08-17 10:25:34.309 1965 2298 I chatty : uid=1000(system) Binder:1965_6 identical 28 lines
08-17 10:25:34.309 1965 2298 W InputReader: Device has associated, but no associated display id.
08-17 10:25:34.310 4888 4888 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy#e48f5bf
08-17 10:25:34.314 1965 2298 W InputReader: Device has associated, but no associated display id.
08-17 10:25:34.314 1965 2298 I chatty : uid=1000(system) Binder:1965_6 identical 8 lines
08-17 10:25:34.314 1965 2298 W InputReader: Device has associated, but no associated display id.
08-17 10:25:34.329 1754 2456 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 10108928
08-17 10:25:34.356 4888 4888 E Qt : It looks like app deployed as system app. It may be necessary to specify path to system lib directory using android.app.system_libs_prefix metadata variable in your AndroidManifest.xml
08-17 10:25:34.356 4888 4888 E Qt : Using /system/lib/ as default path
08-17 10:25:34.358 4888 4888 W System : ClassLoader referenced unknown path:
08-17 10:25:34.384 1965 2005 W InputReader: Device has associated, but no associated display id.
08-17 10:25:34.384 1965 2005 I chatty : uid=1000(system) android.anim identical 8 lines
08-17 10:25:34.384 1965 2005 W InputReader: Device has associated, but no associated display id.
08-17 10:25:34.387 4888 4913 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.Bundle.containsKey(java.lang.String)' on a null object reference
08-17 10:25:34.387 4888 4913 W System.err: at org.qtproject.qt5.android.QtNative$4.run(QtNative.java:495)
08-17 10:25:34.387 4888 4913 W System.err: at org.qtproject.qt5.android.QtThread$2.run(QtThread.java:87)
08-17 10:25:34.387 4888 4913 W System.err: at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
08-17 10:25:34.387 4888 4913 W System.err: at java.lang.Thread.run(Thread.java:919)
08-17 10:25:34.387 4888 4888 W System.err: java.lang.Exception:
08-17 10:25:34.388 4888 4888 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:268)
08-17 10:25:34.388 4888 4888 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505)
08-17 10:25:34.388 4888 4888 W System.err: at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166)
08-17 10:25:34.388 4888 4888 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:267)
08-17 10:25:34.388 4888 4888 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:274)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.Activity.performCreate(Activity.java:7802)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.Activity.performCreate(Activity.java:7791)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)08-17 10:25:34.388 4888 4888 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
08-17 10:25:34.388 4888 4888 W System.err: at android.os.Looper.loop(Looper.java:214)
08-17 10:25:34.388 4888 4888 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)
08-17 10:25:34.388 4888 4888 W System.err: at java.lang.reflect.Method.invoke(Native Method)
08-17 10:25:34.388 4888 4888 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
08-17 10:25:34.389 4888 4888 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
08-17 10:25:34.438 1754 2456 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1495040
08-17 10:25:34.449 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.451 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf0612d20
08-17 10:25:34.452 4888 4909 D EGL_emulation: eglMakeCurrent: 0xe3010e40: ver 2 0 (tinfo 0xe2feea20)
08-17 10:25:34.460 1754 2456 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1495040
08-17 10:25:34.464 1754 2456 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1495040
08-17 10:25:34.466 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.469 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf0613080
08-17 10:25:34.479 1754 2456 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 10108928
08-17 10:25:34.483 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.489 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf06130e0
08-17 10:25:34.492 1754 2456 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 10108928
08-17 10:25:34.493 4888 4909 D EGL_emulation: eglMakeCurrent: 0xe3010e40: ver 2 0 (tinfo 0xe2feea20)
08-17 10:25:34.499 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.526 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf0612d20
08-17 10:25:34.527 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.530 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf0613080
08-17 10:25:34.532 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.545 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf06130e0
08-17 10:25:34.546 1754 2456 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 10108928
08-17 10:25:34.548 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.561 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf0612d20
08-17 10:25:34.563 4888 4909 D EGL_emulation: eglMakeCurrent: 0xe3010e40: ver 2 0 (tinfo 0xe2feea20)
08-17 10:25:34.565 1755 2673 W EmuHWC2 : validate: layer 19 CompositionType 1, fallback
08-17 10:25:34.569 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf0613080
08-17 10:25:34.583 1755 2673 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.584 1965 2009 I ActivityTaskManager: Displayed org.qtproject.example.QMLhello/org.qtproject.qt5.android.bindings.QtActivity: +255ms
08-17 10:25:34.586 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf06130e0
08-17 10:25:34.599 1755 2673 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.611 1755 2673 W EmuHWC2 : No layers, exit, buffer 0xf0612d20
08-17 10:25:34.616 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.618 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf0613080
08-17 10:25:34.633 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.634 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.635 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf06130e0
08-17 10:25:34.640 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.649 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.651 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.652 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf0612d20
08-17 10:25:34.655 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.666 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.668 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf0613080
08-17 10:25:34.670 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.673 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.683 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.685 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf06130e0
08-17 10:25:34.685 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.691 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.699 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.701 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf0612d20
08-17 10:25:34.704 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.709 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.716 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.718 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf0613080
08-17 10:25:34.721 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.725 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.733 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.735 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf06130e0
08-17 10:25:34.741 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.746 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.750 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.752 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf0612d20
08-17 10:25:34.757 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.761 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.766 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.768 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf0613080
08-17 10:25:34.772 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.775 2120 2352 D EGL_emulation: eglMakeCurrent: 0xe2f6dde0: ver 2 0 (tinfo 0xc15443d0)
08-17 10:25:34.783 1755 1755 W EmuHWC2 : validate: layer 20 CompositionType 1, fallback
08-17 10:25:34.786 1755 1755 W EmuHWC2 : No layers, exit, buffer 0xf06130e0
08-17 10:25:34.848 1768 1768 E Layer : [Surface(name=AppWindowToken{607c35c token=Token{3592dcf ActivityRecord{84abe2e u0 com.google.android.apps.nexuslauncher/.NexusLauncherActivity t8}}})/#0x2c802ff - animation-leash#0] No local sync point found
08-17 10:25:34.848 1768 1768 E Layer : [Surface(name=AppWindowToken{607c35c token=Token{3592dcf ActivityRecord{84abe2e u0 com.google.android.apps.nexuslauncher/.NexusLauncherActivity t8}}})/#0x2c802ff - animation-leash#0] No local sync point found
08-17 10:25:34.848 1768 1768 E Layer : [Surface(name=AppWindowToken{8151314 token=Token{6bf8967 ActivityRecord{6996926 u0 org.qtproject.example.QMLhello/org.qtproject.qt5.android.bindings.QtActivity t11}}})/#0x8dbcc29 - animation-leash#0] No local sync point found
08-17 10:25:34.848 1768 1768 E Layer : [Surface(name=AppWindowToken{8151314 token=Token{6bf8967 ActivityRecord{6996926 u0 org.qtproject.example.QMLhello/org.qtproject.qt5.android.bindings.QtActivity t11}}})/#0x8dbcc29 - animation-leash#0] No local sync point found
08-17 10:25:34.850 2955 3141 D EGL_emulation: eglMakeCurrent: 0xe2f75c00: ver 2 0 (tinfo 0xbeb4d200)
08-17 10:25:34.852 2308 2944 D EGL_emulation: eglMakeCurrent: 0xe2f66840: ver 2 0 (tinfo 0xe3005990)
08-17 10:25:34.867 2955 3134 I PBSessionCacheImpl: Deleted sessionId[497328440469] from persistence.
08-17 10:25:34.889 2955 3112 W SearchServiceCore: Abort, client detached.
08-17 10:25:34.898 1768 1768 W SurfaceFlinger: couldn't log to binary event log: overflow.
That line of code it references in the exception, QtLoader.java line 268, simply appears to throw an empty string exception if it fails to "invoke", without any information on why it failed to invoke.
Digging further, it looks like the cause comes from QtNative.java line 495 where it runs into a NullPointerException attempting to call info.metaData.containsKey. But I can't fathom why that would fail for a system app when it doesn't fail for a normal app.
What else am I missing?
My mistake was moving the libraries to /system/lib. I believe I may have blindly copied all the steps of a previous answer where that was necessary, and some changes in Qt and/or Android may've have happened since then that lead to my issue.
For my purposes, it was sufficient to simply move the directory altogether as-is from /data/app/ to /system/priv-app, keeping the library subdirectory.
adb install appname.apk
adb remount
adb shell
cd /data/app
mv appname* /system/priv-app
reboot
The QtLoader is able to load up some of the shared libraries from /system/lib enough to get to the next step. But the next step needs to have the libraries in the first place it looks, at /system/priv-app/org.qtproject.example.QMLhello-LpZtuoO0ejyQPg_I-8pWnQ==/lib/x86 (at least in the case of the x86 emulator - substitute other arch as needed)
Otherwise, there is a chance it will run into a NullPointerException and fail to launch.
Potential workaround
Add some <meta-data> directly under <application> in AndroidManifest.xml
Details
Here is a snippet of the QtNative.java code, lines 489-497 as of the 5.15.2 release (line numbers added)
// ...
/* 489 */ File f = new File(nativeLibraryDir + mainLibNameTemplate);
/* 490 */ if (!f.exists()) {
/* 491 */ try {
/* 492 */ ApplicationInfo info = getContext().getApplicationContext().getPackageManager()
/* 493 */ .getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
/* 494 */ String systemLibraryDir = QtNativeLibrariesDir.systemLibrariesDir;
/* 495 */ if (info.metaData.containsKey("android.app.system_libs_prefix"))
/* 496 */ systemLibraryDir = info.metaData.getString("android.app.system_libs_prefix");
/* 497 */ f = new File(systemLibraryDir + mainLibNameTemplate);
// ...
489: When QtNative.java goes to load the main application library, it first checks in that ./lib/x86 subfolder, in this case.
492-493: When it fails to find that, it's looking for some metadata in the application manifest to see if the application is telling it where to look. When there is no metadata at the application level, however, the metaData member of the object is null.
Not checking for null, thus a NullPointerException gets thrown
How did a null pointer happen in the first place?
The AndroidManifest.xml generated by Qt by default for this project (attached below) does not contain any <meta-data> tags directly under the <application> level--they are instead contained in <activity>. The loadMainLibrary function should be looking at the activityInfo instead of (or in addition to) applicationInfo, as well as checking for null beforehand.
This seems like a bug in Qt and I'll report accordingly, but 5.15.x won't be getting any more updates for open source.
<?xml version="1.0"?>
<manifest package="org.qtproject.example.QMLhello" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="QMLhello" android:extractNativeLibs="true">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="QMLhello" android:screenOrientation="unspecified" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Application arguments -->
<!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
<!-- Application arguments -->
<meta-data android:name="android.app.lib_name" android:value="QMLhello"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="#array/qt_sources"/>
<meta-data android:name="android.app.repository" android:value="default"/>
<meta-data android:name="android.app.qt_libs_resource_id" android:resource="#array/qt_libs"/>
<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="#array/bundled_libs"/>
<!-- Deploy Qt libs as part of package -->
<meta-data android:name="android.app.bundle_local_qt_libs" android:value="1"/>
<!-- Run with local libs -->
<meta-data android:name="android.app.use_local_qt_libs" android:value="1"/>
<meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
<meta-data android:name="android.app.load_local_libs_resource_id" android:resource="#array/load_local_libs"/>
<meta-data android:name="android.app.load_local_jars" android:value="jar/QtAndroid.jar:jar/QtAndroidBearer.jar"/>
<meta-data android:name="android.app.static_init_classes" android:value=""/>
<!-- Used to specify custom system library path to run with local system libs -->
<!-- <meta-data android:name="android.app.system_libs_prefix" android:value="/system/lib/"/> -->
<!-- Messages maps -->
<meta-data android:value="#string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
<meta-data android:value="#string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
<meta-data android:value="#string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
<meta-data android:value="#string/unsupported_android_version" android:name="android.app.unsupported_android_version"/>
<!-- Messages maps -->
<!-- Splash screen -->
<!-- Orientation-specific (portrait/landscape) data is checked first. If not available for current orientation,
then android.app.splash_screen_drawable. For best results, use together with splash_screen_sticky and
use hideSplashScreen() with a fade-out animation from Qt Android Extras to hide the splash screen when you
are done populating your window with content. -->
<!-- meta-data android:name="android.app.splash_screen_drawable_portrait" android:resource="#drawable/logo_portrait" / -->
<!-- meta-data android:name="android.app.splash_screen_drawable_landscape" android:resource="#drawable/logo_landscape" / -->
<!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="#drawable/logo"/ -->
<!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ -->
<!-- Splash screen -->
<!-- Background running -->
<!-- Warning: changing this value to true may cause unexpected crashes if the
application still try to draw after
"applicationStateChanged(Qt::ApplicationSuspended)"
signal is sent! -->
<meta-data android:name="android.app.background_running" android:value="false"/>
<!-- Background running -->
<!-- auto screen scale factor -->
<meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>
<!-- auto screen scale factor -->
<!-- extract android style -->
<!-- available android:values :
* default - In most cases this will be the same as "full", but it can also be something else if needed, e.g., for compatibility reasons
* full - useful QWidget & Quick Controls 1 apps
* minimal - useful for Quick Controls 2 apps, it is much faster than "full"
* none - useful for apps that don't use any of the above Qt modules
-->
<meta-data android:name="android.app.extract_android_style" android:value="default"/>
<!-- extract android style -->
</activity>
<!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
</application>
</manifest>

Qt - Android app crashes immediately

I am trying to run an android app, I wrote in C++ using Qt, on my smartphone.
I am able to deploy the app and start running. But it immediately shuts down, without any error message or whatsoever on my phone. This is however what I can see in my Qt IDE for the Application output:
Starting remote process.I/ActivityManager( 764): Start proc org.qtproject.example.android for activity org.qtproject.example.android/org.qtproject.qt5.android.bindings.QtActivity: pid=16671 uid=10112 gids={50112, 9997, 3003, 1028, 1015} abi=armeabi-v7a
I/art (16671): Late-enabling -Xcheck:jni
I/art (16671): VMHOOK: rlim_cur : 0 pid:16671
I/QtCore (16671): Start
I/Qt (16671): qt start
D/Atlas (16671): Validating map...
D/FindExtension(16671): FindExtension: before mHardwareRenderer.initialize, mSurface.isValid() = true
I/Adreno-EGL(16671): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.AF.1.1_RB1.05.00.02.006.020 - CR771817 ()
I/Adreno-EGL(16671): OpenGL ES Shader Compiler Version: E031.25.03.06
I/Adreno-EGL(16671): Build Date: 03/04/15 Wed
I/Adreno-EGL(16671): Local Branch:
I/Adreno-EGL(16671): Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.AF.1.1_RB1.05.00.02.006.020
I/Adreno-EGL(16671): Local Patches: NONE
I/Adreno-EGL(16671): Reconstruct Branch: NOTHING
I/InputMethodManagerService( 764): Enable input method client, pid=16671
I/InputMethodManagerService( 764): Disable input method client, pid=16671
I/ActivityManager( 764): Recipient 16671
E/InputEventReceiver( 1202): Looper::removeFd(71) is failed, result(0), input channel 'ClientState{37476efb uid 10112 pid 16671} (c)'
D/Process ( 764): killProcessQuiet, pid=16671
I/ActivityManager( 764): Process org.qtproject.example.android (pid 16671) has died
"org.qtproject.example.android" died.
This also happens when I just deploy a blank project, which only contains a pushbutton which I put using Qtcreator.
This is my bugreport: https://www.dropbox.com/s/ven5pby2dy3x4uw/bugreport-2017-08-31-09-34-57.txt?dl=0
What am I doing incorrectly?
Thanks

Genymotion: "Unfortunately <app> has stopped"

I've created an application in React Native that works fine in iOS. I've copied the code over to the Android portion of it, and separated out the platform-specific components. When I hit a certain component, the app crashes with an "Unfortunately has stopped".
There are no logs, no error in the console, nothing. What do I look for and where can I look? Logs? Somewhere in code?
In ~/genymotion-log/Google Nexus 6<...>-logcat.txt, I see the following:
05-15 23:50:14.379 D/OpenGLRenderer( 620): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-15 23:50:14.380 D/Atlas ( 620): Validating map...
05-15 23:50:14.429 I/OpenGLRenderer( 620): Initialized EGL, version 1.4
05-15 23:50:14.429 D/ ( 620): HostConnection::get() New Host Connection established 0xaf31ca40, tid 1876
05-15 23:50:14.463 D/OpenGLRenderer( 620): Enabling debug mode 0
05-15 23:50:14.489 W/EGL_emulation( 620): eglSurfaceAttrib not implemented
05-15 23:50:14.490 W/OpenGLRenderer( 620): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9e45dfc0, error=EGL_SUCCESS
05-15 23:50:14.490 W/EGL_emulation( 941): eglSurfaceAttrib not implemented
05-15 23:50:14.490 W/OpenGLRenderer( 941): Failed to set EGL_SWAP_BEHAVIOR on surface 0xb43e44a0, error=EGL_SUCCESS
05-15 23:50:14.952 I/ActivityManager( 620): Killing 1492:com.android.onetimeinitializer/u0a10 (adj 15): empty #17
05-15 23:50:15.219 W/OpenGLRenderer( 941): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
05-15 23:50:15.440 W/ResourceType( 724): No package identifier when getting value for resource number 0x00000000
05-15 23:50:15.442 W/PackageManager( 724): Failure retrieving resources for com.bidsmart: Resource ID #0x0
05-15 23:50:18.400 W/AudioTrack( 620): AUDIO_OUTPUT_FLAG_FAST denied by client
05-15 23:50:18.424 I/Process ( 1805): Sending signal. PID: 1805 SIG: 9
05-15 23:50:18.463 D/OpenGLRenderer( 620): endAllStagingAnimators on 0xa1a6f780 (RippleDrawable) with handle 0xaf3be470
05-15 23:50:18.468 I/ActivityManager( 620): Process com.bidsmart (pid 1805) has died
05-15 23:50:18.472 W/InputMethodManagerService( 620): Got RemoteException sending setActive(false) notification to pid 1805 uid 10061
No fix, but the reason is I'm pushing too much data from the server to the client. Once I ran adb logcat, I got this:
java.lang.OutOfMemoryError: Failed to allocate a 2470012 byte allocation with 48508 free bytes and 47KB until OOM.
Turns out I'm pushing my images over and over to the client until it breaks. iOS can handle it but RN can't.
Link to StackOverflow related thread: Android:java.lang.OutOfMemoryError: Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM

Android webview won't load my URL but will load others

I have a webiew app on android which loads some websites but not the one I need it to.
I have no idea if this is a problem with the website host or something I can do in my app. Basically I have an online portfolio I'm making for university and I want to make myself look better by building it into an app. The portfolio site includes a mobile version so it's already set up for that and works fine in the chrome browser on my phone.
It used to work with an old site and it loads google so I know I have the internet permission right. Not sure if it's something to do with my new site or I just need to change something to make it work.
In the chrome browser it looks as it should, which isn't good at the moment because I wanted to do this first before I added content to it. This is how it looks. (Can't post a screenshot directly as I don't have enough rep, sorry)
Here is my main app code:
package com.broadbentstudios;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.parse.ParseAnalytics;
#SuppressLint("SetJavaScriptEnabled")
public class ParseStarterProjectActivity extends Activity {
WebView webView;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webView = (WebView) findViewById(R.id.mainWebView);
webView.setBackgroundColor(0x00000000);
webView.setHorizontalScrollBarEnabled(false);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setUseWideViewPort(true);
webView.loadUrl("http://www.broadbentstudios.com/");
webView.setWebViewClient(new WebViewClient() {
#Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return true;
}
});
}
#Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && webView!=null && webView.canGoBack()) {
webView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
{
ParseAnalytics.trackAppOpenedInBackground(getIntent());
}
}
Screenshot of my site when using my app with the code above.
Here is the logcat.
04-12 18:51:45.686: D/PowerManagerService(1196): acquireWakeLockInternal: lock=903227323, flags=0x1, tag="LocationManagerService", ws=WorkSource{1000 com.qualcomm.location}, uid=1000, pid=1196
04-12 18:51:45.686: D/PowerManagerService(1196): acquireWakeLockInternal: lock=662236910, flags=0x1, tag="LocationManagerService", ws=WorkSource{10013 com.google.android.gms}, uid=1000, pid=1196
04-12 18:51:45.687: D/PowerManagerService(1196): acquireWakeLockInternal: lock=531027438, flags=0x1, tag="LocationManagerService", ws=WorkSource{10013 com.google.android.gms}, uid=1000, pid=1196
04-12 18:51:45.687: D/PowerManagerService(1196): releaseWakeLockInternal: lock=959227632 [LocationManagerService], flags=0x0
04-12 18:51:45.687: D/PowerManagerService(1196): releaseWakeLockInternal: lock=546372682 [LocationManagerService], flags=0x0
04-12 18:51:45.688: D/PowerManagerService(1196): releaseWakeLockInternal: lock=662236910 [LocationManagerService], flags=0x0
04-12 18:51:45.688: D/PowerManagerService(1196): releaseWakeLockInternal: lock=531027438 [LocationManagerService], flags=0x0
04-12 18:51:45.689: D/PowerManagerService(1196): releaseWakeLockInternal: lock=197382963 [LocationManagerService], flags=0x0
04-12 18:51:45.689: D/PowerManagerService(1196): releaseWakeLockInternal: lock=903227323 [LocationManagerService], flags=0x0
04-12 18:51:45.734: I/LibraryLoader(28664): Time to load native libraries: 34 ms (timestamps 2209-2243)
04-12 18:51:45.734: I/LibraryLoader(28664): Expected native library version number "",actual native library version number ""
04-12 18:51:45.747: V/WebViewChromiumFactoryProvider(28664): Binding Chromium to main looper Looper (main, tid 1) {24dd5d0b}
04-12 18:51:45.747: I/LibraryLoader(28664): Expected native library version number "",actual native library version number ""
04-12 18:51:45.747: I/chromium(28664): [INFO:library_loader_hooks.cc(108)] Chromium logging enabled: level = 0, default verbosity = 0
04-12 18:51:45.757: I/BrowserStartupController(28664): Initializing chromium process, singleProcess=true
04-12 18:51:45.758: W/art(28664): Attempt to remove local handle scope entry from IRT, ignoring
04-12 18:51:45.768: W/AudioManagerAndroid(28664): Requires BLUETOOTH permission
04-12 18:51:45.769: W/chromium(28664): [WARNING:resource_bundle.cc(304)] locale_file_path.empty()
04-12 18:51:45.770: I/chromium(28664): [INFO:aw_browser_main_parts.cc(63)] Load from apk succesful, fd=59 off=45928 len=3221
04-12 18:51:45.770: I/chromium(28664): [INFO:aw_browser_main_parts.cc(76)] Loading webviewchromium.pak from, fd:60 off:390788 len:1143511
04-12 18:51:45.775: D/libEGL(28664): loaded /vendor/lib/egl/libEGL_adreno.so
04-12 18:51:45.776: D/libEGL(28664): loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
04-12 18:51:45.788: D/libEGL(28664): loaded /vendor/lib/egl/libGLESv2_adreno.so
04-12 18:51:45.803: I/Adreno-EGL(28664): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.1.C2.05.00.00.046.002_msm8974_LA.BF.1.1.1.C2__release_AU ()
04-12 18:51:45.803: I/Adreno-EGL(28664): OpenGL ES Shader Compiler Version: E031.25.03.00
04-12 18:51:45.803: I/Adreno-EGL(28664): Build Date: 01/06/15 Tue
04-12 18:51:45.803: I/Adreno-EGL(28664): Local Branch: mybranch6793908
04-12 18:51:45.803: I/Adreno-EGL(28664): Remote Branch: quic/LA.BF.1.1.1.c2
04-12 18:51:45.803: I/Adreno-EGL(28664): Local Patches: NONE
04-12 18:51:45.803: I/Adreno-EGL(28664): Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.1.C2.05.00.00.046.002 + NOTHING
04-12 18:51:45.868: W/chromium(28664): [WARNING:data_reduction_proxy_settings.cc(328)] SPDY proxy OFF at startup
04-12 18:51:45.890: W/art(28664): Attempt to remove local handle scope entry from IRT, ignoring
04-12 18:51:45.895: W/AwContents(28664): onDetachedFromWindow called when already detached. Ignoring
04-12 18:51:45.917: E/QCOMSysDaemon(28750): Can't open /dev/block/platform/msm_sdcc.1/by-name/bootselect: (No such file or directory)
04-12 18:51:45.917: I/QCOMSysDaemon(28750): Starting qcom system daemon
04-12 18:51:45.917: E/Diag_Lib(28750): Diag_LSM_Init: Failed to open handle to diag driver, error = 2
04-12 18:51:45.917: E/QCOMSysDaemon(28750): Diag_LSM_Init failed : 0
04-12 18:51:45.953: D/OpenGLRenderer(28664): Render dirty regions requested: true
04-12 18:51:45.956: D/Atlas(28664): Validating map...
04-12 18:51:45.962: E/com.parse.push(28664): successfully subscribed to the broadcast channel.
04-12 18:51:45.963: D/PowerManagerService(1196): acquireWakeLockInternal: lock=553909931, flags=0x1, tag="Intent { act=com.google.android.c2dm.intent.REGISTRATION flg=0x10 pkg=com.broadbentstudios cmp=com.broadbentstudios/com.parse.GcmBroadcastReceiver (has extras) }", ws=null, uid=10221, pid=28664
04-12 18:51:45.992: I/OpenGLRenderer(28664): Initialized EGL, version 1.4
04-12 18:51:45.997: D/OpenGLRenderer(28664): Enabling debug mode 0
04-12 18:51:46.009: D/PowerManagerService(1196): releaseWakeLockInternal: lock=553909931 [Intent { act=com.google.android.c2dm.intent.REGISTRATION flg=0x10 pkg=com.broadbentstudios cmp=com.broadbentstudios/com.parse.GcmBroadcastReceiver (has extras) }], flags=0x0
04-12 18:51:46.029: I/Timeline(28664): Timeline: Activity_idle id: android.os.BinderProxy#19326283 time:33412539
04-12 18:51:46.030: D/PowerManagerService(1196): releaseWakeLockInternal: lock=110279535 [ActivityManager-Launch], flags=0x0
04-12 18:51:46.038: I/ActivityManager(1196): Displayed com.broadbentstudios/.ParseStarterProjectActivity: +864ms
04-12 18:51:46.038: I/Timeline(1196): Timeline: Activity_windows_visible id: ActivityRecord{3eff1853 u0 com.broadbentstudios/.ParseStarterProjectActivity t1645} time:33412548
04-12 18:51:46.055: D/ForegroundUtils(4725): Foreground changed, PID: 4813 UID: 10182 foreground: false
04-12 18:51:46.055: D/ForegroundUtils(4725): Foreground UID/PID combinations:
04-12 18:51:46.055: D/ForegroundUtils(4725): UID: 10221 PID: 28664
04-12 18:51:46.386: D/AbstractMetricsFactoryImpl(28721): record : No data points in metrics event
04-12 18:51:46.637: W/BindingManager(28664): Cannot call determinedVisibility() - never saw a connection for the pid: 28664
04-12 18:51:47.134: I/chromium(28664): [INFO:CONSOLE(0)] "'webkitIDBRequest' is deprecated. Please use 'IDBRequest' instead.", source: (0)
04-12 18:51:47.422: I/chromium(28664): [INFO:CONSOLE(1)] "HARD RESET!!", source: http://www.broadbentstudios.com/application/_output/pb.out.front.js?v=7 (1)
04-12 18:51:47.440: I/chromium(28664): [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'clear' of null", source: http://www.broadbentstudios.com/application/_output/pb.out.front.js?v=7 (1)
04-12 18:51:48.338: D/audio_hw_primary(253): out_standby: enter: stream (0xb5801780) usecase(1: low-latency-playback)
Any help would be great, even if it's just so I know if it's my app or the site that is causing the problems.
Finally found the answer after a lot of searching. For anybody in a similar situation, as well as enabling javascript you also need to enable Dom storage by adding in;
webView.getSettings().setDomStorageEnabled(true);
Change webView to whatever yours is called and you should be good to go.
Hope this helps someone.
Your website has a JavaScript error. Did you try something about that error in the log you shared?
Uncaught TypeError: Cannot read property 'clear' of null", source:
http://www.broadbentstudios.com/application/_output/pb.out.front.js?v=7
(1)
I recently create one repository with a basic web view application for android with some error handling for no internet connection
https://github.com/jgarciabt/SmartWebView
You can clone it and start your application from it, maybe that is easier.

Android app suddenly stops - in-app purchase

After I implemented in-app purchase in my android app, it suddenly stops when I close it. And Im struggling to see what the problem is in log cat. Im receiving the error
Permission Denial: get/set setting for user asks to run as user -2 but is calling from
user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
But I have received this error before, and the application still worked fine. Here is my log cat, I was uncertain for how much I needed to add so sorry if it is a lot. Please let me know if I need to add some more, thanks!
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
I/InputReader( 2347): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.16208 ] when=116815167044000
I/InputDispatcher( 2347): Delivering touch to: action: 0x0
I/InputReader( 2347): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=116815315918000
I/InputDispatcher( 2347): Delivering touch to: action: 0x1
D/BatteryService( 2347): update start
D/BatteryService( 2347): level:80, scale:100, status:2, health:2, present:true, voltage: 4085, temperature: 467, technology: Li-ion, AC powered:false, USB powered:true, Wireless powered:false, icon:17303550, invalid charger:0, online:4, charge type:1, current avg:460
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450, Prev AP = 450, Duration = 10006
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
I/InputReader( 2347): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.16209 ] when=116820660525000
D/InputDispatcher( 2347): Waiting for application to become ready for input: xxxx Reason: Waiting because the touched window has not finished processing the input events that were previously delivered to it.
D/PowerManagerService( 2347): [api] userActivityFromNative : 50 (event: 2 flags: 0)
D/SensorService( 2347): 0.4 9.9 -0.1
I/InputReader( 2347): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=116820774347000
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
I/dumpstate(29002): done
D/BatteryService( 2347): Sending ACTION_BATTERY_CHANGED.
D/SSRMv2:CustomFrequencyManagerService( 2347): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 pkgName : ACTIVITY_RESUME_BOOSTER#5
I/power ( 2347): *** acquire_dvfs_lock : lockType : 1 freq : 1200000
W/ActivityManager( 2347): mDVFSHelper.acquire()
D/dalvikvm( 2347): GC_FOR_ALLOC freed 201K, 17% free 52076K/62236K, paused 330ms, total 331ms
I/ActivityManager( 2347): Process com.jb.gosms.emoji (pid 28888) (adj 11) has died.
D/InputDispatcher( 2347): Waiting for application to become ready for input: xxxx Reason: Waiting because the touched window is paused.
I/InputDispatcher( 2347): Window spent 8210.1ms processing the last input event: MotionEvent(action=0, deviceId=5, source=0x00001002, displayId=0)
I/InputDispatcher( 2347): Window spent 8061.8ms processing the last input event: MotionEvent(action=1, deviceId=5, source=0x00001002, displayId=0)
I/ActivityManager( 2347): Process com.google.android.apps.plus (pid 28904) (adj 9) has died.
W/Choreographer(28777): Already have a pending vsync event. There should only be one at a time.
I/ActivityManager( 2347): Process com.facebook.katana (pid 28332) (adj 8) has died.
D/MoPub (28777): Third-party network timed out.
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 11 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x4 level=4
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 11 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x3 level=3
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
V/MoPub (28777): MoPubErrorCode: Third-party network failed to respond in a timely manner.
D/MoPub (28777): Loading failover url: http://ads.mopub.com/m/ad?v=6&id=9228ebfca6504982941c5601765f658a&nv=1.17.2.0&dn=samsung%2CGT-I9300%2Cm0xx&udid=sha%3A32bc9016036e33b67730c1fadad5c452541e38a5&q=FBATTRID%3Aa3f781d2-2ba6-4265-9690-e4fe0b244cda&z=%2B0200&o=p&sc_a=2.0&mr=1&mcc=242&mnc=05&iso=no&cn=One%20Call&ct=3&av=1.3.8&android_perms_ext_storage=1&request_id=08889b4ab90911e3af000025907c4175&exclude=fbab69084c5611e381c11231392559e4
D/MoPub (28777): Loading url: http://ads.mopub.com/m/ad?v=6&id=9228ebfca6504982941c5601765f658a&nv=1.17.2.0&dn=samsung%2CGT-I9300%2Cm0xx&udid=sha%3A32bc9016036e33b67730c1fadad5c452541e38a5&q=FBATTRID%3Aa3f781d2-2ba6-4265-9690-e4fe0b244cda&z=%2B0200&o=p&sc_a=2.0&mr=1&mcc=242&mnc=05&iso=no&cn=One%20Call&ct=3&av=1.3.8&android_perms_ext_storage=1&request_id=08889b4ab90911e3af000025907c4175&exclude=fbab69084c5611e381c11231392559e4
I/MoPub (28777): Fetching ad for task #1
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 10 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x3 level=3
D/STATUSBAR-IconMerger( 8423): checkOverflow(240), More:false, Req:false Child:2
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 9 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x3 level=3
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
D/STATUSBAR-StatusBarManagerService( 2347): manageDisableList what=0x0 pkg=WindowManager.LayoutParams
D/CrashAnrDetector( 2347): processName: com.guessSound.guessSound
D/CrashAnrDetector( 2347): broadcastEvent : com.guessSound.guessSound data_app_crash
D/STATUSBAR-BatteryController( 8423): onReceive() - ACTION_BATTERY_CHANGED
D/STATUSBAR-BatteryController( 8423): onReceive() - BATTERY_STATUS_CHARGING:
D/webviewglue(28777): nativeDestroy view: 0x5979cee0
D/webviewglue(28777): nativeDestroy view: 0x59c399f0
D/STATUSBAR-IconMerger( 8423): checkOverflow(240), More:false, Req:false Child:2
D/STATUSBAR-PhoneStatusBar( 8423): mBrightnessEnablebySettings = true mBrightnessEnablebyBattery = true mBrightnessEnablebyDisableFlag = true
D/STATUSBAR-AirplaneModeQuickSettingButton( 8423): mPhoneStateListener - inAirplaneMode: false
D/STATUSBAR-NetworkController( 8423): onServiceStateChanged state=0
D/STATUSBAR-NetworkController( 8423): updateDataNetType()
D/STATUSBAR-NetworkController( 8423): Nothing, mRoamingIconId = 0
D/WindowManager( 2347): computeScreenConfigurationLocked() set config.orientation=1 dw=720 dh=1280 Callers=com.android.server.wm.WindowManagerService.updateOrientationFromAppTokensLocked:5171 com.android.server.wm.WindowManagerService.updateOrientationFromAppTokens:5142 com.android.server.am.ActivityStack.realStartActivityLocked:1021
I/SurfaceFlinger( 1935): id=2621 createSurf (1x1),1 flag=4, huessSound
D/PowerManagerService( 2347): setKeyboardVisibility: false
I/GATE (28777): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
I/InputDispatcher( 2347): Delivering touch to: action: 0x0
I/InputDispatcher( 2347): Delivering touch to: action: 0x1
D/WifiController( 2347): SET_AP_BOOSTER_FLAG ignored due to state change
D/WifiService( 2347): onDataConnectionStateChanged: state -2, networkType - UMTS
D/STATUSBAR-NetworkController( 8423): onDataConnectionStateChanged: state=2 type=3
D/STATUSBAR-NetworkController( 8423): updateDataNetType()
D/STATUSBAR-NetworkController( 8423): Nothing, mRoamingIconId = 0
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
D/ContextualPageReceiver(20224): mContextualPageReceiver: ACTION_SERVICE_STATE_CHANGED isRoaming : false
D/STATUSBAR-IconMerger( 8423): checkOverflow(240), More:false, Req:false Child:2
W/ActivityManager( 2347): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
E/DatabaseUtils( 2347): Writing exception to parcel
E/DatabaseUtils( 2347): java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
E/DatabaseUtils( 2347): at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13140)
E/DatabaseUtils( 2347): at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
E/DatabaseUtils( 2347): at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:607)
E/DatabaseUtils( 2347): at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
E/DatabaseUtils( 2347): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
E/DatabaseUtils( 2347): at android.os.Binder.execTransact(Binder.java:388)
E/DatabaseUtils( 2347): at com.android.server.SystemServer.init1(Native Method)
E/DatabaseUtils( 2347): at com.android.server.SystemServer.main(SystemServer.java:2012)
E/DatabaseUtils( 2347): at java.lang.reflect.Method.invokeNative(Native Method)
E/DatabaseUtils( 2347): at java.lang.reflect.Method.invoke(Method.java:525)
E/DatabaseUtils( 2347): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
E/DatabaseUtils( 2347): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
E/DatabaseUtils( 2347): at dalvik.system.NativeStart.main(Native Method)
I/power ( 2347): *** release_dvfs_lock : lockType : 1
I/power ( 2347): *** acquire_dvfs_lock : lockType : 1 freq : 1200000
D/SSRMv2:CustomFrequencyManagerService( 2347): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 tag : ACTIVITY_RESUME_BOOSTER#5
D/SSRMv2:CustomFrequencyManagerService( 2347): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 pkgName : ACTIVITY_RESUME_BOOSTER#5
W/ActivityManager( 2347): mDVFSHelper.acquire()
V/RealCellState( 2689): telephonyManager network type is 3
D/PhoneApp( 2708): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED
D/AbsListView(28777): unregisterIRListener() is called
D/FileWriteThread( 2708): FileWriteThread : threadType = 2
D/NotificationMgr( 2708): hideDataDisconnectedRoaming()...
D/MobileDataStateTracker( 2347): default: Received state=CONNECTED, old=CONNECTED, reason=(unspecified)
D/AbsListView(28777): Get MotionRecognitionManager
D/MotionRecognitionService( 2347): ssp status : false
D/dalvikvm(28777): GC_FOR_ALLOC freed 6233K, 27% free 20403K/27816K, paused 57ms, total 57ms
D/StatusChecker(29074): onReceive : android.intent.action.SERVICE_STATE
D/StatusChecker(29074): Service state changed : 0
D/STATUSBAR-NetworkController( 8423): onDataActivity: direction=2
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
I/BootupListener( 2708): mPendingNetworkManualSelection : false
W/FlurryAgent(28777): Continuing previous session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 0
D/AbsListView(28777): unregisterIRListener() is called
D/WindowManager( 2347): computeScreenConfigurationLocked() set config.orientation=1 dw=720 dh=1280 Callers=com.android.server.wm.WindowManagerService.updateOrientationFromAppTokensLocked:5171 com.android.server.wm.WindowManagerService.updateOrientationFromAppTokens:5142 com.android.server.am.ActivityStack.realStartActivityLocked:1021
D/PowerManagerService( 2347): setKeyboardVisibility: false
D/webviewglue(28777): nativeDestroy view: 0x596c5bb0
D/webviewglue(28777): nativeDestroy view: 0x57dc5168
I/SurfaceFlinger( 1935): id=2622 createSurf (1x1),1 flag=4, OewGameActi
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): Get MotionRecognitionManager
D/MotionRecognitionService( 2347): ssp status : false
D/dalvikvm( 2896): GC_CONCURRENT freed 410K, 30% free 10387K/14804K, paused 4ms+4ms, total 44ms
W/FlurryAgent(28777): Continuing previous session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 0
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): unregisterIRListener() is called
D/dalvikvm(28777): GC_CONCURRENT freed 651K, 23% free 21680K/27816K, paused 11ms+6ms, total 58ms
I/SurfaceFlinger( 1935): id=2623 createSurf (720x1280),1 flag=4, OewGameActi
D/dalvikvm(28826): GC_EXPLICIT freed 1284K, 19% free 11047K/13512K, paused 4ms+16ms, total 93ms
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): unregisterIRListener() is called
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
I/power ( 2347): *** release_dvfs_lock : lockType : 1
D/SSRMv2:CustomFrequencyManagerService( 2347): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 tag : ACTIVITY_RESUME_BOOSTER#5
W/ActivityManager( 2347): mDVFSHelper.release()
I/power ( 2347): *** acquire_dvfs_lock : lockType : 1 freq : 1200000
D/AbsListView(28777): unregisterIRListener() is called
D/SSRMv2:CustomFrequencyManagerService( 2347): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 pkgName : ACTIVITY_RESUME_BOOSTER#8
D/MoPub (28777): Ad Unit (9228ebfca6504982941c5601765f658a) going invisible: disabling refresh
D/MoPub (28777): Automatic refresh for com.mopub.mobileads.AdConfiguration#42d65750 set to: false.
D/STATUSBAR-NetworkController( 8423): onDataActivity: direction=0
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
I/SurfaceFlinger( 1935): id=2622 Removed OewGameActi (3/7)
I/SurfaceFlinger( 1935): id=2622 Removed OewGameActi (-2/7)
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
W/FlurryAgent(28777): Trying to end session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getBestProvider(Criteria[power=NO_REQ acc=---], true)=null
W/FlurryAgent(28777): Trying to end session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getBestProvider(Criteria[power=NO_REQ acc=---], true)=null
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
I/power ( 2347): *** release_dvfs_lock : lockType : 1
D/SSRMv2:CustomFrequencyManagerService( 2347): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 tag : ACTIVITY_RESUME_BOOSTER#8
UPDATE
Here is my Android manifest, Im develop the app in phonegap and use therefore a plugin for the purchase, the java code is below the manifest
<manifest android:hardwareAccelerated="true" android:versionCode="5" android:versionName="1.3.0" android:windowSoftInputMode="adjustPan" package="com.guessSound.guessSound" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<application android:debuggable="false" android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name" android:name="com.guessSound.guessSound.MainApplication">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:name="com.guessSound.guessSound.GuessThisSound" android:screenOrientation="portrait" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
</manifest>
I do first buy it and then consume it, because it looks like I cant buy a consume item while testing with the test productID
private void buy(final String sku){
/* TODO: for security, generate your payload here for verification. See the comments on
* verifyDeveloperPayload() for more info. Since this is a sample, we just use
* an empty string, but on a production app you should generate this. */
final String payload = "";
if (mHelper == null){
callbackContext.error("Billing plugin was not initialized");
return;
}
this.cordova.setActivityResultCallback(this);
mHelper.launchPurchaseFlow(cordova.getActivity(), sku, RC_REQUEST,
mPurchaseFinishedListener, payload);
}
private void consumePurchase(JSONArray data) throws JSONException{
if (mHelper == null){
callbackContext.error("Did you forget to initialize the plugin?");
return;
}
String sku = data.getString(0);
// Get the purchase from the inventory
Purchase purchase = myInventory.getPurchase(sku);
if (purchase != null)
// Consume it
mHelper.consumeAsync(purchase, mConsumeFinishedListener);
else
callbackContext.error(sku + " is not owned so it cannot be consumed");
}
UPDATE 2.0
Im calling the consumePurchase in the successmethod to buy. Could this cause the problem? After I remove the consumepurchase in the successmethod, it looks like I don't get that error.. So how can I buy a consume item without using consumepurchase right after I have bought the item? Could it work if I add a timer, or is it any better solution to this?
User 0 usually indicates root. Are you running your app as root?

Categories

Resources