Issue when trying to show Video in WebView - android

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

Related

Error while implementing admob

I have implemented admob in my app.when the activity loads ,logcat shows some errors which i am not able to relate to admob.
LogCat:
W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
I/art: DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/arm64/data#data#com.google.android.gms#app_chimera#m#00000040#DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.apk#classes.dex' for file location '/data/data/com.google.android.gms/app_chimera/m/00000040/DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.apk': Failed to open oat filename for reading: No such file or directory
D/DynamitePackage: Instantiated singleton DynamitePackage.
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
D/WebViewFactory: primaryArchIs64bit = true
I/WebViewFactory: Loading com.google.android.webview version 64.0.3282.137 (code 328213750)
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/cr_LibraryLoader: Time to load native libraries: 2 ms (timestamps 8604-8606)
I/chromium: [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_LibraryLoader: Expected native library version number "64.0.3282.137", actual native library version number "64.0.3282.137"
I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
I/cr_base: Android Locale: en_IN requires .pak files: []
E/chromium: [ERROR:instance.cc(49)] Unable to locate service manifest for metrics
E/chromium: [ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$7>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$7>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$3>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$3>
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingActionModeCallback>
I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingActionModeCallback>
**W/cr_media: Requires BLUETOOTH permission
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
W/AudioCapabilities: Unsupported mime audio/evrc
W/AudioCapabilities: Unsupported mime audio/qcelp
W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
W/AudioCapabilities: Unsupported mime audio/qcelp
W/AudioCapabilities: Unsupported mime audio/evrc
W/VideoCapabilities: Unsupported mime video/mp4v-esdp
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es**
I/Ads: Updating ad debug logging enablement.
I/Ads: Starting ad request.
I/Ads: Use AdRequest.Builder.addTestDevice("*********") to get test ads on this device.
W/Ads: Not retrying to fetch app settings
I/Choreographer: Skipped 184 frames! The application may be doing too much work on its main thread.
W/Ads: Invoke Firebase method getInstance error.
W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
W/Ads: Update ad debug logging enablement as false
I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#3020318e time:246760805
W/cr_CrashFileManager: /data/data/com.sns.kids.maths.games/cache/WebView/Crash Reports does not exist or is not a directory
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/Ads: Scheduling ad refresh 70000 milliseconds from now.
I/Ads: Ad finished loading.
I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#16ae39cd time:246768461
The logcat says it requires bluetooth permission.I am getting this only when i am adding admob code.When i remove the admob it disappears.
Admob Code :
private void showBannerAds() {
MobileAds.initialize(this,getResources().getString(R.string.admob_appid));
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
}

Firebase SDK is out of date, no ad showing

I found here Android Studio - SDK is out of date or is missing templates I need to update in my SDK tools.
I see no option for Firebase.
I followed the AdMob instructions. A 403 "unable to show ad" error showed, then I switched my ad unit type to "Banner" and used the test banner unit id "ca-app-pub-3940256099942544/6300978111".
My onCreate in main activity:
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
MobileAds.initialize(this, "my addmob id ");
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
initialiseView();
}
My layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
android:layout_below="#+id/linearLayout">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
and my logs:
W/GooglePlayServicesUtil: Google Play Store is missing.
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play services is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
I/Ads: Starting ad request.
I/Ads: Use AdRequest.Builder.addTestDevice("C8DCA36186E6C4138C4E71BB102F78D2") to get test ads on this device.
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
W/Ads: Invoke Firebase method getInstance error.
W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
W/System: ClassLoader referenced unknown path: /system/app/webview/lib/x86
W/art: Before Android 4.1, method double java.util.concurrent.ThreadLocalRandom.internalNextDouble(double, double) would have incorrectly overridden the package-private method in java.util.Random
W/art: Before Android 4.1, method int java.util.concurrent.ThreadLocalRandom.internalNextInt(int, int) would have incorrectly overridden the package-private method in java.util.Random
W/art: Before Android 4.1, method long java.util.concurrent.ThreadLocalRandom.internalNextLong(long, long) would have incorrectly overridden the package-private method in java.util.Random
I/WebViewFactory: Loading com.android.webview version 51.0.2704.91 (code 275509110)
I/cr_LibraryLoader: Time to load native libraries: 6 ms (timestamps 8593-8599)
I/cr_LibraryLoader: Expected native library version number "51.0.2704.91", actual native library version number "51.0.2704.91"
D/MediaPlayer: setSubtitleAnchor in MediaPlayer
D/MediaPlayer: setSubtitleAnchor in MediaPlayer
D/MediaPlayer: setSubtitleAnchor in MediaPlayer
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.internal.zzflm>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/customtabs/CustomTabsServiceConnection;
I/art: at boolean com.google.android.gms.internal.zznn.zzi(android.content.Context) ((null):-1)
I/art: at void com.google.android.gms.internal.zzabv.<init>(android.content.Context, com.google.android.gms.internal.zzabu) ((null):-1)
I/art: at java.lang.Object com.google.android.gms.internal.zzabx.call() ((null):-1)
I/art: at void com.google.android.gms.internal.zzago.run() ((null):-1)
I/art: at java.lang.Object java.util.concurrent.Executors$RunnableAdapter.call() (Executors.java:428)
I/art: at void java.util.concurrent.FutureTask.run() (FutureTask.java:237)
I/art: at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1133)
I/art: at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:607)
I/art: at void java.lang.Thread.run() (Thread.java:761)
I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.customtabs.CustomTabsServiceConnection" on path: DexPathList[[zip file "/data/app/zapbear.quantumproductions.com.zappybear-2/base.apk"],nativeLibraryDirectories=[/data/app/zapbear.quantumproductions.com.zappybear-2/lib/x86, /system/lib, /vendor/lib]]
I/art: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/art: at boolean com.google.android.gms.internal.zznn.zzi(android.content.Context) ((null):-1)
I/art: at void com.google.android.gms.internal.zzabv.<init>(android.content.Context, com.google.android.gms.internal.zzabu) ((null):-1)
I/art: at java.lang.Object com.google.android.gms.internal.zzabx.call() ((null):-1)
I/art: at void com.google.android.gms.internal.zzago.run() ((null):-1)
I/art: at java.lang.Object java.util.concurrent.Executors$RunnableAdapter.call() (Executors.java:428)
I/art: at void java.util.concurrent.FutureTask.run() (FutureTask.java:237)
I/art: at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1133)
I/art: at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:607)
I/art: at void java.lang.Thread.run() (Thread.java:761)
I/art: [ 11-20 01:41:39.886 2681: 2681 D/ ]
HostConnection::get() New Host Connection established 0xd9e15090, tid 2681
V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {f36c082}
I/cr_LibraryLoader: Expected native library version number "51.0.2704.91", actual native library version number "51.0.2704.91"
I/chromium: [INFO:library_loader_hooks.cc(143)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
E/ApkAssets: Error while loading asset assets/natives_blob_64.bin: java.io.FileNotFoundException: assets/natives_blob_64.bin
E/ApkAssets: Error while loading asset assets/snapshot_blob_64.bin: java.io.FileNotFoundException: assets/snapshot_blob_64.bin
D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
D/libEGL: loaded /system/lib/egl/libEGL_emulation.so
D/libEGL: loaded /system/lib/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded /system/lib/egl/libGLESv2_emulation.so
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008d57
W/cr_media: Requires BLUETOOTH permission
I/cr_DRP: No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
D/cr_Ime: [InputMethodManagerWrapper.java:30] Constructor
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
I/cr_Ime: ImeThread is not enabled.
E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
[ 11-20 01:41:40.059 2681: 2747 D/ ]
HostConnection::get() New Host Connection established 0xf2e305a0, tid 2747
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
[ 11-20 01:41:40.076 2681: 2779 D/ ]
HostConnection::get() New Host Connection established 0xd54ee1b0, tid 2779
W/EGL_emulation: eglSurfaceAttrib not implemented
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xd9ee1e80, error=EGL_SUCCESS
V/assigned screenW: 1080.0
V/The jump force is: 21.637500000000003
E/chromium: [ERROR:gles2_cmd_decoder.cc(2167)] [GroupMarkerNotSet(crbug.com/242999)!:54DB7FD8]GL ERROR :GL_INVALID_OPERATION : BackFramebuffer::Create: <- error from previous GL command
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 2681
D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
W/GooglePlayServicesUtil: Google Play services is missing.
D/cr_Ime: [InputMethodManagerWrapper.java:30] Constructor
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
W/Ads: Not enough space to show ad. Needs 320x49 dp, but only has 320x0 dp.
E/chromium: [ERROR:gles2_cmd_decoder.cc(2167)] [GroupMarkerNotSet(crbug.com/242999)!:5420DED3]GL ERROR :GL_INVALID_OPERATION : BackFramebuffer::Create: <- error from previous GL command
I/cr_Ime: ImeThread is not enabled.
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 2681
D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
W/Ads: Not enough space to show ad. Needs 320x49 dp, but only has 320x0 dp.
I/Ads: Scheduling ad refresh 60000 milliseconds from now.
D/cr_Ime: [InputMethodManagerWrapper.java:30] Constructor
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
I/cr_Ime: ImeThread is not enabled.
I/Ads: Ad finished loading.
but I see no ad, just my app as usual.

Android app crashes showing webview logs

My android app often goes not responding and then crashes printing the following log:
12-16 00:43:49.788 27523-27523/com.robocats.main W/linker: /data/app/com.google.android.webview-2/lib/arm64/libwebviewchromium.so: unused DT entry: type 0x6ffffffe arg 0x38c70
12-16 00:43:49.788 27523-27523/com.robocats.main W/linker: /data/app/com.google.android.webview-2/lib/arm64/libwebviewchromium.so: unused DT entry: type 0x6fffffff arg 0x3
12-16 00:43:49.908 27523-27523/com.robocats.main I/WebViewFactory: Loading com.google.android.webview version 55.0.2883.91 (code 288309150)
12-16 00:43:49.928 27523-27523/com.robocats.main I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
12-16 00:43:49.928 27523-27523/com.robocats.main I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
12-16 00:43:49.938 27523-27523/com.robocats.main I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
12-16 00:43:49.938 27523-27523/com.robocats.main I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
12-16 00:43:49.948 27523-27523/com.robocats.main I/cr_LibraryLoader: Time to load native libraries: 1 ms (timestamps 5331-5332)
12-16 00:43:49.948 27523-27523/com.robocats.main I/cr_LibraryLoader: Expected native library version number "55.0.2883.91", actual native library version number "55.0.2883.91"
12-16 00:43:49.958 27523-27523/com.robocats.main I/cr_LibraryLoader: Expected native library version number "55.0.2883.91", actual native library version number "55.0.2883.91"
12-16 00:43:49.978 27523-27523/com.robocats.main I/chromium: [INFO:library_loader_hooks.cc(163)] Chromium logging enabled: level = 0, default verbosity = 0
12-16 00:43:50.028 27523-27523/com.robocats.main I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
12-16 00:43:50.328 27523-27523/com.robocats.main D/CognitoCachingCredentialsProvider: Loading credentials from SharedPreferences
12-16 00:43:57.608 27523-27534/com.robocats.main I/art: Thread[7,tid=27534,WaitingInMainSignalCatcherLoop,Thread*=0x55982e3fc0,peer=0x12c000a0,"Signal Catcher"]: reacting to signal 3
12-16 00:43:58.088 27523-27534/com.robocats.main I/art: Wrote stack traces to '/data/anr/traces.txt'
The logs are coming from webview, but I'm not at all using webview in my application. Any pointers here?

Android webview within application not loading

The intent of this is to have a webpage firing within the app itself. The app runs without glitches, but the webpage is never seen. The .xml contains the webpage and a list beneath it.
The .xml file reads as
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_centerVertical="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ListView
android:layout_width="fill_parent"
android:layout_height="500dp"
android:id="#android:id/list"/>
</LinearLayout>
The activity in the .java reads as
#Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView myWebView = new WebView(this);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.setWebViewClient(new WebViewClient());
myWebView.loadUrl("https://google.com");
// Other AWS gibberish
}
I can get the webpage to fire as an separate application, but this is not what I want.
WebView webview = new WebView(this);
setContentView(webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("http://google.ca");
Edit: I have already added the internet permission to the manifest
<uses-permission android:name="android.permission.INTERNET" />
Some references I have been using here, here, here and documentation without success
Edit 2: Going through the device debug files and the following are being logged
10-18 22:07:59.296 7717-7717/com.amazon.mysampleapp I/WebViewFactory: Loading com.google.android.webview version 53.0.2785.124 (code 278512400)
10-18 22:07:59.306 7717-7826/com.amazon.mysampleapp I/System.out: (HTTPLog)-Static: SBServiceAPI: getService class android.os.ServiceManager
10-18 22:07:59.306 7717-7826/com.amazon.mysampleapp I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-18 22:07:59.306 7717-7826/com.amazon.mysampleapp I/System.out: (HTTPLog)-Static: isShipBuild true
10-18 22:07:59.306 7717-7826/com.amazon.mysampleapp I/System.out: (HTTPLog)-Thread-46729-141117018: SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
10-18 22:07:59.306 7717-7826/com.amazon.mysampleapp I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-18 22:07:59.336 7717-7826/com.amazon.mysampleapp I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
10-18 22:07:59.336 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
10-18 22:07:59.336 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
10-18 22:07:59.336 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
10-18 22:07:59.346 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
10-18 22:07:59.366 7717-7717/com.amazon.mysampleapp I/cr_LibraryLoader: Time to load native libraries: 6 ms (timestamps 655-661)
10-18 22:07:59.366 7717-7717/com.amazon.mysampleapp I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
10-18 22:07:59.376 7717-7717/com.amazon.mysampleapp W/ResourceType: Failure getting entry for 0x01080ad1 (t=7 e=2769) (error -75)
10-18 22:07:59.386 7717-7717/com.amazon.mysampleapp I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
10-18 22:07:59.396 7717-7717/com.amazon.mysampleapp I/chromium: [INFO:library_loader_hooks.cc(151)] Chromium logging enabled: level = 0, default verbosity = 0
10-18 22:07:59.436 7717-7717/com.amazon.mysampleapp I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
10-18 22:07:59.606 7717-7826/com.amazon.mysampleapp I/DefaultDeliveryClient: Successful submission of 4 events
10-18 22:07:59.646 7717-7843/com.amazon.mysampleapp W/cr_media: Requires BLUETOOTH permission
10-18 22:07:59.686 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
10-18 22:07:59.696 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
10-18 22:07:59.736 7717-7717/com.amazon.mysampleapp D/ConnectivityManager: CallingUid : 10097, CallingPid : 7717
10-18 22:07:59.736 7717-7854/com.amazon.mysampleapp D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
10-18 22:07:59.766 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingWebActionModeCallback>
10-18 22:07:59.766 7717-7717/com.amazon.mysampleapp I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingWebActionModeCallback>
Instead of instantiating a new Webview at onCreate I think you may need to use the one specified in your layout:
#Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.NAME_OF_THE_XML_FILE); // change here to match the name of your xml file
// WebView myWebView = new WebView(this); instead of this, try this one below:
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.setWebViewClient(new WebViewClient());
myWebView.loadUrl("https://google.com");
// Other AWS gibberish
}

