Android App getting kicked off from device - android

I have developed an app which does some content processing in background continuously. The app is compatible in Android 6,7,8. The memory CPU usage of the app is just 6%. When run the app in Samsung - Android version 8.1 it runs fine continuously but in OPPO Android 8.1 the app is getting kicked off. I don't see any errors in the logcat or any app crash. Any ideas around the issue - why it happens, how to debug the root cause etc will be very helpful.

Related

Not able to find App lock setting in Alcatel 1 phone

Is there any way to lock recent app in Alcatel 1 phone. Because i've followed google guide and i didn't found any lock option in recent apps from feature view.
please help me to keep an app in lock mode for not killing the app when it is running long time.
Android version: 8.1.0

Android: is there a way to dump crash logs locally on test device with no computer connected

I'm experiencing pesky SIGSEGV faults in my Android app. They are inconsistent to reproduce and mostly happen after my app has been restarted a couple of times. The problem is, when the app restarts, Android Studio stops showing the logs, making it very hard for me to figure out what the issue is. When I restart the app using the Android Studio restart button, it loads a fresh install of the app onto my phone, which is an issue because the errors don't seem to happen on very fresh installs.
My question is: can I somehow have Android Studio still show the live logs WITHOUT reinstalling the app every time, OR can I run the app without being connected to any PC, and dump a crash log file locally to the phone when the app crashes, so that I can open the logs later on?
Filtering logcat
The problem is, when the app restarts, Android Studio stops showing the logs, making it very hard for me to figure out what the issue is.
It sounds like the logcat in android studio is filtering by application. You can change it to no filter and set the text filter to your application's id. This way the logcat will not be cleared once the application process dies/restarts.
Extracting the tombstones
Since this is an Android native crash it will not be sent to bug capturing software such as Crashlytics or Bugfender etc.. you can pull the tombstone[s] directly from the device with adb.
adb bugreport bugreport.zip
Once extracted, the tombstones will be under path /bugreport/FS/data/tombstones/.
Typically 10 tombstones will get saved to device storage but will get overwritten by earlier native crashes once the limit to the number of retained tombstones has been met.
Android documentation: Using bugreport
Android documentation: Debugging tombstones

Logcat in Android Studio Android Monitor only runs once

I am new to Android Studio (running the latest updated version) however I am trying to debug with Android monitor and Logcat only seems to work once then stops reporting!!!
This occurs for all my projects?!?
If i restart Logcat it just clears the messages.
I assume the emulator cannot connect to the debugger for some reason.
When I restart Android Studio logcat reports, but when I close the app running on the emulator it stops reporting.
This CANNOT be the default intentional behaviour, does this affect other people?
Many thanks for any help at all.
Simply restarting Android Studio is the best solution
By default if your close the emulator it unattaches itself from Android Studio, stops Android Monitor and logcat and doesn't reattach when starting again. If you stop it in android studio and run it again the emulator is still attached to Android monitor and logcat.
I assume the emulator cannot connect to the debugger for some reason. When I restart Android Studio logcat reports, but when I close the app running on the emulator it stops reporting. This CANNOT be the default intentional behaviour, does this affect other people? Many thanks for any help at all.
An answer to this part is that it does not sound like expected behavior of Android Studio / logcat / emulator. I am able to start and quit the app multiple times, each time logcat connects when the app begins and disconnects after. I can start the application through Android Studio or through the apps menu on the emulator. I can quit and restart the emulator.
An easy thing is double check the dropdowns along the top of the logcat display, especially the emulator, app, and filter selectors.
I once had an issue that sounded similar, with logcat not reconnecting. The issue there was my terminal and IDE were running different ADK installs and they were competing for the logcat connection. So what you describe is possible, but not the norm. Perhaps another debuggable app or connected device could cause similar confusion.

Android studio: Android device freezes after crash

New at Android. I am testing my app via Android Studio, running, not debugging. My device is a Samsung S2, API level 16.
Almost every exception freezes the device and requires restart or even battery remove&insert. Any solution to this?
UPDATE:
This seems not to be code related and happens on different projects. Any NullPointerException for instance would cause the device's screen to turn black. Sometimes the device will restart itself, other times I would have to remove the battery and re-insert it.

how to troubleshoot android app errors in other devices

I've made an Android app that it's causing a couple of problems to a few users. I can't reproduce those problems in my test devices (3 different devices with 3 different Android versions). I've been debugging the app with Eclipse and I don't see any kind of error where those users are having the problems.
The app is a Phonegap/jQuery Mobile app built with Eclipse.
How can I get the logs from those devices? I know the users so they would cooperate with anything I asked for to install or do.
EDIT
I'll give more info about the issues themselves. The app doesn't crash, it seems a jquery issue when changing pages, instead of showing the correct page the app gets stuck with the spinning thing. But it only happens in those 2 devices (Galaxy S4 and Note 3) that run Android 4.3. I've tried in other devices with Android 4.0.1, 4.2.2, 4.4.2 and no problems at all.
Oh, and I've already tried running the app in an emulator with 4.3, trying to replicate the S4 as close as possible in the emulation specs, and no problems there...

Categories

Resources