Suppress unfortunately app stopped - android

I'm developing a kiosk type application, running on a rooted device.
One feature of the app is that you must be able to download new versions of the app via wifi. However after running sudo commands to uninstall the app & reinstall the new one, we see the message 'unfortunately app has stopped'.
I'm trying to find a work around. The client does not want this dialog to be shown.
I thought of creating a second application to host on the device in order to display whilst updating and to close again after, but even if the other app is in the background, we would still be able to see the dialog which is against the clients wishes.
Any suggestions?

I doubt that the solution you thought of will work.
You receive the message saying unfortunately app has stopped because it is getting uninstalled while it is still running either in the background or not it doesn't matter.
What I would imagine could be a solution is sending out a command to quit the application you could use force-stop for this.
Take a look at these posts they might help you out
Stopping an Android app from console
Force Close an app programmatically

Related

Notification service is running (always)

I hired a developer to build an app for me, I noticed this issue and he said he doesn't think (or know how) it could be fixed. The issue is that every time my app is launched and you're logged in, this notification appears and stays there even if you close the app, you cannot swipe to remove it, you can either remove the app or kill it, or reboot the phone. Any idea how to fix it, he's using "Pusher"
Here's the example after launching the app
You have to manage your service so that it can be started and stooped as per your usage.
Please post the code or connect with me # napsterkr#gmail.com for further help.

How to stop another android application programmatically which is running in backgraound? Without Root

I'm developing an android app which will display list of all the installed app in mobile.
I'm already listed all the app which are installed in my phone, and trying to stop a app from list.
I want to stop a app from list by one click. Without Root
Thanks in advance.
You can only kill your own apps, for example, the apps which are running in the same process or with the same userID. You can not kill others, unless the device is rooted.
Look at this answer to know about killing background processes of app.

is there a way to launch google device inspect on cordova run app on device function

I am debugging app with cordova and I have always wondered if there was a way to launch googles device inspect as soon as the app starts running on the device.
This screen is familier to most but just wondering if there is a more efficient way of opening the inspect for the web-view without having to wait for app to install then launching the inspector and lastly hitting refresh to get the get the network information.
So some call back like:
cordova run --device OS --launch device-inspect
GapDebug, which seems to be merely a wrapper around chrome inspect, promises a feature like this:
GapDebug detects an app termination and restart, such as during an app update, and automatically reconnects the app with the previous debug session. Quickly get back to debugging when the app closes on your device.
Taken from their features site...
To my knowledge there isn't.
If you make changes to the code you have to compile and install the app on your device or else you won't have the most recent build.
And if I'm not mistaken the way "Inspect" works is by attaching to a running process and you can only start to "listen" after the process has already been created.
Or as #Phonolog sugested, use another debugger

Android - Google Play Store closes app for update and not opening it afterwards

I've got the following situation: My app is always running on my Android device. Because I want to be able to update it automatically I've activated Google Play Store auto-updates.
When Play store recognizes the new version I closes my app (what is ok) and updates it (great!). Unfortunately afterwards the app is not opened again.
Does anybody know a solution or has an idea how I can tell my app, the store or the device to open my app again?
BTW: My app starts on system start-up. So rebooting the devide would be a possibility as well. But how to I catch the update-finished event?
Thanks!
Edit: I build the app. It has a listener for the system startup so it is started on boot.
Post Honeycomb, apps have to be started manually by the user after installation or upgrade.
If you need your app to always run continuously, you would need to turn off auto update and manually update it yourself so that you can launch it manually after updating.

How to know user is uninstalling app, run some service or show dialog before uninstall of my app

I have an android app, I want to run some process or show some message to user if he is uninstalling app, how to do that in android...
You could have a second app set up to receive a PACKAGE_REMOVED broadcast when the original app is removed. I don't think you can affect the first app being removed, but you at least you can react to it (to clean up files, etc.). That would only work, of course, if the second app was not removed first.
Not possible. If your user wants to uninstall your app, why do you think it would be OK to have anything pop up before they can do that?

Categories

Resources