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

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.

Related

Audio output and Audio input flag denied by client on implementing pjsua2 voice call on Android 5.1?

I am implementing pjsua2 sample app for voice call on Android devices. It works well on android version 8, 9, 10, 11 without issue. But when I tested on Android 5.1, I can receive call from sip soft phone without any issue. But outgoing call only rings on the other side without any voice.
From the log its mentioned that both AUDIO_OUTPUT_FLAG_FAST as well as AUDIO_INPUT_FLAG_FAST denied by client. can any one suggest me how to rectify this issue.
as per below log : audio details
minFrameCount: 1857, afFrameCount=1024, minBufCount=5, sampleRate=16000, afSampleRate=44100, afLatency=115
4-12 16:17:42.320 4922-4922/org.pjsip.pjsua2 I/System.out: 16:17:42.320 pjsua_call.c !Making call with acc #0 to sip:syz#sip.xcd.com
04-12 16:17:42.321 4922-4922/org.pjsip.pjsua2 I/System.out: 16:17:42.320 pjsua_aud.c .Set sound device: capture=-1, playback=-2
04-12 16:17:42.321 4922-4922/org.pjsip.pjsua2 I/System.out: 16:17:42.321 pjsua_aud.c ..Opening sound device (speaker + mic) PCM#16000/1/20ms
04-12 16:17:42.321 4922-4922/org.pjsip.pjsua2 I/System.out: 16:17:42.321 opensl_dev.c ...Creating OpenSL stream
04-12 16:17:42.322 4922-4922/org.pjsip.pjsua2 W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client
04-12 16:17:42.322 4922-4922/org.pjsip.pjsua2 I/AudioTrack: minFrameCount: 1857, afFrameCount=1024, minBufCount=5, sampleRate=16000, afSampleRate=44100, afLatency=115
04-12 16:17:42.323 4922-4922/org.pjsip.pjsua2 W/AudioRecord: AUDIO_INPUT_FLAG_FAST denied by client
04-12 16:17:42.336 4922-4922/org.pjsip.pjsua2 I/System.out: 16:17:42.335 ec0xb8b41d98 ...Speex AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=0 ms
04-12 16:17:42.336 4922-4922/org.pjsip.pjsua2 I/System.out: 16:17:42.336 opensl_dev.c ...Starting OpenSL stream..
04-12 16:17:42.347 4922-4922/org.pjsip.pjsua2 I/System.out: 16:17:42.347 opensl_dev.c ...OpenSL stream started

Embedded Crosswalk increase allocated memory on Android

