Can no longer open android app (until reinstall) - android

I've been having reports from users saying that they can no longer open our app; and I have now seen this on my own phone.
When I tap the app icon the screen goes black (showing the title but that's it), then quickly the black screen disappears and you're back in the OS.
Logcat shows zero issues when this happens.
Anyone know what could be happening? This issue has only become apparent within the last few weeks before that there were no reports from users on this particular issue.
EDIT: I've tried restarting the phone, force-stopping the app and clearing the cache+data to no avail.

If your app having use internet or http request over network then write code in method onResume otherwise for http request use asynchronous task

Related

Reopen my Flutter app in background on FCM message

all day I already despair of a waking up system for my VoIP app. I must have already read over 100 articles and documentation about it, however I have not found a solution that works for me.
Use case:
My app is running in the background. That means the home button was pressed
after my app was started and the device is in the home screen. As soon as a notification arrives, the app is supposed to open again on a certain route because a call is coming in.
In the lock screen I managed this pretty easily with flutter_local_notifications and within the app it was of course no problem either.
Note:
Only Android is important, the rest can be neglected
Android version 10+
Flutter version 2+
I appreciate any input on how to solve my problem and have a good week.
Kind regards,
Shiro

Android app/activity disposes when switching to another app

I've been asked to fix an android application which has issues after switching to a newer device. The switch was from android 7/8 to 11. The application opens up google maps for navigation but very often when returned to the app all data is lost, and clicking on anything will reset it back to the startup activity. It doesn't matter which apps it switches between the issue happens with all of them.
I've tried several things:
-Disabling all battery saving options on the device
-Using OnSaveInstanceState to retain the data
-Using a backgroundservice to retain the data
The issue only occurs on actual devices, using an emulator results in no errors.
When the debugger is attached to the application it loses its connection before returning to the app. It is possible to re-attach when returning to the app but it disconnects as soon as
anything is clicked.
And best of all there's literally no error message shown anywhere.
The following comment provided the solution I needed.
You would need to start a foreground service, complete with its Notification. Even that does not guarantee that your process will remain around.
– CommonsWare Sep 1 at 12:40

App is left open for a long period of time in the background, when brought to front it crashes

This problem happens when the user exits the app but doesn't quit the app. Then if the app is left in the background for too long it crashes when the user brings it to the front again. After the app crashes it relaunches the app, which is fine because no data is lost and it is very quick to get back to where the user was.
I pretty sure this problem is a result of the Garbage Collector recycling classes that were created in activities.
I not so concerned about fixing this problem as I don't really see it as much of a problem but I would like to keep the game from displaying the crash messages. It displays like 4 or 5 "app has crashed. send a report". And you have to hit yes or no to get through all of them before the app relaunches. Not only is this annoying for users but it also creates a lot of crash reports in my console that aren't a real concern.
My idea for a solution to my problem would be to catch these null pointers (the first always occurs at the same point) and then relaunch the app. But how do you completely quit and relaunch an app?

Prevent an app to show on recent application list on android kitkat 4.4.2

I was just bored of iOS and I recently changed to Android. I have a Nexus 5 device, and I've just finished installing my favourite apps in my device.
One of those apps is Line, the famous communication app from naver. I installed it and I configured it with a passcode in order to secure access to it, so no one despite me could see the "confidential" conversations inside.
The problem is even if I have the passcode enabled on line, if someone presses the "Recent list applications" button, they can see perfectly a screenshot of Line with my last conversation, so anyone could see what I was doing in Line.
I made the same test on iPhone and .. surprise ... iOS is taking the snapshot AFTER the passcode screen is enabled, so anyone could see nothing. It seems that in Android the snapshot is taken BEFORE passcode screen is enabled so anyone could see what last line screen looks like :)
So, having read other threads on this forums, I'm supposed to have several ways to solve this:
Wait for LINE's company NAVER to add an option to prevent this app to show on recent app list (adding android:excludeFromRecents="true" on THEIR manifest) [that won't be soon]
Wait for LINE's company NAVER to force the snapshot after passcode screen is enabled [maybe soon but not in company'sroadmap]
Decompile apk and change manifest on my own - or use FLAG_SECURE - (I tried it but when I launch the new app it suddenly dies on startup with a message "Application stopped". I thing LINE's server verifies on startup that the client app is what is expected to be, comparing sizes or something else)
So I don't know more ways to get around this. Do you have any more idea? I'm stucked on it.
Thank you a lot.
Detect when LINE has left foreground
Create a background service that detects if LINE is on foreground and when it leaves the foreground. (https://stackoverflow.com/a/14044662/1683141)
When line has left foreground, you should take action:
A. Stop the line app completely
OR
B. Open & "close" the line app so it will show a locked state in the multitask thumbnail
A possible way to accomplish situation B:
Optionally: detect which app the user has now opened and remember it
Wait a few seconds and open the LINE app again after the user closed it (by intent for example)
Now the LINE app will show the lock screen
Now let the background service open the home screen (or make an intent to the remembered activity)
Now the LINE app is back to the background and it will have a multitask-thumbnail showing the locked screen.
Ofcourse, this will create a loop, and this isn't a stable solution
-Option A is a relatively reliable, and a (in my opinion) good way to accomplish what you want: no one can see your secure chat. Disadvantage is that the application is now removed from multitasking.
-Option B is only an idea, but maybe, if it's done the right way, It could work.
Edit: Option A will not work. The application will not be removed from multitasking if the task is killed.

how to disable error messaging android

Problem:
I am working with custom UI, now. There are some threads inside a program. Sometimes system shows message that my app has stopped. But it's false in my case. My app instantly restores itself and keeps working so everything is just fine.
Question:
Is there a way to disable any system messages appearing?
I am new in android and will be really grateful for some advice.
(edit)
Well so i found the following. App crushes on start after it was "closed" by hardware "<-- Back" button. Not every time only sometimes. When i select it in menu of opened apps once more it opens normally and runs just fine. Is there a way to remove that "crush" message? sure i do understand that app has crushed and its not good at all.

Categories

Resources