11

I am building an Android app for my company, using Android Studio 1.5.1 . I've discovered that the app won't work on some Galaxy S5 phones.

These phones just show a white screen when the app runs. This error happens on Galaxy S5 devices with Android version 5.1.1 But not on an Galaxy S5 Device running Android version 5.0

I'm focusing on the Android Version as a clue to solving this bug. I can't actually get one of the devices so I've created several Virtual Devices. There are 6 Downloadable system images of Android 5.1.1 in Android Studio's Virtual Device Configuration wizard. I've installed all of them. none replicate this white screen error.

What else can I do to uncover this bug?

If it helps answer my question, my app relies heavily on server communication. The whole app is just one Webview with a few html & JS files.

Viral Patel
  • 32,418
  • 18
  • 82
  • 110
GRY
  • 724
  • 3
  • 14
  • 33
  • do you have the logs(`dumpstate`) from the device it is not working on? – Naman Jan 28 '16 at 18:50
  • please post the logcat from affected devices – eriuzo Jan 28 '16 at 18:51
  • The Question is clear I CANNOT test on physical devices. – GRY Jan 28 '16 at 19:11
  • 1
    @GRY once you can't debug it, I'd suggest to integrate some analytics system, like [Crittercism](http://www.crittercism.com/) and log all exceptions, breadcramps, all key states of the app's start, etc. there and once you get data - attempt to figure out what is going wrong. The problem with emulators is that they are not reproducing actual device behaviour, so I don't think you have much choice here. – Konstantin Loginov Jan 28 '16 at 21:48
  • Converted the comment into an answer with few more details - I hope you'll find it anyhow useful and figured out how to solve your issue: WebView is tricky control and you're not the first one who faces issues with it http://stackoverflow.com/questions/21374901/samsung-specific-webview-issues, http://stackoverflow.com/questions/34220219/samsung-s6-webview-css-animations-issue and many others. – Konstantin Loginov Jan 28 '16 at 22:41
  • Proguard may cause errors like this. Try the actual apk on the emulator. Also add a crash and error reporting api to your app, I suggest https://fabric.io – Devrim Feb 04 '16 at 15:51

4 Answers4

1

The problem with emulators is that they are not reproducing actual device behaviour(especially, once many OEMs like Samsung tend to customise Android based on their needs), so I'm afraid the only options you have are:

  1. Get Samsung Galaxy S5 with 5.1.1

    Apart from obvious ideas "go to shop and buy", I can recommend you:

    • to take a look at Open Device Lab. It operates around the world and there's an arguably good chance to find the device you need there;
    • build a pool of alpha-beta users you can talk to and share new builds. Google Play has quite rich functionality in this area. Samsung S5 is quite common model, so it shouldn't be a problem to find people with it. If your product is "public", you can try to find beta-users on services like BetaBound or just among your social media network;
  2. Use Analytics tools to collect more data from affected devices and act based on the information you get

    There're dozens of different frameworks for accomplishing it. I can suggest Crittercism as a super powerful and comprehensive tool. In particular, I'd definitely log:

    • All handled exceptions
    • Add breadcrumbs (short string to capture app run-time information) to all Activity/Fragment lifecycle methods, to Application's methods (as white screen on start might mean some issues there), to all meaningful async tasks, etc.
    • If app gets into suspicion state - log it as a handled exception, so you can see the whole trail of breadcrumbs and track history of exceptions for the user. Unfortunately, you won't get trail of breadcrumbs, before something has been logged as an issue (crash or exception). There're frameworks, which log everything, like MixPanel, for example, but I honestly think that Crittercism suits much more here)

    Crittercism will also catch & report all crashes happen in the app and

    The Get Started Guide is here and it's pretty straightforward: http://docs.crittercism.com/android/android.html

Saying that, I'd suggest you to integrate some analytics anyway, as it'll help you in the future and to try to get affected phone in hands for test.

Pankaj
  • 9,749
  • 32
  • 139
  • 283
Konstantin Loginov
  • 15,802
  • 5
  • 58
  • 95
0

I guess the culprit is webview. Can you check the webview version on which the issue is reproducible.

To check the version you need to go to settings->Application Manager-> Downloaded Apps-> check "Android System Webview"version

We had a similar issue when the screen used to go blank and it used to happen only on particular version of webview. The issue was fixed by Google later.

The chromium webview layer is now updatable from Google Play.

For more details refer-http://developer.android.com/about/versions/lollipop.html#WebView

rupesh jain
  • 3,410
  • 1
  • 14
  • 22
0

I assume you are building a hybrid app.

If the webview is the culprit, you could try crosswalk. It adds Mb's to your app but it makes sure every device uses the same webview (latest chromium). Moreover rendering differences etc are also minimized.

if you are using cordova run: cordova plugin add cordova-plugin-crosswalk-webview and that's it.

If you implement this and the whitescreen problem is gone, you debugged it in a sherlock holmish deduction way...

Pankaj
  • 9,749
  • 32
  • 139
  • 283
user3791775
  • 426
  • 3
  • 5
0

The problem is not with emulator. It is with WebView in Android versions 5.1 onward.

Try

uninstalling the updates for "Android system webview" app (go to settings and look for it under "downloaded") it works just fine!

Source - similar question

Community
  • 1
  • 1
Viral Patel
  • 32,418
  • 18
  • 82
  • 110