I have a several web application that I want to be able to run through a webview in a native android application. I am currently embedding a crosswalk browser and loading the applications in that. It works great for some of the web applications but as the size of the web application increases I get errors that crash my android application.
Things I have tried:
android:largeHeap="true" - helped I was able to run larger web applications.
android:hardwareAccelerated="true" - helped I got better performance.
xwalk-command-line='--ignore-gpu-blacklist' in assets/xwalk-commandline - also helps
There are still some web applications (created through unity) that required me to allocate about 1Gb when I was creating them for desktop testing. I am will be using this android app on the newest phones and would be ok with such a high memory usage.
It works if I try to open this application on a desktop browser so that is what leads me to believe that it is a memory allocation issue. I am using crosswalk 17 which has webGL enabled and the smaller applications run webgl just fine.
I have a few questions:
Is there a way to force the crosswalk embedded browser to allocate 1GB of memory for itself. (I know this is going to crush my device and is probably not great but please indulge me)
Can I expand my application's memory usage beyond largeHeap. If so how? And do I need to do so to enable such large web applications?
Are there any issues that I am missing that are possibly masking the real issues here.
I know this type of application would only ever run on the newest kinds of phones. what are the repercussions for an application that has such a high memory usage?
Are there any other avenues I should explore to enable me to run large web applications within an android app?
Here are the answers to the FAQs of stack overflow users :)
Xml:
<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"
tools:context="com.mycompany.myproject.webapplicationActivity">
<org.xwalk.core.XWalkView
android:id="#+id/xwalkWebView"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
/>
</RelativeLayout>
Activity onCreate:
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webapplicationActivity);
xWalkWebView=(XWalkView)findViewById(R.id.xwalkWebView);
// turn on debugging
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
xWalkWebView.setKeepScreenOn(true);
xWalkWebView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
String urlToBeLoaded = "http://www.google.com";
Bundle bundle = getIntent().getExtras();
if (savedInstanceState == null) {
Bundle extras = getIntent().getExtras();
if(extras == null) {
Log.i(TAG,"error in reading extras");
} else {
urlToBeLoaded = extras.getString("url");
}
}
xWalkWebView.load(urlToBeLoaded, null);
Permissions
*Crosswalk requires a lot of these and I am using the remainder. But maybe there is a conflict there.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
ADB logcat
GL : validate_display:255 error 3008 (EGL_BAD_DISPLAY)
02-17 18:11:55.862 23023 23023 W art : Attempt to remove non-JNI local reference, dumping thread
02-17 18:11:55.903 4335 4448 I ActivityManager: Displayed com.mycompany.myProject/.GamePlayActivity: +464ms
02-17 18:11:55.904 23023 23023 W cr.BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 23023
02-17 18:11:55.904 22463 22463 I Keyboard.Facilitator: onFinishInput()
02-17 18:11:55.931 23023 23023 E chromium: [ERROR:layer_tree_host_impl.cc(2121)] Forcing zero-copy tile initialization as worker context is missing
02-17 18:11:55.980 4335 4448 I WindowManager: Screen frozen for +541ms due to Window{f87dd7b u0 com.mycompany.myProject/com.mycompany.myProject.GamePlayActivity}
02-17 18:11:57.987 4335 4448 I art : Starting a blocking GC Explicit
02-17 18:11:58.205 4335 4448 I art : Explicit concurrent mark sweep GC freed 12393(780KB) AllocSpace objects, 5(100KB) LOS objects, 23% free, 52MB/68MB, paused 1.298ms total 216.765ms
02-17 18:11:58.206 4335 15896 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#3b6394f attribute=null, token = android.os.BinderProxy#d44f10a
02-17 18:11:58.726 23023 23023 I chromium: [INFO:CONSOLE(1)] "Decompressed Release/StuntRunner_WebGL.memgz in 254ms. You can remove this delay if you configure your web server to host files using gzip compression.", source: https://<source>/Release/UnityLoader.js (1)
02-17 18:11:59.103 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:11:59.663 23023 23023 I chromium: [INFO:CONSOLE(1)] "Decompressed Release/StuntRunner_WebGL.jsgz in 853ms. You can remove this delay if you configure your web server to host files using gzip compression.", source: https://<source>/Release/UnityLoader.js (1)
02-17 18:11:59.985 23023 23023 I chromium: [INFO:CONSOLE(1)] "optimizing out Math.fround calls", source: https://<source>/Release/UnityLoader.js (1)
02-17 18:12:00.103 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:01.104 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:02.105 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:03.105 22037 22037 I ServiceManager: Waiting for service AtCmdFwd...
02-17 18:12:03.174 4335 22386 D NetlinkSocketObserver: NeighborEvent{elapsedMs=775340136, 192.168.1.1, [100D7F6DFA6E], RTM_NEWNEIGH, NUD_REACHABLE}
02-17 18:12:04.106 22037 22037 W Atfwd_Sendcmd: AtCmdFwd service not published, waiting... retryCnt : 5
02-17 18:12:10.387 4335 6452 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=842, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ], android.os.BinderProxy#82c1e86)
02-17 18:12:10.392 4335 6549 I ActivityManager: Process com.instagram.android (pid 14465) has died
02-17 18:12:10.409 4335 5621 D ConnectivityService: releasing NetworkRequest NetworkRequest [ id=842, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
02-17 18:12:10.504 4335 5621 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=842, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
02-17 18:12:10.781 23023 23263 F libc : Fatal signal 4 (SIGILL), code 1, fault addr 0xd3781358 in tid 23263 (Chrome_InProcRe)
02-17 18:12:10.886 3293 3293 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-17 18:12:10.887 3293 3293 F DEBUG : Build fingerprint: 'google/angler/angler:6.0.1/MMB29P/2473553:user/release-keys'
02-17 18:12:10.887 3293 3293 F DEBUG : Revision: '0'
02-17 18:12:10.887 3293 3293 F DEBUG : ABI: 'arm'
02-17 18:12:10.887 3293 3293 F DEBUG : pid: 23023, tid: 23263, name: Chrome_InProcRe >>> com.mycompany.myProject <<<
02-17 18:12:10.887 3293 3293 F DEBUG : signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xd3781358
02-17 18:12:10.933 3293 3293 F DEBUG : r0 d5366044 r1 40005000 r2 0855d000 r3 02182000
02-17 18:12:10.933 3293 3293 F DEBUG : r4 d5366044 r5 40000000 r6 00000000 r7 00000000
02-17 18:12:10.933 3293 3293 F DEBUG : r8 40005000 r9 d66d4050 sl 40000000 fp d66bee10
02-17 18:12:10.934 3293 3293 F DEBUG : ip f70ff624 sp d66bed40 lr d3dfa5e1 pc d3781358 cpsr 80030030
02-17 18:12:10.938 3293 3293 F DEBUG :
02-17 18:12:10.938 3293 3293 F DEBUG : backtrace:
02-17 18:12:10.926 3293 3293 W debuggerd: type=1400 audit(0.0:9681): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=1150 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=0
02-17 18:12:10.938 3293 3293 F DEBUG : #00 pc 001e3358 /data/app/com.mycompany.myProject-1/lib/arm/libxwalkcore.so
02-17 18:12:10.938 3293 3293 F DEBUG : #01 pc 0085c5dd /data/app/com.mycompany.myProject-1/lib/arm/libxwalkcore.so
02-17 18:12:11.276 3293 3293 W debuggerd: type=1400 audit(0.0:9682): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=1150 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=0
02-17 18:12:11.817 4335 23497 W ActivityManager: Force finishing activity com.mycompany.myProject/.GamePlayActivity
02-17 18:12:11.818 3293 3293 F DEBUG :
02-17 18:12:11.818 3293 3293 F DEBUG : Tombstone written to: /data/tombstones/tombstone_05
02-17 18:12:11.818 3293 3293 E DEBUG : AM write failed: Broken pipe
02-17 18:12:11.890 4335 22149 I OpenGLRenderer: Initialized EGL, version 1.4
02-17 18:12:11.987 4335 5717 D GraphicsStats: Buffer count: 4
02-17 18:12:11.989 4335 5980 I WindowState: WIN DEATH: Window{def3a97 u0 com.mycompany.myProject/com.mycompany.myProject.LibraryActivity}
02-17 18:12:11.994 4335 5709 I WindowState: WIN DEATH: Window{9ffe3af u0 com.mycompany.myProject/com.mycompany.myProject.LoginActivity}
02-17 18:12:11.996 4335 4351 I WindowState: WIN DEATH: Window{ee84425 u0 com.mycompany.myProject/com.mycompany.myProject.GameDescriptionActivity}
02-17 18:12:11.999 4335 7252 I WindowState: WIN DEATH: Window{a09b55b u0 SurfaceView}
02-17 18:12:12.001 4335 5717 I WindowState: WIN DEATH: Window{f87dd7b u0 com.mycompany.myProject/com.mycompany.myProject.GamePlayActivity}
02-17 18:12:12.022 3309 3309 I Zygote : Process 23023 exited due to signal (4)
02-17 18:12:12.024 4335 28075 I ActivityManager: Process com.mycompany.myProject (pid 23023) has died
02-17 18:12:12.073 4335 28075 I ActivityManager: Start proc 23507:com.mycompany.myProject/u0a179 for activity com.mycompany.myProject/.GameDescriptionActivity
02-17 18:12:12.076 23507 23507 I art : Late-enabling -Xcheck:jni
Thank you in advance!
I had a problem like that. I thought this problem came with ads like adsense or some went wrong with JavaScript
Try
xwalk Release 'org.xwalk:xwalk_core_library:21.51.546.7'
I hope that helps you

Hybrid app crashes when in landscape mode

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)

