Odd blackscreen! What is the reason? - android

i am building a camera-application at the moment and it shows some odd behaviour. When activity starts it gets into a fullscreen camera,ode showing a live-preview. I tried compiling it on my Huawei g615 (4.0.4) and a galaxy nexus (4.2) and it works fine; nothing suspicious on logcat.
BUT when i unplug the Huawei-device from usb, instead of seeing my camera-activity, i just get a blackscreen. Then i tried same thing with the galaxy nexus and the app runs normal.
Does anyone have any idea where this problem can come from?

Related

Black Screen issue on Samsung Note 5, Galaxy S7 Marshmallow on launching 2nd Activity of the application

We have received issues from Customers who are seeing Black screen on Samsung Note 5, Samsung Galaxy s7 after they updated their device to Marshmallow. My application target SDK is 19. Basically the user are able to see the Launcher Activity A, but when they click on other activity B they see a Black screen. Activity A--> singletask and Activity B has default launch mode.
We have tested this application on other Vendors Marshmallow( Motorola, Nexus) devices and it seems to be working well. We have also seen some customer using our application on Samsung Galaxy s7 Edge(Marshmallow) too. We had one of the customer facing the same issue on Marshmallow Note 5, but he resolved that issue after Backing up the data from old Samsung J7 device, in which our application was running well. I am not sure, how backing up the data resolve this issue. Is there any device setting which is turned on or any thing which may be causing this issue. We do not have the Samsung Devices with Marshmallow and could not reproduce this issue.
Any advice appreciated, and let me know what could have caused this issue. Thanks in advance.
We received ANR Logs from the users on Playstore and we found out the issue was due to the Spannable String which we had used. The issue seems to be on only Samsung Marshmallow (6.0) Devices. This issue has been fixed in Marshmallow 6.0.1. Really don't understand, why Android is customized to such extent by Samsung. As our application is running well on Motorola Marshmallow 6.0. Here is the entire Logs from Samsung Marshmallow. Hope this might help some one who is facing similar issue.
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1477)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1468)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1473)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1468)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1468)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1468)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1473)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1473)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1473)
... repeated 3 times
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1468)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1468)
at android.text.SpannableStringBuilder.calcMax(SpannableStringBuilder.java:1468)
at android.text.SpannableStringBuilder.restoreInvariants(SpannableStringBuilder.java:1510)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:762)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:662)
Additional Logs on other Samsung Galaxy Edge Marshmallow 6.0 devices related to Spannable Text View
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:857)
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:864)
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:844)
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:864)
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:864)
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:864)
... repeated 7 times
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:844)
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:864)
at android.text.SpannableStringBuilder.countSpans(SpannableStringBuilder.java:844)
at android.text.SpannableStringBuilder.getSpans(SpannableStringBuilder.java:823)
at android.text.SpannableStringBuilder.sendSpanAdded(SpannableStringBuilder.java:1053)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:763)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:662)

Why does one of my GenyMotion emulated devices show a black screen?

I have two devices in my GenyMotion application. One is nexus 7 4.2.2 API. The other is a saumsung galaxy s4 4.3 API. The nexus emulator starts up fine and works well. However when I tried starting the s4 emulator, the android loading screen doesn't even show up, all i get is a black screen. When I go to DDMS, the devices tab tells me that the samsung galaxy s4 is online and debuggable. Does anyone know how to fix this issue? It make more sense if both show a black screen but why does one show a black screen and the other doesn't. I don't see anything out of the ordinary in the console.
I just tested this, and notice the blank screen is due to Genymotion version mismatch. Once i downloaded the latest genymotion (v2.3.0) , i was able to see Galaxy S4 startup properly.
If you do not see the navigation bar, you can manually enable it in Configure virtual device, see below.
this worked for me : In Configure Virtual Device (as shown in ashoke's answer) I changed Screen size to one of predefineds resolutions.

Incorrect navigation while contact saving on Android

Although the documentation says that this bug is fixed (see: Add the navigation flag), I am experiencing the same problem.
From my application I want to add new Android contact, and after the saving is completed I want to get back to my application (the activity that called the insert new android contact intent). That's why I am using:
i.putExtra("finishActivityOnSaveCompleted", true);
Adding this line, I get the expected behaviour on some phones, and others just behave differently (the user is not navigated back to my application).
I have experienced this problems on Sony Xperia Z, Sony Xperia Z2 and LG G2 mini, all running on 4.4.2, and also LG G3 and Sony Z2 running Lollipop.
Does someone know what is the problem here, and if something has changed.
The saving works properly on for example HTC M8 with 4.4.3 and Samsung Galaxy Note 3 with Lollipop.
Nevertheless, if someone knows a solution, please please share. Thx

My app always crashes whole phone(Samsung Galaxy S2 rooted)

My app works perfectly well on LG-P690 and on all virtual devices I tried but when I tested it on my friends rooted samsung s2 it works for a while until it crashes the whole phone (a hard reset is needed). As I said, it never crashed on my own phone no mater how long I used it or on the emulator and I keep testing to see if I don't use too much heap memory(I never do).
What do you think causes an app to crash a whole phone like that? What should I be looking for?

Lost Android debugger but app keeps running normal

I'm developing for android (API 14) deploying for Nexus One on Genymotion simulator and to a Galaxy Note N8000 tablet, but my app it's having a strange behaviour: in one of the activities, when I press the back button, the app shows the right activity but my debugger disconnects.
Using the simulated Nexus One I have a log message related to OpenGL out of memory and I've found out that OpenGL support for simulators it's usually bad, but using physical note n8000 I have nothing in my logs that can help me. The app behaves like it should but I loose debugging.
Does anyone had a problem similar to that? How did you fix it?
I face the same issue sometimes, my guess is that the Exception actually forces application closing (disconnecting it from debugger), but somehow it gets automatically restarted restoring the previous 'state'.
In your case, maybe is just a simulator issue, but you should consider testing in a real Nexus One device, just to make sure.

Categories

Resources