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 ?
Related
Is it possible to programmatically dismiss the screen sharing prompt message that pops up when we call MediaProjection.getScreenCaptureIntent()?
No, ordinary apps cannot dismiss system dialogs, particularly those pertaining to permissions.
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
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.
I have the following flow in my application and dont know how to implement this in an android way.
The user can check in the app if there is a update available, if so he can choose if he wants to download it, and once it is downloaded an update of the database takes place.
In the android documentation I only find basic description of either a progress dialog, or alert dialog but not how to have something more complex. For the sake of the example what i would like is the following.
The user clicks the check for update button
A progress dialog with checking for update pops up (which can be canceled)
If there is no update available the user gets informed and can click ok.
If there is an update available the user can choose to download it or cancel.
If he chooses to download he sees a progress bar. (with a cancel button)
Once the download is finished he sees a database updating alert dialog.
Finally he gets an all is done info and can click ok
Just an example yet what is the android way of implementing a series of dialogs like this. Wizard, series of different dialogs, one always changing one ...
Suggestion how to implement this in a recommended way would be highly appreciated
thanks
martin
Each dialog can launch the next subsequent dialog and automatically dismiss itself. Look at the DialogListeners attached to each button in example code
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.