Playing video stream from ip camera's with m3u8 playlist of ts files

I am encountering problems developing small apk to use with my ip camera. I am able to play test video from apple (http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8), but I am unable to play .m3u8 from my cam.
The adress for file is ip_adress/web/list.m3u8 and i can reach it in chrome without authentication. List.m3u8 looks like this:
EXTM3U
EXT-X-TARGETDURATION:2
EXT-X-MEDIA-SEQUENCE:1581
EXTINF:2,
HLS-0001581.ts
EXTINF:2,
HLS-0001582.ts
EXTINF:2,
HLS-0001583.ts
From what i understand, error "can't play that video" is coming not from m3u8 but from .ts files. Is that correct? What can i do to play .ts files in my apk? Im using android 4.1.2 and MPEG-2 TS is supported.
Has anyone have an idea whats wrong?
01-05 04:19:15.223: E/Trace(16138): error opening trace file: No such file or directory (2)
01-05 04:19:15.223: D/ActivityThread(16138): setTargetHeapUtilization:0.25
01-05 04:19:15.223: D/ActivityThread(16138): setTargetHeapIdealFree:8388608
01-05 04:19:15.223: D/ActivityThread(16138): setTargetHeapConcurrentStart:2097152
01-05 04:19:17.153: D/libEGL(16138): loaded /system/lib/egl/libEGL_adreno200.so
01-05 04:19:17.303: D/libEGL(16138): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
01-05 04:19:17.303: D/libEGL(16138): loaded /system/lib/egl/libGLESv2_adreno200.so
01-05 04:19:17.303: I/Adreno200-EGL(16138): <qeglDrvAPI_eglInitialize:299>: EGL 1.4QUALCOMMbuild(Merge)
01-05 04:19:17.303: I/Adreno200-EGL(16138): Build Date: 07/09/13 Tue
01-05 04:19:17.303: I/Adreno200-EGL(16138): Local Branch: AU_41
01-05 04:19:17.303: I/Adreno200-EGL(16138): Remote Branch:
01-05 04:19:17.303: I/Adreno200-EGL(16138): Local Patches:
01-05 04:19:17.303: I/Adreno200-EGL(16138): Reconstruct Branch:
01-05 04:19:17.593: D/OpenGLRenderer(16138): Enabling debug mode 0
01-05 04:19:17.613: E/MediaPlayer(16138): Uri is <URL suppressed>
01-05 04:19:17.613: D/MediaPlayer(16138): Couldn't open file on client side, trying server side
01-05 04:19:17.623: I/Choreographer(16138): Skipped 37 frames! The application may be doing too much work on its main thread.
01-05 04:19:17.983: D/MediaPlayer(16138): getMetadata
01-05 04:19:17.983: D/MediaPlayer(16138): start() mUri is <URL suppressed>
01-05 04:19:18.083: E/MediaPlayer(16138): error (1, -1007)
01-05 04:19:18.083: E/MediaPlayer(16138): Error (1,-1007)
01-05 04:19:18.083: D/VideoView(16138): Error: 1,-1007
It says that the file is not there - files are in the same place as the playlist (ip/web/). I am able to "catch" them in chrome directly. The video codec is H264 MPEG-4 AVC, resolution is 640x352.
Camera webpage, gets the list like that:
img2345.src = "/list.m3u8?" + (new Date()).getTime();
Error -1007 is MEDIA_ERROR_MALFORMED.
Android supports only the Baseline profile of H.264 AVC. If your encoding doesn't use the Baseline profile it might not be able to play it.
To check the encoding take on of the .ts segments and look at it with ffprobe or MediaInfo or similar and check the profile.
Android Supported Media Formats
MediaInfo

