Alert on uninstalling an android app - android

When someone is uninstalling my app, I'd like to pop-up some kind of alert or dialog that asks the user why they are uninstalling my app -- kind of like a survey. This way, I can determine why they are unhappy and try to improve it.
I've determined how to detect when my app is being uninstalled using the ActivityManager + getRunningTasks, however, when I try to pop-up an alert using either AlertDialog or Dialog classes, they don't seem to show up. I am able to pop up a toast though pretty easily using the Toast class in Android.
My next attempt is going to create a system alert window -- something like this:
How to open Alert DIalog System level in android
Is there something better though?
Thanks,
J

Official Android Documentation states that you can Listen if another App has been removed, but not your own:
http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REMOVED

Related

Show dialog from service

I'm creating a voip app and when a call comes in I need to alert the user so they can accept or reject the call. I want a dialog like what hangouts uses:
I've tried using an alert dialog with type TYPE_SYSTEM_ALERT. However there are issues with this:
It requires ugly system permissions. (takes you to a full screen activity to accept overlay permissions)
It displays centered vertically not at the top over the top bar.
Any time anyone asks about this online everyone says your shouldn't be doing it this way, but doesn't tell you how to actually do it.
I didn't have to accept any overlay system permissions on my hangouts so how does google do it?
What is the correct way to display a dialog to the user from a service to accept a call?

screen overlay detected when my app loads

I am getting complaints from my customers that when they load my app, they see a "Screen Overlay Detected" alert message from the system. Note that this only occurs on Android M or higher.
The alert looks something similar to below.
http://i.stack.imgur.com/BEGzf.png
From my understanding, this is caused because some "other" app on the device is requesting the "overlay" permission. I've confirmed with my customers that if they remove the app that has the "overlay" permission, then it fixes the problem but is there anything I can do on my side?
Meaning, is there some way for me to inform the system to not allow this alert dialog to be displayed? It's distracting to my customers to see this every time they load my app and it's more frustrating to "me" that there is nothing I can do to fix this.
It seems that you are using a Screen Filtering app(the brownish overlay on the screen). Turn off and it won't bug you.1

Android activity popup on lockscreen

Ok, first time asking, I couldn't find a solution anywhere..
I'm trying to create an activity that pops up on the lockscreen, kinda like Handcent does (or even Viber, maybe? Can't remember), but I can't for the life of me find a solution that actually works, be it flags, system alert and such
So far I only managed to achieve a workaround by having a dialog themed app and unlocking the phone before showing it but that's not what I'd like to have in the final product, plus it doesn't unlock all kinds of lockscreen (based on user feedbacks, I've had reports of Handcent successfully displaying a dialog while my app can't unlock it)
Is there any tutorial or code snippet for this?
For Unlocking the Phone programatically this should help.
And as you are already using the Dialog Theme, your application's "pop-up" requirements are completed.

Android Notification - Popup dialog box

i am trying to create a dialog box to appear in the middle of the screen when my main program is not in focus and running in background. The purpose of the dialog box is to force the user to take an immediate action. I am already using the notification manager to notify the user but i would still like a old school popup dialog box.
Thanks :D
Popping up a dialog from an application running in the background is thought of as bad practice because it may confuse the user, and may annoy the user because you are disrupting the current task s/he is engaged in.
It is advised by the Android developers to use the Android notification system for tasks like these. A guide to create notifications is here: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
Dialogs are created with the Intent of the current activity. Since your app will not be in focus at the time, you cannot create a dialog.

Change Custom dialog of ANR(Application not responding) dialog (Android)

I am writting an applications launcher (like home screen application). And I am wondering whether we can intercept the default dialog occurs when some application doesn’t respond in 5 seconds. What I want is: instead show the default alert dialog the launcher will show another dialog. I was googling for a while but haven’t found anything. Could anyone please tell me whether it is possible ?
Thank you in advance
This dialog is a system dialog, warning the user Android can't let this app do its job because it seems to have crashed. So I don't think this dialog would be allowed to be changed. Why would you want to change it anyway ?

Categories

Resources