The app builds and deploys to the device, then launches. But the app never fully loads - it is just a black screen (with the OS status bar at the top). There are no errors to the console.
I tried the build on an emulator (Genymotion using their GS3 4.3 box). I unplug the gs3 and rerun:
ionic run android -c -s
The app builds and deploys to the emulator, and it runs the app fine.
Thanks @eno - good call on logcat via adb. I installed log-color and found a good filter for Cordova entries.
So, am getting this from logcat:
7149 CordovaLog I Changing log level to DEBUG(3)
7149 CordovaLog I Found start page location: http://192.168.50.1:8100
7149 CordovaActivity D CordovaActivity.onCreate()
7149 CordovaWebView D CordovaWebView is running on device made by: samsung
7149 CordovaActivity D CordovaActivity.init()
7149 CordovaWebView D >>> loadUrl(http://192.168.50.1:8100)
7149 CordovaWebView D >>> loadUrlNow()
7149 CordovaLog I Changing log level to DEBUG(3)
7149 CordovaLog I Found start page location: http://192.168.50.1:8100
7149 CordovaActivity D Resuming the App
7149 CordovaActivity D CB-3064: The errorUrl is null
7149 CordovaWebViewClient D onPageStarted(http://192.168.50.1:8100/)
7149 CordovaActivity D onMessage(onPageStarted,http://192.168.50.1:8100/)
7149 CordovaWebView E CordovaWebView: TIMEOUT ERROR!
No E or W level entries except for the TIMEOUT, which fires a good 10secs after launch, presumably because the app has borked.
I’m not sure about the HTTP requests - shouldn’t these be loading files rather than remote resources?
I get this output in logcat when running your app on my s3:
20306 CordovaWebViewClient D onPageFinished(file:///android_asset/www/index.html#/intro)
20306 CordovaActivity D onMessage(onPageFinished,file:///android_asset/www/index.html#/intro)
Thanks for your quick answer.
The protocol file:/// is right, it’s used to get local file (you can open an html file in a browser in your computer, you will get the same).
I’ve got 3 users with galaxy 3s and they have black screen
And I don’t know how to solve, or investigate…
FYI, I think Ionic only supports recent versions of Android (I could be wrong but worth checking). If the S3 devices are too old you should update your Android Manifest so that only devices with versions of Android >= Ionic supported version see the app in the Google Play store. (Its also possible that Ionic does this - check your Android manifest file). I havent looked at your app but if its using some specific feature that isn’t on the S3, that might be a problem You can restrict app distribution in the Google Play developer console.
You could also try setting up a Samsung S3 emulator and test with that (though device-specific stuff may not work since its not a real device). You would need to make an emulator image with the same version of Android and with Samsung’s images (can’t remember if they are available inside the ADT Manager or if you have to download and install images manually from Samsung).
Forgot to mention: there are several services online that allow you to do device-specific testing remotely (Im thinking of services like DeviceAnywhere - there are others). Some of these services charge by the hour so it might be expensive but you might see the problem right away.
Ionic supports Android 4+ and I have some troubles with phones having Android 4.1.2, 4.2.2 and others…
So, it should be compatible
I don’t think I use very specific features but even if I am, I think the app would load a bug. Here it does not load at all…
And as I don’t have this device… I can’t test properly
I will try Galaxy s3 emulator and, why not, DeviceAnywhere…
To conclude a little with my galaxy S problems, they are solved now
But I’m not really sure what was the problem…
I think the CSS background: cover; for images could be the culprit.
Doing minor changes and removing it strangely make my app working on theses devices.
Hi, could you please describe, how you solved the problem?
I’m facing maybe the same problem, but I don’t understand your conclusion.
Thank you very much