Have a fragment implemented that has multiple horizontal scrollviews. When i scroll it multiple times it simply blacks out and on popback the complete application gets blacked out, until the system creates a new instance of activity.
To be noted : Not using hardware accelerator
Couldn't understand a thing given here.
Tried to lookup solution not an option have to use scroll view
LOGCAT
01-20 21:35:18.737 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
01-20 21:35:18.737 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <gsl_ldd_control:475>: ioctl fd 27 code 0x40080921 (IOCTL_KGSL_SHAREDMEM_FREE) failed: errno 22 Invalid argument
01-20 21:35:18.746 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <sharedmem_gpumem_alloc_id:2260>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
01-20 21:35:18.748 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
01-20 21:35:18.757 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <sharedmem_gpumem_alloc_id:2260>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
01-20 21:35:18.759 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
01-20 21:35:18.768 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <sharedmem_gpumem_alloc_id:2260>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
01-20 21:35:18.770 29857-30181/com.amplitude.tron.volksradio22 E/Adreno-GSL: <gsl_memory_alloc_pure:1971>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
01-20 21:35:18.770 29857-30181/com.amplitude.tron.volksradio22 W/Adreno-GSL: <gsl_ldd_control:475>: ioctl fd 27 code 0x40080921 (IOCTL_KGSL_SHAREDMEM_FREE) failed: errno 22 Invalid argument
01-20 21:35:18.778 29857-30181/com.amplitude.tron.volksradio22 E/OpenGLRenderer: GL error: Out of memory!
01-20 21:35:53.215 29857-29857/com.amplitude.tron.volksradio22 W/SplitWindow: update focus...
Got the OOM exception covered by adding this to the manifest :
android:largeHeap="true"
Hello everybody
I'm trying to show in a WebView a video from url, it is streaming and this is an example of the Url:
https://rapidresponse-us-oem-relay11.mios.com/relay/relay/relay/device/36050280/session/0144E086FE4180BB14CFA858AE7FE05757ED73/port_3480/data_request?id=serve_stream&cam=12&stream=29&res=low
I already did the IOS application and it works fine, so I know that the url don't have any problem.
I'm trying to show the video in the WebView with the following code:
if(message.getMessageType() == 0) {
webView_camera.getSettings().setDomStorageEnabled(true);
webView_camera.loadUrl(cameraUrl);
}
I tried to use this
webView_camera.setWebChromeClient(new WebChromeClient());
But it doesn't work either
When the application run only show int the webview the icon of failure to load an image.
I'm pretty new with this so any help will be appreciated it
UPDATE
This is the Logs that I get from android:
11-11 09:32:25.268 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/WebViewFactory: Loading com.google.android.webview version 46.0.2490.76 (code 249007600)
11-11 09:32:25.294 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/cr.library_loader: Time to load native libraries: 2 ms (timestamps 2963-2965)
11-11 09:32:25.294 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/cr.library_loader: Expected native library version number "46.0.2490.76", actual native library version number "46.0.2490.76"
11-11 09:32:25.306 8316-8316/com.realstatediary.jperera.rapidsentrymaster V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {b23e619}
11-11 09:32:25.307 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/cr.library_loader: Expected native library version number "46.0.2490.76", actual native library version number "46.0.2490.76"
11-11 09:32:25.309 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/chromium: [INFO:library_loader_hooks.cc(118)] Chromium logging enabled: level = 0, default verbosity = 0
11-11 09:32:25.329 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/cr.BrowserStartup: Initializing chromium process, singleProcess=true
11-11 09:32:25.336 8316-8316/com.realstatediary.jperera.rapidsentrymaster E/SysUtils: ApplicationContext is null in ApplicationStatus
11-11 09:32:25.417 8316-8316/com.realstatediary.jperera.rapidsentrymaster E/chromium: [ERROR:browser_gpu_channel_host_factory.cc(258)] Failed to init browser shader disk cache.
11-11 09:32:25.445 8316-8316/com.realstatediary.jperera.rapidsentrymaster E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
11-11 09:32:25.449 8316-8774/com.realstatediary.jperera.rapidsentrymaster W/cr.media: Requires BLUETOOTH permission
11-11 09:32:25.471 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
11-11 09:32:25.472 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
11-11 09:32:25.526 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingWebActionModeCallback>
11-11 09:32:25.526 8316-8316/com.realstatediary.jperera.rapidsentrymaster I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingWebActionModeCallback>
11-11 09:32:25.554 8316-8316/com.realstatediary.jperera.rapidsentrymaster W/art: Attempt to remove local handle scope entry from IRT, ignoring
11-11 09:32:25.562 8316-8316/com.realstatediary.jperera.rapidsentrymaster W/AwContents: onDetachedFromWindow called when already detached. Ignoring
11-11 09:32:30.958 8316-8316/com.realstatediary.jperera.rapidsentrymaster W/cr.BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 8316
11-11 09:33:18.836 8316-8398/com.realstatediary.jperera.rapidsentrymaster D/PULLBACK: Executing background pull from server
I finally did!
This the solution:
if(message.getMessageType() == 0) {
StringBuilder html = new StringBuilder();
html.append("<html>");
html.append("<head>");
html.append("</head>");
html.append("<body>");
html.append("<div id ='main'><img class=\"video_player_frame\"src=\""+cameraUrl+" style=\"top: 0px; border: none; width: 100%; height: 100%;\"></div>");
html.append("</body>");
html.append("</html>");
webView_camera.loadData(html.toString(),"text/html", "UTF-8");
}
I have a Hybrid app created using MobileFirst Platform 7 that is working perfectly on a number of physical Android devices, AVDs, as well as the MFP Console Preview/Emulator. In all cases, the devices and the AVDs are running KitKat (v4.4.4).
For persistence of information, I am using the JSONStore Javascript API.
However, on one single device (A Panasonic Toughpad FZ-B2). The JSONstore refuses to initialize and all it throws the PERSISTENT_STORE_FAILURE failure when trying to init the collection.
Believing it may be my code, I downloaded, compiled and installed the sample JSONStore JavaScript API project from the MFP Developer Center.
I installed this to all devices (A Samsung Galaxy Tab2, Sony Xperia Z3, THL T6S, and the Toughpad). On all devices the application runs happily, but on the ToughPad, I again get PERSISTENT_STORE_FAILURE.
What do I do to investigate/resolve the cause?
A screenshot of the error and what I believe is relevant information on the device: http://files.interestingmix.com.au/stack/toughpadJSON.png
I have tried compiling the apk with API levels 19 and 22 to no difference in behavior (on the devices it worked, it always works, but the toughpad does not co-operate)
UPDATE
I have been able to change the runtime on the device from Dalvik (Old) to ART (new), and now the error thrown is OPERATION_FAILED_ON_SPECIFIC_DOCUMENT (same place in the Getting Started App (at the bottom), so need new for another screenshot), which I am now investigating
UPDATE 2 (Revised with Toughpad Results)
I was finally able to get an ADB Conn ection to the Toughpad device and therefore get LogCat. It seems the error is related to trying to open libcrypto.so.1.0.0. From what I can ascertain the library file required is not present in the package for the specific runtime. (Note I have returned the device to running on Dalvik as this is supposedly the more stable and supported base for KitKat)
Could this be to do with the Tougpad device (I suspect) being an x86_64 bit runtime, and therefore the libraries are not supplied? How do we check/resolve this?
Logcat output is as follows:
04-10 05:02:31.810: D/dalvikvm(6889): Late-enabling CheckJNI
04-10 05:02:31.810: D/dalvikvm(6889): Try to disable coredump for pid 6889
04-10 05:02:31.810: D/dalvikvm(6889): Process 6889 nice name: com.JSONStoreAPI
04-10 05:02:31.810: D/dalvikvm(6889): Extra Options: not specified
04-10 05:02:31.830: E/jdwp(6889): Failed sending reply to debugger: Broken pipe
04-10 05:02:31.830: D/dalvikvm(6889): Debugger has detached; object registry had 1 entries
04-10 05:02:31.840: I/CordovaLog(6889): Changing log level to DEBUG(3)
04-10 05:02:31.850: W/WLClient(6889): WLClient.createInstance in WLClient.java:220 :: You should pass a context that is assignable from the Activity class. WLClient instance may be used to start an activity.
04-10 05:02:31.900: D/wl.splashscreen(6889): WLSplashScreen.show in WLSplashScreen.java:64 :: Showing Splash Screen
04-10 05:02:31.910: D/CordovaActivity(6889): Resuming the App
04-10 05:02:31.910: D/WLClient(6889): WLClient$ActivityListener.onActivityStarted in WLClient.java:1434 :: on activity started com.JSONStoreAPI.JSONStoreAPI
04-10 05:02:31.920: D/WLClient(6889): WLClient$ActivityListener.onActivityResumed in WLClient.java:1423 :: on activity resumed com.JSONStoreAPI.JSONStoreAPI . activity count = 1
04-10 05:02:31.920: D/prepackagedAssetManager(6889): PrepackagedAssetsManager.copyPrepackagedAssetsToLocalStorage in PrepackagedAssetsManager.java:68 :: New installation/upgrade detected, copying resources and saving new checksum
04-10 05:02:31.940: I/ufoGralloc(6889): Hello, this is UFO GRALLOC/Intel Corporation
04-10 05:02:31.940: D/(6889): droid_create_context : config id = 5 conf->NativeVisualID=1
04-10 05:02:31.940: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:31.940: I/(6889): Requested context : GLES 2.0
04-10 05:02:31.950: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:31.950: D/OpenGLRenderer(6889): Enabling debug mode 0
04-10 05:02:31.950: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:31.960: D/wl(6889): WL.doPrepareAssetsWork in WL.java:293 :: no need to check web resource integrity
04-10 05:02:32.000: D/CordovaActivity(6889): CordovaActivity.init()
04-10 05:02:32.000: V/WebViewChromiumFactoryProvider(6889): Binding Chromium to main looper Looper (main, tid 1) {26733be0}
04-10 05:02:32.000: I/LibraryLoader(6889): Expected native library version number "",actual native library version number ""
04-10 05:02:32.010: I/chromium(6889): [INFO:library_loader_hooks.cc(116)] Chromium logging enabled: level = 0, default verbosity = 0
04-10 05:02:32.010: I/BrowserStartupController(6889): Initializing chromium process, renderers=0
04-10 05:02:32.020: E/AudioManagerAndroid(6889): BLUETOOTH permission is missing!
04-10 05:02:32.020: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:32.020: D/(6889): droid_create_context : config id = 1 conf->NativeVisualID=1
04-10 05:02:32.020: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:32.020: I/(6889): Requested context : GLES 2.0
04-10 05:02:32.050: W/chromium(6889): [WARNING:proxy_service.cc(890)] PAC support disabled because there is no system implementation
04-10 05:02:32.060: D/CordovaWebView(6889): CordovaWebView is running on device made by: PANASONIC
04-10 05:02:32.060: D/CordovaActivity(6889): CordovaActivity.createViews()
04-10 05:02:32.060: D/CordovaWebView(6889): >>> loadUrl(file:///android_asset/www/skinLoader.html)
04-10 05:02:32.060: D/PluginManager(6889): init()
04-10 05:02:32.060: I/dalvikvm(6889): Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method com.worklight.androidgap.plugin.WLInitializationPlugin.initialize
04-10 05:02:32.060: W/dalvikvm(6889): VFY: unable to resolve virtual method 580: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
04-10 05:02:32.060: D/dalvikvm(6889): VFY: replacing opcode 0x6e at 0x001a
04-10 05:02:32.140: D/CordovaWebView(6889): >>> loadUrlNow()
04-10 05:02:32.150: D/SoftKeyboardDetect(6889): Ignore this event
04-10 05:02:32.190: D/CordovaWebViewClient(6889): onPageStarted(file:///android_asset/www/skinLoader.html)
04-10 05:02:32.190: D/CordovaActivity(6889): onMessage(onPageStarted,file:///android_asset/www/skinLoader.html)
04-10 05:02:32.250: D/JsMessageQueue(6889): Set native->JS mode to OnlineEventsBridgeMode
04-10 05:02:32.250: D/CordovaWebViewClient(6889): onPageFinished(file:///android_asset/www/skinLoader.html)
04-10 05:02:32.250: D/CordovaActivity(6889): onMessage(onPageFinished,file:///android_asset/www/skinLoader.html)
04-10 05:02:32.390: V/StatusBar(6889): StatusBar: initialization
04-10 05:02:32.390: V/StatusBar(6889): Executing action: _ready
04-10 05:02:32.400: W/CordovaPlugin(6889): Attempted to send a second callback for ID: StatusBar1173806884
04-10 05:02:32.400: W/CordovaPlugin(6889): Result was: "Invalid action"
04-10 05:02:32.410: D/CordovaActivity(6889): onMessage(spinner,stop)
04-10 05:02:32.450: D/skuwa(6889): Detected device 0F31:14 family 15:9
04-10 05:02:32.760: D/CordovaNetworkManager(6889): Connection Type: wifi
04-10 05:02:32.760: D/CordovaNetworkManager(6889): Connection Extra Info: "eBlueprint-X6-anac2"
04-10 05:02:32.770: D/CordovaNetworkManager(6889): Connection Type: wifi
04-10 05:02:32.770: D/CordovaNetworkManager(6889): Connection Extra Info: "eBlueprint-X6-anac2"
04-10 05:02:32.770: D/CordovaActivity(6889): onMessage(networkconnection,wifi)
04-10 05:02:32.800: W/PluginManager(6889): THREAD WARNING: exec() call to WLApp.writeUserPref blocked the main thread for 22ms. Plugin should use CordovaInterface.getThreadPool().
04-10 05:02:32.810: D/CordovaWebViewClient(6889): onPageStarted(file:///android_asset/www/default/index.html)
04-10 05:02:32.810: D/JsMessageQueue(6889): Set native->JS mode to null
04-10 05:02:32.810: D/CordovaActivity(6889): onMessage(onPageStarted,file:///android_asset/www/default/index.html)
04-10 05:02:32.850: W/chromium(6889): [WARNING:simple_index_file.cc(338)] Could not map Simple Index file.
04-10 05:02:32.850: I/chromium(6889): [INFO:simple_index_file.cc(437)] Simple Cache Index is being restored from disk.
04-10 05:02:32.860: D/JsMessageQueue(6889): Set native->JS mode to OnlineEventsBridgeMode
04-10 05:02:33.200: V/StatusBar(6889): Executing action: _ready
04-10 05:02:33.200: W/CordovaPlugin(6889): Attempted to send a second callback for ID: StatusBar1365464329
04-10 05:02:33.200: W/CordovaPlugin(6889): Result was: "Invalid action"
04-10 05:02:33.200: D/CordovaActivity(6889): onMessage(spinner,stop)
04-10 05:02:33.210: D/CordovaNetworkManager(6889): Connection Type: wifi
04-10 05:02:33.210: D/CordovaNetworkManager(6889): Connection Extra Info: "eBlueprint-X6-anac2"
04-10 05:02:34.260: D/CordovaActivity(6889): onMessage(spinner,stop)
04-10 05:02:37.860: D/CordovaLog(6889): file:///android_asset/www/default/worklight/cordova.js: Line 1171 : deviceready has not fired after 5 seconds.
04-10 05:02:37.860: I/chromium(6889): [INFO:CONSOLE(1171)] "deviceready has not fired after 5 seconds.", source: file:///android_asset/www/default/worklight/cordova.js (1171)
04-10 05:02:37.870: D/CordovaLog(6889): file:///android_asset/www/default/worklight/cordova.js: Line 1164 : Channel not fired: onDOMContentLoaded
04-10 05:02:37.870: I/chromium(6889): [INFO:CONSOLE(1164)] "Channel not fired: onDOMContentLoaded", source: file:///android_asset/www/default/worklight/cordova.js (1164)
04-10 05:03:52.370: D/dalvikvm(6889): Debugger has detached; object registry had 1 entries
04-10 05:03:59.810: D/CordovaActivity(6889): Paused the application!
04-10 05:03:59.810: D/CordovaWebView(6889): Handle the pause
04-10 05:03:59.810: D/WLClient(6889): WLClient$ActivityListener.onActivityPaused in WLClient.java:1416 :: on activity paused com.JSONStoreAPI.JSONStoreAPI . activity count = 0
04-10 05:03:59.880: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:03:59.900: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:04:00.140: D/WLClient(6889): WLClient$ActivityListener.onActivitySaveInstanceState in WLClient.java:1428 :: on activity save instance state com.JSONStoreAPI.JSONStoreAPI
04-10 05:04:00.140: D/WLClient(6889): WLClient$ActivityListener.onActivityStopped in WLClient.java:1440 :: on activity stopped com.JSONStoreAPI.JSONStoreAPI
04-10 05:04:00.150: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:04:01.410: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:04:01.410: D/CordovaActivity(6889): Resuming the App
04-10 05:04:01.410: D/WLClient(6889): WLClient$ActivityListener.onActivityStarted in WLClient.java:1434 :: on activity started com.JSONStoreAPI.JSONStoreAPI
04-10 05:04:01.410: D/WLClient(6889): WLClient$ActivityListener.onActivityResumed in WLClient.java:1423 :: on activity resumed com.JSONStoreAPI.JSONStoreAPI . activity count = 1
04-10 05:04:01.440: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:04:40.270: I/dalvikvm(6889): Total arena pages for JIT: 11
04-10 05:04:40.290: D/CordovaWebViewClient(6889): onPageFinished(file:///android_asset/www/default/index.html)
04-10 05:04:40.290: D/CordovaActivity(6889): onMessage(onPageFinished,file:///android_asset/www/default/index.html)
04-10 05:04:40.320: D/NONE(6889): ondeviceready event dispatched
04-10 05:04:40.360: D/NONE(6889): wlclient init started
04-10 05:04:40.360: D/NONE(6889): Read cookies: null
04-10 05:04:40.360: D/NONE(6889): CookieMgr read cookies: {}
04-10 05:04:40.370: W/NONE(6889): Note that if your application targets Android 3.0 (API level 11) or higher, WL.OptionsMenu might have no effect, depending on the device.
04-10 05:04:40.410: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:04:40.410: D/NONE(6889): before: initOptions.onSuccess
04-10 05:04:40.430: I/dalvikvm(6889): Could not find method com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable, referenced from method com.worklight.wlclient.push.common.GCMClientFactory.useGooglePlayServices
04-10 05:04:40.430: W/dalvikvm(6889): VFY: unable to resolve static method 721: Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable (Landroid/content/Context;)I
04-10 05:04:40.430: D/dalvikvm(6889): VFY: replacing opcode 0x71 at 0x0006
04-10 05:04:40.430: D/GCMClientFactory(6889): GCMClientFactory.useGooglePlayServices in GCMClientFactory.java:42 :: Google Play Services is not used because the play services library is not found. So using the default GCM helper implementation.
04-10 05:04:40.440: D/GCMClientFactory(6889): GCMClientFactory.getInstance in GCMClientFactory.java:28 :: Using GCMHelperClient
04-10 05:04:40.440: W/GCMHelperClient(6889): GCMHelperClient.unregisterReceivers in GCMHelperClient.java:95 :: unregister:Receiver not registered: null
04-10 05:04:40.440: W/GCMHelperClient(6889): GCMHelperClient.unregisterReceivers in GCMHelperClient.java:101 :: unregister:Receiver not registered: null
04-10 05:04:40.450: D/NONE(6889): after: initOptions.onSuccess
04-10 05:04:40.460: D/NONE(6889): added onPause and onResume event handlers
04-10 05:04:40.460: D/NONE(6889): wlclient init success
04-10 05:04:45.360: D/CordovaLog(6889): : Line 0 : event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
04-10 05:04:45.360: I/chromium(6889): [INFO:CONSOLE(0)] "event.returnValue is deprecated. Please use the standard event.preventDefault() instead.", source: (0)
04-10 05:04:45.390: D/com.worklight.nativeandroid.common.WLUtils(6889): WLUtils.loadLib in WLUtils.java:545 :: Extracting zip file: featurelibs/armeabi/libcrypto.so.1.0.0
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 12
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 13
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 14
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 15
04-10 05:04:45.490: D/dalvikvm(6889): Trying to load lib /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0 0x4ce6b1d0
04-10 05:04:45.490: D/com.worklight.nativeandroid.common.WLUtils(6889): WLUtils.loadLib in WLUtils.java:555 :: Loading library using System.load: /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0
04-10 05:04:45.530: D/houdini(6889): [7174] Loading library(version: 4.0.6.44921 RELEASE)... successfully.
04-10 05:04:45.540: D/dalvikvm(6889): Added shared lib /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0 0x4ce6b1d0
04-10 05:04:45.540: D/dalvikvm(6889): No JNI_OnLoad found in /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0 0x4ce6b1d0, skipping init
04-10 05:04:45.560: I/NONE(6889): Destroy finished succesfully
04-10 05:04:48.920: D/dalvikvm(6889): GC_FOR_ALLOC freed 2437K, 26% free 7398K/9880K, paused 5ms, total 5ms
04-10 05:04:48.980: D/dalvikvm(6889): Trying to load lib /data/app-lib/com.JSONStoreAPI-1/libstlport_shared.so 0x4ce6b1d0
04-10 05:04:48.980: D/dalvikvm(6889): Added shared lib /data/app-lib/com.JSONStoreAPI-1/libstlport_shared.so 0x4ce6b1d0
04-10 05:04:48.980: D/dalvikvm(6889): No JNI_OnLoad found in /data/app-lib/com.JSONStoreAPI-1/libstlport_shared.so 0x4ce6b1d0, skipping init
04-10 05:04:48.980: D/dalvikvm(6889): Trying to load lib /data/app-lib/com.JSONStoreAPI-1/libsqlcipher_android.so 0x4ce6b1d0
04-10 05:04:48.980: E/dalvikvm(6889): dlopen("/data/app-lib/com.JSONStoreAPI-1/libsqlcipher_android.so") failed: dlopen failed: could not load library "libcrypto.so.1.0.0" needed by "libsqlcipher_android.so"; caused by library "libcrypto.so.1.0.0" not found
04-10 05:04:48.990: E/JSONSTORE(6889): JSONStoreLogger.logError in JSONStoreLogger.java:189 :: Error during provision
04-10 05:04:48.990: E/JSONSTORE(6889): java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libcrypto.so.1.0.0" needed by "libsqlcipher_android.so"; caused by library "libcrypto.so.1.0.0" not found
04-10 05:04:48.990: E/JSONSTORE(6889): at java.lang.Runtime.loadLibrary(Runtime.java:364)
04-10 05:04:48.990: E/JSONSTORE(6889): at java.lang.System.loadLibrary(System.java:526)
04-10 05:04:48.990: E/JSONSTORE(6889): at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:142)
04-10 05:04:48.990: E/JSONSTORE(6889): at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:136)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.jsonstore.database.DatabaseManager.openDatabaseIfNecessary(DatabaseManager.java:179)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.jsonstore.database.DatabaseManager.checkDatabaseAgainstSchema(DatabaseManager.java:98)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.jsonstore.database.DatabaseSchema.isSchemaMismatched(DatabaseSchema.java:416)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.jsonstore.api.WLJSONStore.provisionDatabase(WLJSONStore.java:149)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.jsonstore.api.WLJSONStore.openCollections(WLJSONStore.java:345)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.androidgap.jsonstore.dispatchers.ProvisionActionDispatcher.initializeCollection(ProvisionActionDispatcher.java:146)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.androidgap.jsonstore.dispatchers.ProvisionActionDispatcher.databaseActionDispatch(ProvisionActionDispatcher.java:132)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.androidgap.jsonstore.dispatchers.BaseDatabaseActionDispatcher.actionDispatch(BaseDatabaseActionDispatcher.java:36)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.androidgap.jsonstore.dispatchers.BaseActionDispatcher.dispatch(BaseActionDispatcher.java:90)
04-10 05:04:48.990: E/JSONSTORE(6889): at com.worklight.androidgap.plugin.DispatchingPlugin$ActionDispatcherRunnable.run(DispatchingPlugin.java:79)
04-10 05:04:48.990: E/JSONSTORE(6889): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
04-10 05:04:48.990: E/JSONSTORE(6889): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
04-10 05:04:48.990: E/JSONSTORE(6889): at java.lang.Thread.run(Thread.java:841)
04-10 05:04:49.000: I/NONE(6889): PERSISTENT_STORE_FAILURE
04-10 05:04:49.000: E/wl.jsonstore(6889): {"src":"initCollection","err":-1,"msg":"PERSISTENT_STORE_FAILURE","col":"people","usr":"jsonstore","doc":{},"res":{}}
04-10 05:05:35.740: D/CordovaActivity(6889): Paused the application!
04-10 05:05:35.740: D/CordovaWebView(6889): Handle the pause
04-10 05:05:35.740: D/WLClient(6889): WLClient$ActivityListener.onActivityPaused in WLClient.java:1416 :: on activity paused com.JSONStoreAPI.JSONStoreAPI . activity count = 0
04-10 05:05:35.750: D/NONE(6889): Flush called
04-10 05:05:35.770: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:05:35.780: D/WLClient(6889): WLClient$ActivityListener.onActivitySaveInstanceState in WLClient.java:1428 :: on activity save instance state com.JSONStoreAPI.JSONStoreAPI
04-10 05:05:35.780: D/WLClient(6889): WLClient$ActivityListener.onActivityStopped in WLClient.java:1440 :: on activity stopped com.JSONStoreAPI.JSONStoreAPI
04-10 05:05:35.790: W/IInputConnectionWrapper(6889): showStatusIcon on inactive InputConnection
The JSONSTORE Code is the application from the Getting Started MFP Developer Center as I wanted to use clean trusted code base (for brevity and length limitations on the post, only the relevant sections of main.js are provided):
//Dependencies
var $ = jQuery,
_ = lodash;
//CONSTANTS
var PEOPLE_COLLECTION_NAME = 'people',
KEY_VALUE_COLLECTION_NAME = 'keyvalue',
INIT_FIRST_MSG = 'PERSISTENT_STORE_NOT_OPEN',
NAME_FIELD_EMPTY_MSG = 'Name field is empty',
AGE_FIELD_EMPTY_MSG = 'Age field is empty',
ID_FIELD_EMPTY_MSG = 'Id field is empty',
EMPTY_TABLE_MSG = 'No documents found',
DESTROY_MSG = 'Destroy finished succesfully',
INIT_MSG = 'Collection initialized',
ADD_MSG = 'Data added to the collection',
REPLACE_MSG = 'Document replaced succesfully, call find.',
REMOVE_MSG = 'Documents removed: ',
COUNT_MSG = 'Documents in the collection: ',
CLOSE_ALL_MSG = 'JSONStore closed',
REMOVE_COLLECTION_MSG = 'Removed all data in the collection',
LOAD_MSG = 'New documents loaded from adapter: ',
PUSH_MSG_FAILED = 'Could not push some docs, res: ',
PUSH_MSG = 'Push finished',
PASS_CHANGED_MSG = 'Password changed succesfully',
COUNT_QUERY_ERROR_MSG = 'FIND_BY_QUERY_EXPECTED_A_STRING',
COUNT_QUERY_MSG = "Documents in the collection with name = ";
...
...
...
...
...
//init
$('button#init').on('click', function () {
//Get references to the input fields DOM elements
var usernameField = $('input#init-username'),
passwordField = $('input#init-password');
//Get values from the input fields
var username = usernameField.val() || '',
password = passwordField.val() || '';
//Create the optional options object passed to init
var options = {};
//Check if a username was passed
if (username.length > 0) {
options.username = username;
}
//If if a password was passed
if (password.length > 0) {
options.password = password;
}
//JSONStore collections metadata
var collections = {};
//Define the 'people' collection and list the search fields
collections[PEOPLE_COLLECTION_NAME] = {
searchFields : {name: 'string', age: 'integer'},
//-- Start optional adapter metadata
adapter : {
name: 'People',
add: 'addPerson',
remove: 'removePerson',
replace: 'replacePerson',
load: {
procedure: 'getPeople',
params: [],
key: 'peopleList'
}
}
//-- End optional adapter metadata
};
//Define the 'keyvalue' collection and use additional search fields
collections[KEY_VALUE_COLLECTION_NAME] = {
searchFields : {},
additionalSearchFields : { key: 'string' }
};
//Initialize the people collection
WL.JSONStore.init(collections, options)
.then(function () {
_logMessage(INIT_MSG);
_callEnhanceToAddKeyValueMethods();
})
.fail(function (errorObject) {
_logError(errorObject.msg);
});
});
It can't find libcrypto for the x86_64 architecture. This is a library that IBM MobileFirst Platform Foundation does not at this time.
You can submit request for enhancements at https://developer.ibm.com/mobilefirstplatform/help
I now have the app working on the Toughpad device by forcing the load of the "correct"
libcrypto.so zip file.
Looking at the logcat from the Panasonic toughpad, it unzipped the file for libcrypto from armeabi.
D/com.worklight.nativeandroid.common.WLUtils(6889): WLUtils.loadLib in WLUtils.java:545 :: Extracting zip file: featurelibs/armeabi/libcrypto.so.1.0.0
Analyzing this file checksum against the same-named zip file in the x86 folder, I noticed they were different
By deleting the libcrypto.so.1.0.0.zip file from
assets/featurelibs/armeabi and replacing it with the one from
assets/featurelibs/x86 I was able to run the app and the JSON store is
working perfectly, as are all other elements of the app (as far as
current testing shows). The 64bit aspect does not seem to make any
difference and was perhaps a red herring.
This screenshot shows what I mean about replacing the zip files
Does this mean there is something erroneous in the code generated to the
apk that causes the app to unzip asset files from the armeabi folder
even if it is running on an x86 platform?
The main drawback with this at the moment is that every time I build the Android environment, I need to perform the zip file replace again before deploying it to the device .
I had created a Phonegap android project in which I am trying to read a QRCode.For that I had included the library project Of BarcodeScanner from here https://github.com/wildabeast/BarcodeScanner .
But while I am trying to add this library to my PhoneGap Project , Initially it shows green symbol but after that it turns in red cross.
I think because of that I am getting this log in Logcat :
05-1512:48:37.489:D/DroidGap(863):onMessage(onPageFinished,file:///android_asset/www/index.html)
05-15 12:48:37.749: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.749: D/DroidGap(863): onMessage(networkconnection,3g)
05-15 12:48:37.758: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.768: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:38.138: D/dalvikvm(863): GC_FOR_ALLOC freed 222K, 4% free 8166K/8455K, paused 40ms, total 43ms
05-15 12:48:39.579: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:42.718: I/Choreographer(863): Skipped 30 frames! The application may be doing too much work on its main thread.
05-15 12:48:44.508: D/CordovaLog(863): Uncaught module cordova/plugin/BarcodeScanner not found
05-15 12:48:44.508: E/Web Console(863): Uncaught module cordova/plugin/BarcodeScanner not found at file:///android_asset/www/cordova-2.6.0.js:50
So I got stuck here.Any suggestion ?
I've created a number of TiStudio apps and pushed them to this device (HTC Incredible, Android 2.3.3) without issue.
But, starting today, any new apps crash with the following error:
I/TiRootActivity( 2122): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
I/TiApplication( 2149): (main) [0,0] checkpoint, app created.
I/TiApplication( 2149): (main) [89,89] Titanium 2.0.1 (2012/04/12 16:36 999c68a)
I/TiApplication( 2149): (main) [265,354] Titanium Javascript runtime: v8
E/TiApplication( 2149): (KrollRuntimeThread) [25,379] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared: findLibrary returned null; Titanium 2.0.1,2012/04/12 16:36,999c68a
E/TiApplication( 2149): java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared: findLibrary returned null
E/TiApplication( 2149): at java.lang.Runtime.loadLibrary(Runtime.java:429)
E/TiApplication( 2149): at java.lang.System.loadLibrary(System.java:554)
E/TiApplication( 2149): at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:55)
E/TiApplication( 2149): at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:163)
E/TiApplication( 2149): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:101)
I/TiRootActivity( 2149): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
This includes the default app created by TiStudio or an even an app with just Titanium.UI.setBackgroundColor('#000');
The strange thing is that my existing projects still work just fine, even after making code changes and recompiling.
Any idea what could cause this kind of behavior?