I just learned Android from scratch and built an app with simple process using Android Studio.
The app has one process with repeating Alarm manager which will toast a message after 10 mins. That's it.
However, once I install it on a real device, after an hour or so, the device will ask to Share Bug Report. When I do share it,(via e-mail to my self), it is just a blank black screen..!
This happens with any device. I tried it on 3 devices so far. It is like:
Device before my app: Normal functioning.
Device after installing my app (after an hour or 2): A pop up comes
up with 'Share bug report'.
PS: I have not written any code to call or share bug report or any popup.
Has anyone come across this strange behavior?? Any idea on what is happening here??
EDIT 1: It is not just a blank screen but there is a word doc with lengthy set of code. It basically contains the entire lump of data of entire system. Not just my app..!
Probably your app is freezing or stops responding.
Analyze your app logs, you will find the cause.
Did you read these threads ?
What does it mean with bug report captured in android tablet?
http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html
Related
I am an android developer and i created an android app which has a background service running.
I have basically created an app which shows chat heads whenever a notification arrives. user can tap on that chat head and reply to that message without opening native messaging app. (Just Like Facebook Messenger with chat heads).
My app runs very smooth in some devices like Vivo, Oppo. But it lags very much in some devices like Samsung and MI. I don't know what is going on here. My app has clean code and never crashes, it just lags and make the phone slower. on the other hand it runs very smooth in some deices.
I tried google but did not find any useful tips. I just want to know that if there is any way to detect the main cause of this lagging issue in some devices. App never crashes, never got any exceptions, don't have any error in code, but still it makes some deice slower and lags.
If anyone can help me finding the main cause of this lagging issue, then it would be a great help.
Thank you in advance.
you can use android studio profiler option to check whats causing lag in your app:
https://developer.android.com/studio/profile/android-profiler
ref tutorials:
https://heartbeat.fritz.ai/profiling-your-app-with-android-studio-7accc268cb98
I have written an App using the Mobile and Android SDK (based on the sample app).
However on when the app runs on a DJI Crystal Sky, it frequently happens that no Toast Messages get displayed.
Patterns:
- They work fine on other devices.
- If they work, they work continuously while the app runs.
- If they don't work, they won't show up at all.
- The best way to get them to show is to reinstall the app.
- Changing notification settings on the Crystal Sky had no effect for me.
Has anyone else come across this issue and found a way to solve it?
It seems like DJI use Toast messages in DJI Go and Go4 where they show reliably. I.e.: there must be a way to get them to work.
P.S: I already looked into Snackbar and other libraries, but they are by far not as versatile which is why I would like to stick to Toast if possible.
EDIT 29/04/2019
I have just noticed that the same behaviour is observed in other Apps (ES file explorer).
Probably not fixable in code and a bug in the Crystal Sky's software.
EDIT 02/07/2019
As it was pointed out by Milanka in the comments,
the Crystal Sky automatically disables Notifications for apps which hides Toast messages.
On my units it happens after each reboot.
we're developing an cordova android app with angularJS/Ionic. We installed our app on several devices and everything worked fine for a week or two. But since a few days the app randomly becomes black while in use. You can "resurrect" the app when you click the hardware back-button. It seems like the whole GUI is black but all services are still running.
The next problem is, that we have no access to the devices and our own devices don't show this behaviour.
Maybe anyone here has experienced something similar and can help me work it out or can provide us a few good ideas for logging this kind of errors on android?
I have been writing an Android app for several months now. It is not released yet, but it is installed in my device.
Today I got a notification from the Battery Doctor app about my app consuming a lot of CPU, even though I hadn't used it since yesterday.
So basically my app is running on the background, it should not be doing anything, but it is using CPU.
So I opened up TraceView and did some profiling on my app while it was in the background (I did not interact with my app at all during this profiling time) and this is what I got: http://i.imgur.com/PYg6twX.png
I am very clueless here. I can see no functions at all from my actual code so I don't even know where to start looking. And I don't really understand what those functions in the screenshot do or why they are showing up there at all.
So I got a couple of questions that I would really appreciate some help with:
are my profiling results expected and OK? Or are those functions not supposed to show up if I am not interacting with my app?
if those functions are not supposed to show up, can anyone guess what could be wrong in my app? Could admob be the cause?
Thanks a lot!
I have the same issue
See my CPU profile. My app was in background, but the CPU cumsuming always in 1-5%, it will cause battery drain if continue running like this for long time.
Admob?
As #CommonsWare suggestion, I remove admob dependency and run again. The CPU consuming go down to 0% almost time. See new profile: https://i.stack.imgur.com/bMBuL.png
(admob SDK version: 17.1.2)
But it is not the solution. I check their sample app, it doesn't have CPU comsuming in background.
I fixed it
If you are using banner ad, you have to call atleast AdView#pause or AdView#destroy in corresponding event of the host activity. Otherwise, the ad view keep checking "Active view", and it causes CPU comsuming.
I am having an app in the store which runs fine on most devices but on one particular
Samsung Galaxy S2 running Android 4.1.2 (version JZO54K.I9100XWLSS).
It crashes on startup without a crash-report from google or from crashlytics which i integrated. Its not actually a crash it just flashes the main activity a while until the phone shuts down:
A video of that behavior:
https://dl.dropboxusercontent.com/u/523370/20131004_115027%5B1%5D.mpeg
Its a device from a user, so I cannot debug it locally. (Is there something to get a live logcat stream from the phone over the air?)
Has anyone experienced such a "crash" on start only affecting one particular device?
I have a SGS2 where it works without flaws. Could there be any hardware reasons resulting in such a crash e.g. Memory issue.
I know this problem is not likely to be resolved without any further source code / crashreports, but maybe someone can point me in the right direction.
best regards,
Mike
Actually shoe rat saved my day!
Because shoe rat just commented on the case I am answering it for completeness.
The user enabled the option
"Do not keep activities" which lead to this strange behavior, because an activity was killed during the splash screen.
As a future reminder to myself I will get rid of the splash screen because its not holo-style anyway.
Cost me a lot of time to figure this out and i probably wouldn't have found it without your help.