Proxy can not be resolved

I used the same code with only little changes as follows from here :
Downloading File in Android
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(
"Myproxy", 8080));
URL url = new URL(sUrl[0]);
HttpURLConnection uc = (HttpURLConnection) url
.openConnection(proxy);
uc.connect();
int fileLength = uc.getContentLength();
I am getting following exception for this:
04-12 09:31:42.401: WARN/System.err(5181): java.net.UnknownHostException: Host is unresolved: Myproxy:8080
04-12 09:31:42.405: WARN/System.err(5181): at java.net.Socket.connect(Socket.java:1057)
04-12 09:31:42.405: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:62)
04-12 09:31:42.405: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)
04-12 09:31:42.405: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)
04-12 09:31:42.409: WARN/System.err(5181): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:884)
04-12 09:31:42.409: WARN/System.err(5181): at com.test.filedownload.FileDownloadActivity$DownloadFile.doInBackground(FileDownloadActivity.java:99)
04-12 09:31:42.413: WARN/System.err(5181): at com.test.filedownload.FileDownloadActivity$DownloadFile.doInBackground(FileDownloadActivity.java:1)
04-12 09:31:42.416: WARN/System.err(5181): at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-12 09:31:42.420: WARN/System.err(5181): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-12 09:31:42.420: WARN/System.err(5181): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-12 09:31:42.420: WARN/System.err(5181): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
04-12 09:31:42.424: WARN/System.err(5181): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
04-12 09:31:42.424: WARN/System.err(5181): at java.lang.Thread.run(Thread.java:1096)
Please help to resolve the same.
Thanks,
Sneha
This is an issue in Android versions 2.2 that they do not support Proxy
But some phones like LG P500 works with OPera as the brwoser.
There is a great detail about this on
http://android-proxy.blogspot.com/
But you can really achive this using proxoid, it is an HTTP proxy for Android.
code.google.com/p/proxoid/
More information can be had from this site.Hope this will help you.
java.net.UnknownHostException: Host is unresolved: Myproxy:8080
This says that there is no host named Myproxy in the network. Obtain the proxy name and port and use them in code.

Categories

Resources