Cordova 6.0.0 Unfortunaly, HelloWorld has stopped

I try to use cordova in windows for create a simple android app. I create the first project using command cordova create hello com.example.hello HelloWorld
I add the Android platform, I try to build and build success, but when I emulate the app don't start and receive the error on screen:
Unfortunaly, HelloWorld has stopped.
logcat:
03-16 16:44:19.073 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /data/app/com.example.hello-1/lib/x86
03-16 16:44:19.266 2442-2442/com.example.hello I/WebViewFactory﹕ Loading com.android.webview version 44.0.2403.119 (code 246011910)
03-16 16:44:19.310 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /system/app/webview/lib/x86
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Time to load native libraries: 62 ms (timestamps 9389-9451)
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
03-16 16:44:19.392 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
03-16 16:44:19.392 2442-2442/com.example.hello I/chromium﹕ [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0
03-16 16:44:19.483 2442-2442/com.example.hello I/BrowserStartupController﹕ Initializing chromium process, singleProcess=true
03-16 16:44:19.484 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:19.486 2442-2442/com.example.hello E/SysUtils﹕ ApplicationContext is null in ApplicationStatus
03-16 16:44:19.568 2442-2442/com.example.hello W/chromium﹕ [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY)
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY)
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_egl.cc(327)] No suitable EGL configs found.
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed
03-16 16:44:19.628 2442-2468/com.example.hello W/AudioManagerAndroid﹕ Requires BLUETOOTH permission
03-16 16:44:19.667 2442-2442/com.example.hello E/DataReductionProxySettingListener﹕ No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
03-16 16:44:19.757 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:19.762 2442-2442/com.example.hello W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring
03-16 16:44:20.182 2442-2442/com.example.hello D/SystemWebViewEngine﹕ CordovaWebView is running on device made by: unknown
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.246 2442-2452/com.example.hello I/art﹕ Background sticky concurrent mark sweep GC freed 7609(505KB) AllocSpace objects, 3(60KB) LOS objects, 64% free, 861KB/2MB, paused 1.373ms total 448.240ms
03-16 16:44:20.310 2442-2466/com.example.hello W/chromium﹕ [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
03-16 16:44:20.368 2442-2442/com.example.hello D/gralloc_goldfish﹕ Emulator without host-side GPU emulation detected.
03-16 16:44:20.376 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.410 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.586 2442-2452/com.example.hello I/art﹕ Background partial concurrent mark sweep GC freed 1447(97KB) AllocSpace objects, 2(2MB) LOS objects, 35% free, 926KB/1438KB, paused 2.668ms total 209.255ms
03-16 16:44:20.587 2442-2480/com.example.hello A/chromium﹕ [FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
03-16 16:44:20.587 2442-2480/com.example.hello A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 2480 (GpuThread)
This is almost exactly the same error as Error in Android Programming while connecting to Phonegap. It seems to be related to this bug from ionic.
According to them, "switching from Snapshot to Host GPU solved this problem."
This makes sense as three of the last errors are related to opengl.
Note to various moderators: I tried to close one as a duplicate of the other, but that can't be done because there's no answer. Tried looking on meta for 'duplicate unanswered' but they simply say not to do it. I figure I'll post a possible answer and if either one is accepted, I'll close the other as a dup.

Categories

Resources