Android :: How To Clear Notification If Activity Crashes?
Oct 26, 2010
In my app, I'm creating a notification with the FLAG_ONGOING_EVENT flag set.I'm cancelling the notification in onDestroy, but if my app crashes before calling onDestroy, is there any way to have my notification go away?
View 2 Replies
Jul 16, 2010
I'm trying to understand remote services at the moment and everything works fine, i can start the service and know how to communicate with it through the AIDL-interface. My problem is that the service seems to still run in the same process like the activity it was started from, because the activity crashes too, if there is an error thrown in the Service.
I set the service process to remote ( android:process=":remote" ) so what am i doing wrong? Or what do i have to do to unbind the service-process completely from the activity-process?
View 1 Replies
View Related
Oct 14, 2009
we are developing an application where we are depending on a native, custom-written library which sometimes crashes. When the Activity crashes (it's the Activity's SurfaceView that crashes, either while resuming or pausing Activity) we would like to automatically restart the Activity that was just running, preferably without seeing the idle screen in between. What we find strange is that sometimes, our Activity is restarted by Android automatically after the crash, and sometimes not. How does Android decide this? Is it somehow dependant on exactly what the Activity was doing at the time of the crash and if that was considered important enough to restart? How can we force a restart to make sure the Activity doesn't quit after a crash? Running on device flashed with Android 1.5. The Activity is running as singleInstance. Doesn't seem to make much difference which mode it is though. Other methods we have tried are:
1) Since we can predict when crash is going to happen(but not stop it), use AlamrManager to start the Activity again via an Intent, 3 seconds later. Has the disadvantages that 1) need to be able to predict crash 2) if crash takes longer than 3 seconds (normally about 2s) it won't work 3) Idle screen is seen for about ~1 s, since some slack is needed.
2) Start a Service, then let the Service (which always seems to be restarted by Android after crashing) start the Activity in its onStart method. Has the disadvantage that Android doesn't restart the service until 5 seconds after the crash, so the idle screen is seen quite along time before Activity restarts. Is it possible to modify how long it takes before the Service is restarted by the Android system?
View 4 Replies
View Related
Mar 3, 2010
So I have an app with Activity A. The layout on the activity is dynamic genearted. So it's possible that on Activity A a user hits a button that goes to "A" and the new page looks different, then a user clicks another button to go to "A" again. Now I have 2 Activities in the history stack. A, A, and currently on A. Is it possible that if a user clicks a button that the whole Activity stack is cleared in a scenario such as this?
View 5 Replies
View Related
Mar 3, 2010
example scenario is: from login screen - main screen - then when i clicked a hide button the app will go to home screen, and when im going to click the app again the main screen would be called.
View 2 Replies
View Related
Dec 22, 2009
All the current discussions involves clearing all activites above an existing activyt, but I'm trying to find a way to clear all the activities before the latest activity in the stack. So my scenario is A -> B -> C and then when a user goes to Activity D, activies A,B,C should be cleared from the activity stack. FLAG_ACTIVITY _CLEAR_TOP seems to only clear any activites above an existing activity. Anybody run into this scenario and found a solution?
View 4 Replies
View Related
Sep 17, 2009
i want to clear the activity stack and replace it with a new activity as the root activity, even if that activity exists somewhere on the stack (or not). i see FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_NEW_TASK, but it's not obvious to me how to use those in conjunction to achieve what I want. it's like i want to completely restart the task with some activity that i specify as the new root.
View 9 Replies
View Related
Apr 22, 2010
I have a huge maze of activities in my application. What I need to do, is that when the user logs in into the system, the activity history should be cleared. I cant just use finish() when I start a new activity, because I want the activities to have a history until the user logs in. I have experimentet with the different flags when starting an activity, but I have had no success.
View 1 Replies
View Related
Mar 23, 2010
My app crashes when i call a ListActivity from an Activity. I have searched on Internet and many people ask the same but i have not found any response. The only person i have found that solves the problems says that he solved changing manifest but he does not say nothing else. I i put the ListAvtivity as main activity in manifest app works ok buet if a set an Activity as main activity an then call ListActivity like:
Intent searchAct = new Intent(this, SearchResult.class); startActivity(searchAct);
then my app crashes. Des anybody know what happens?
View 7 Replies
View Related
Feb 10, 2009
I am wondering how you would cancel a notification when you are not the party executing the associated Intent.For example, think about an Intent like ACTION_VIEW and a data/url like http://google.com. This intent is then wrapped into a PendingNotification and used by a notification. So when the user clicks on the notification the intent is fired, the browser opens, but the notification is not cancelled. As my code is not the receiver of the Intent how should I cancel it?
View 3 Replies
View Related
Apr 19, 2010
Is it possible to clear a notification programatically?I tried it with the NotificationManager but its not working.Is there any other way i can do it?
View 2 Replies
View Related
Aug 13, 2010
I have read many examples of how to create notification messages.What i wanted to achieve, is because the notification will be executed by a widget, i would like the notification intent when clicked to clear it self when the user clicks on it.I do not have an activity to return to.The notification for my purposes will just plainly notify, nothing else.So what would be the code of an intent that just clear/cancel itself.The code below is an activity launched by a button(button code not included) the notification will be fired up by a background service.
View 2 Replies
View Related
Nov 3, 2009
Is there a way to clear our Activity stack? For example, a user in my app progresses through these activities, one is launched from the previous activity: ActivityA -> ActivityB -> ActivityC if the user is now looking at ActivityC, and they hit the back button, they will go back to ActivityB. Is it possible to add a menu to ActivityC where the user can clear their activity stack, and then launch a new instance of ActivityA? This would be so the user can jump to a particular activity in my application without getting confused with the back button + history,
View 4 Replies
View Related
Jul 7, 2010
i want to clear miss call notification from NotificationBar.
View 3 Replies
View Related
Jan 6, 2010
I have three activities. Activity A start activity B by the method startActivityForResult, and Activity B start activity C by the method startActivity. Then, after starting activity C, activity B kill himself by finish(). Now the task stack stored two activities: A and C. My question is: how can I finish activity A when I finish activity C. or how can I clear the whole stack of the task.
View 5 Replies
View Related
Jun 30, 2010
At the beginning Activity is launched by an Intent and something is done with this Intent. When I change orientation of my Activity, it's reloaded again and Intent is passed to the Activity. How can I clear that Intent to prevent Activity from using it again?
View 1 Replies
View Related
Sep 2, 2010
I have this annoying "voicemail pending" in my notification bar that will not go away. When I pull down the notification bar it says "Voicemail Pending. Tap ehere to call Voicemail. Sat, July 24, 2010." I tap it, it calls my voicemail, but it says I have no voicemail. The notification doesn't go away. Is there a way to "force" this notification to go away?
View 2 Replies
View Related
Jul 5, 2010
What's the best way to clear the notification number when the user clicks on the notification? I say the best way, but really I haven't found ANY way. I'm launching a built in activity when the user clicks on the notification, not something I wrote so I can't clear it that way. I've got the notification manager's flag set to clear.But whatever I do the Notification.number keeps going up and never resets to 0.
View 1 Replies
View Related
Feb 27, 2010
when i run my application i am running one notification service .how i disable clear notification service button in my application only i need to run the service when my application is running .is there any way to disable the clear notification button.
View 2 Replies
View Related
Jun 18, 2010
I have been using Google Voice since I received the DInc 6 weeks ago. All was well.yesterday, I had a Voice mail notifier appear and it was the symbol that looks like a cassette tape sort of. This ca be accessed through the basic SMS messages icon.It wants me to dial my # and listen to a message. There is no message, and I do not know how to clear the notification.Also, I do not know where this VM came from and I want to get rid of it so it does not happen again. removing the Messaging tab and reinstalling it, nothing changed.
View 4 Replies
View Related
Sep 3, 2012
I cannot find any app that will automatically clear a specific notification once its been received. I keep receiving a useless notification all the time, and keep having to clear it. I want an app that will automatically clear that notification every time I receive it.
View 9 Replies
View Related
Jan 25, 2010
I have an application with 2 activities, LogonAct and MainAct. LogonAct is a logon activity which I want to force the user to go through each time they return to the application. I've set android:clearTaskOnLaunch="true" on LogonAct.
View 1 Replies
View Related
Jun 9, 2010
All activities in my application require a user to be logged-in to view. Users can log out from almost any activity. This is a requirement of the application. At any point if the user logs-out, I want to send the user to the Login Activity. At this point I want this activity to be at the bottom of the history stack so that pressing the "back" button returns the user to Android's home screen.
I've seen this question asked a few different places, all answered with similar answers (that I outline here), but I want to pose it here to collect feedback. I've tried opening the Login activity by setting its Intent flags to FLAG_ACTIVITY_CLEAR_TOP which seems to do as is outlined in the documentation, but does not achieve my goal of placing the Login activity at the bottom of the history stack, and preventing the user from navigating back to previously-seen logged-in activities. I also tried using android: launchMode ="singleTop" for the Login activity in the manifest, but this does not accomplish my goal either (and seems to have no effect anyway). I believe I need to either clear the history stack, or finish all previously- opened activities. One option is to have each activity's onCreate check logged-in status, and finish() if not logged-in. I do not like this option, as the back button will still be available for use, navigating back as activities close themselves. The next option is to maintain a LinkedList of references to all open activities that is statically accessible from everywhere (perhaps using weak references). On logout I will access this list and iterate over all previously-opened activities, invoking finish() on each one. I'll probably begin implementing this method soon.
I'd rather use some Intent flag trickery to accomplish this, however. I'd be beyond happy to find that I can fulfill my application's requirements without having to use either of the two methods that I've outlined above. Is there a way to accomplish this by using Intent or manifest settings, or is my second option, maintaining a LinkedList of opened activities the best option? Or is there another option that I'm completely overlooking?
View 2 Replies
View Related
Jan 12, 2010
Is there anyway to clear the New Voicemail Icon from the notification bar w/o actually Checking the voicemail? It doesn't seem to go away for me when I hit clear notfications lol..... IDK why but having notfications on my screen of any phone i've had has bothered me immensly... and I hate checking my voicemail for one message I kno I will be deleting in the 1st 2 seconds of listening too it
View 2 Replies
View Related
Sep 14, 2010
On my wife's Droid X, the status bar indicates that she has a voice message. After logging into her message box and clearing all voice messages, the status indicator never goes away. Any idea how to clear this out? It's been there for a few days now. I've tried powering down and removing the battery. We are on Verizon if that matters.
View 7 Replies
View Related
Jun 26, 2012
I had tried to download 1 attachment from my Gmail app on Nexus S. The attachment got downloaded. But the download status bar in notification view which comes when we drag it down is still there. I tried several things like restarting phone , deleting and downloading the related file again etc.
But still the problem persists.
View 4 Replies
View Related
Jan 16, 2014
Galaxy S4 on 4.3 using stock email app for Exchange connectivity. (Verizon)
I receive about 100 new messages a day from our Exchange server. 1st email comes in for the day and I get a from and subject in the status bar. Messages after that show : (message count) new messages blah blah. By the end of the day it says I have 100 new messages. If I clear the notification, the next time I get a new email, it says 101 new emails. The "clear notifications" does not reset the count! It does for Gmail, which makes sense. The only thing that will reset the count is by going into the email program and then exiting back out. This is a bug, right? I realize I can "drag down" and get more detail on the messages, which is great, but I want the count to reset when I swipe the notification away.
I am writing an app for a smart watch and the problem lies where everything after the first message is not giving me the detailed information I need for my app. As a human using the phone, I can just launch the email app. No big deal. Can't do that from a watch when the phone is locked.
View 2 Replies
View Related
Apr 25, 2012
At the moment I am using CM 7.1 on my Desire HD.
I was wondering if it is possible that when I swipe to clear a notification (in particular messages, I used GO SMS for text messages and Whatsapp) that it counts as a 'read' message. At the moment it just removes it from the notification bar although the message is still unread.
I hope I made clear what I am trying to get across. Is what I am looking for even possible?
View 2 Replies
View Related
Apr 17, 2012
At the moment I am using CM 7.1 on my Desire HD.
I was wondering if it is possible that when I swipe to clear a notification (in particular messages, I used GO SMS for text messages and Whatsapp) that it counts as a 'read' message. At the moment it just removes it from the notification bar although the message is still unread.
I hope I made clear what I am trying to get across.
View 1 Replies
View Related
Aug 13, 2010
Is it possible to start an activity on the stack, clearing the entire history before it? The situation I have an activity stack that either goes A->B->C or B->C (screen A selects the users token, but many users only have a single token). In screen C the user may take an action which makes screen B invalid, so the application wants to take them to screen A, regardless of whether it is already in the stack. Screen A should then be the only item on the stack in my application. Notes There are many other similar questions, but I haven't found anything that answers this exact question. I tried calling getParent().finish() - this always results in a null pointer exception. FLAG_ACTIVITY_CLEAR_TOP only works if the activity is already on the stack.
View 1 Replies
View Related