Android :: Dropping Pending Intents / Clean Up Memory Appropriately?
Mar 16, 2010
Is it ok to drop Pending Intents in android if they are never used. Such as in an AppWidgetProvider where a Pending Intent that was never used be overwritten by a new Pending Intent. Or should we call cancel on all unused Pending Intents to clean up memory appropriately?
View 1 Replies
Mar 24, 2010
I believe an app I installed put over 20 megs of space on my phone's memory (not the SD card) and when I uninstalled it, it did not remove it.
I have an un-rooted phone.
What is the best file manager to use to access the phone memory and see where the issue is, and allow me to delete it myself?
View 1 Replies
View Related
Nov 7, 2009
I have some code that is creating and removing alarms, and which works great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.The code that's giving this exception is: Code...
View 3 Replies
View Related
Apr 26, 2010
I've asked here a question about Task Killers and widgets stop working (SO Question) but now, I have reports of user that they don't use any Task Killer and the widgets didn't work after a while. I have a Nexus One and I don't have this problem.I don't know if this is a problem of memory or something. Based on the API: So, I don't know why widget stop working, if Android doesn't kill the Pending Intent by itself, what's the problem? Code...
View 1 Replies
View Related
May 13, 2010
I would like to show a notification that displays the progress of an ongoing operation. That works well for me. But at the same time the remote view should contain cancel button to stop the ongoing operation. The usual content intent should still do something else, i.e. not cancel the ongoing operation. It seems though that I can only have one intent. Code...
View 3 Replies
View Related
Nov 19, 2009
In my app, user starts a service and shows a notification from activity A. The notification creates a Pending Intent that will invoke activity A should the user tap on it. The problem with this behavior is that, if the user starts the service (which shows the notification), drags down the notification bar, then taps the notification, I now have two activity A's in the display stack, one on top of the other and both exactly the same. How can I re-use the original activity A in this situation so the user isn't duplicating activities?
View 4 Replies
View Related
Sep 8, 2010
in order to save some battery, I was wondering what happens if an activity registers a requestLocationUpdates and then the user (or the os) puts it in background or kills it. Will the location manger still be active and then will the pending intent still be fired? In other words, will the location manager still be alive even if its lancher does not exist anymore? I'd really love this scenario because allows me to link an intent service that handles the location updates without bothering of have something always running waiting for good news from location.
View 9 Replies
View Related
Sep 18, 2010
I have a Widget I am working on, that allows the user to have more then one instance of the widget on his screen. Each Widget ID maintains its own configuration file. However, for some odd reason my code that is responsible for setting up the buttons individually for each widget id is not working, only the first widget id is linked to each individual widget. Below is the code that is responsible.
private void TieClicks(Context context){
RemoteViews rViews;
PendingIntent editPendingIntent= null;
// Intent updateintent = new Intent(context,SyncNoteWidget.class);
// updateintent.setAction(SyncNote_Action_Widget_Update);
// PendingIntent pendingupdateintent = PendingIntent.getBroadcast(context, 0, updateintent, 0);
// rViews.setOnClickPendingIntent(R.id.widgettextview , pendingupdateintent);
// AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
int[] ids = appWidgetManager.getAppWidgetIds(new ComponentName(context, SyncNoteWidget.class));
for (int i =0;i< ids.length;i=i+1){
int wId = ids[i];
rViews = new RemoteViews(context.getPackageName(),R.layout.widget);
editPendingIntent = makeControlPendingIntentActivity(context, wId);
Log.v("syncnote", "tieing " + String.valueOf(wId));
rViews.setOnClickPendingIntent(R.id.widgeteditbutton, editPendingIntent);
appWidgetManager.updateAppWidget(wId, rViews);
editPendingIntent= null;
} }
private PendingIntent makeControlPendingIntentActivity(Context context,int appWidgetId) {
Intent active = new Intent(context, EditNote.class);
active.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
active.setAction(com.ntu.way2fungames.syncnote.SyncNoteWidget.SyncNote_Action_Edit);
active.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
return(PendingIntent.getActivity(context, 0, active, 0 ));
}
View 2 Replies
View Related
May 20, 2009
I've had an issue where no matter how I've tried to set it up I'm finding the Broadcast Receivers aren't receiving any Pending Intents. A look through LogCat confirms that the intents are launched, but they're not being executed. I managed to make a simple(ish) repro case. If you take the SimpleWiktionary widget by Jeff Sharkey http://code.google.com/p/wiktionary-android/ and make the following changes plus any required imports. Code...
View 8 Replies
View Related
May 11, 2010
Let's say I have a background service that performs several tasks. As it completes task A, it posts notification A with a certain intent and some extra data that indicates viewing result of A. As it completes task B, it posts notification B with a certain intent and some extra data that indicates viewing result of B. As it completes task C, it posts notification C with a certain intent and some extra data that indicates viewing result of C. At the end, the notification area has three notifications. Each one has the same intent, except for one of the extra data fields. I would expect that each one would load my activity with different extra data. They don't. When onNewIntent is called, each has the extra data field set to C. I have rooted out any possible aliasing and checked the data as it is placed into a notification. It seems to allow only one set of data per package. Is what I am attempting not possible? Has anyone accomplished what I am attempting? For example, have you had a service download several large files, and then had notifications that would open each of those. Code...
View 4 Replies
View Related
Apr 30, 2010
I have one WidgetProvider but expect the user to have multiple instances of the widget on the home screen. When the user clicks on the widget, an intent is fired to start an activity A passing a String extra (which is specific to that instance of the app widget). Everything works fine unless the activity is already running, in which case the activity is shown in its previous state (and so the intent extra data is ignored). I've tried using various Intent flags (like FLAG_ACTIVITY_NEW_TASK) but they don't seem to help.
View 4 Replies
View Related
Nov 6, 2010
My phone and sd card memory is very full and im sure that a lot of this is unused folders and data left behind by old uninstalled apps, temporary files etc. Is there some kind of disk clean up app i could get to remove all of this junk?
View 1 Replies
View Related
Jul 24, 2010
I'm using apps to sd, and have been noticing my internal memory slowly dropping. If I remember correctly, this is due to apps storing their cache there. Any way to direct it to the sd card?
View 4 Replies
View Related
Oct 25, 2010
My memory is getting very low.I know about all the move to SD methods; I want to try and get rid of some unused data first.I always see posts about clear data and clear cache.Yes, this frees up space but do the apps actually need this data? What is the difference between data and cache? e.g.If I clear data from my contacts app, will all my contacts be deleted?What am I safe to clean up? Is there a way of cleaning up everything at once? Is there an equivalent to defrag and disc clean up? Any advice on getting some memory back without moving apps would be great.
View 8 Replies
View Related
Jul 19, 2010
I have the Swype beta for android installed on my phone and I am only having one problem - double tapping in the word window. I know if you misspell a word you should be able to double tap it in the window after the fact and it should bring up the word choice window for you to choose. However, with Swype on my Evo, all it does it highlight the word and I cannot change the word.
My other question is about internal memory. My phone has been dropping MB of internal storage like a bad habit. I went from 400 to 320 in a matter of a few days and have not installed or saved anything outside of my sd card. Why is this happening? and what happens if that memory reaches 200 - 100 or even 0?
View 5 Replies
View Related
Mar 21, 2014
I bought a Samsung Galaxy S2 Hercules (T-Mobile) and its used. In the Last week I pull some photos and mistakenly delete them, but with my "Recurva" program i could see all the photos (mine and others owners)
On the one hand I'm happy for having recovered, but if one day I want to permanently delete photos, I have the fear that the other person recovers.
How I can delete all photos, videos and files in the cache memory?
View 2 Replies
View Related
Feb 17, 2010
Please clarify me What is Pending Intent with an example.
View 2 Replies
View Related
May 11, 2010
I am newbie to Android. I read the Android documents. Can anyone tell me what "Pending Intent" is?
View 1 Replies
View Related
Aug 13, 2009
I'm writing an application that demonstrates various gesture algorithms, and Toast after each one is detected. of course if the user goes all hogwild then the Toasts back up. can i flush the Toast queue somehow?
View 2 Replies
View Related
Oct 29, 2009
I've started using an AlarmManager for some tasks i'm doing and while setting up the pendingIntent to be broadcast I noticed there is no receiverPermission option. Can anyone tell me is it possible to set the receiver permission on a pendingIntent?
View 10 Replies
View Related
Aug 18, 2010
That message can occurr if the receiving code crashes or takes too long. I am writing an appwidget for my application, there are like multiple pending intents are there to launch an activity or receive a broadcast. The Problem I am facing is , some times I get exception saying that the Pending Intents cannot be delivered. And the widget does not responds to the touch from the user. please help me. I am not able to find any alternative also.
View 2 Replies
View Related
Jun 9, 2010
I have a alarm thing going on in my app and it launches a notification that then when pressed launched an activity.The problem is that when I create more than one alarm then the activity launched from the notification gets the same extras as the first one. I think the problem is either with the intent i put in the pending intent or in the pending intent itself. I think I might need to put a flag on one of these but I dont know which one.The "details" extra is the same to every the next time a notification happens instead of having the different value.Until I set the intents I am sure that the correct value goes to the "details" so its a problem of getting the first intent everytime i press any notification. How can I make it to launch the correct intents?
View 2 Replies
View Related
Sep 30, 2009
Is there a way to access pending notification or the previous notification that my application created?When I use Notification manager and use its setLatestEventInfo() method the last notification (with same intent) is updated. This is exactly what I want but when I update the notification, I want to access the existing notification's intent and get the key/value paris (Extras) and use that information to update the notification. For example in an SMS notification, I want to to get the current message (key/value pair or message itself) and update that with the new value. ( For giving the number of notifications, I can use the Notification.number, but that I want to access more values). One workaround that I am thinking is to put the data of first notification in database or in preference and access it when the second notification comes. But this is not exactly what I want, it is easier to use the existing notification instead of storing in database or preferences. Related Question: What do you suggest I use, Database or Preferences? Is there a best practise in terms of performance and elegance?
View 3 Replies
View Related
Jun 28, 2010
I would like to create some home screen app widgets that are entry points into an application. I can put a button in the app widget that uses setOnClickPendingIntent to start the activity. The problem occurs when I want to have two of these app widgets that are entry points to different parts of the activity. I need to be able to pass data into the activity that will distinguish these. Since both app widgets use a Pending Intent that starts the same activity, the two Pending Intents are shared and I can't reliably set extras for the corresponding intents.
View 2 Replies
View Related
Aug 8, 2010
Is there a way for the sender of a Notification to know when that Notification is delivered to the receiver? i.e. Some method that can check if a the user has clicked on a given Notification.What I'm trying to accomplish is this: Have my Service send a notification with a PendingIntent to start ActivityA. But if the user starts ActivityA without clicking on the Notification, I would like the service to cancel the Notification and send a direct Intent to ActivityA
View 1 Replies
View Related
Sep 16, 2010
I created a widget that when clicked activates a PendingIntent.The problem is when I have more than one widget on the screen only the latest one will start the PendingIntent.I have read some about a unique request code, but not figured this out.Any ideas how I can have multiple widgets and the PendingIntents work for each?
View 1 Replies
View Related
Oct 30, 2010
Since I installed 2.2.1 (could be coincidence), I regularly find that the USB icons in the status bar disappear. Sometimes reinserting the plug helps, most often not. The device registers the incoming power (evinced by the LED) but not the data connection (no icons popup for mounting etc).
View 5 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
I've read many posts on the same topic and tried all the given solutions without getting the result I want.The program should start an intent with extras from a notification.The problem is that when a new notification is shown, the extras added to the intent is the same as in the first notification. I've triend with differnt flags in both the intent and the pending intent, without result. What am I getting wrong?If i just launch the same activity (and the same extras) with a button, everything works as it's supposed to.
View 1 Replies
View Related
Jun 29, 2010
A few days ago I was struggling to find a way to use custom intents for my alarms. Although I got clear answer that I have to customize the Intents based on some unique ID eg. setAction() still have some problems.This can happen more than once for a contact. And when the second message is generated, the notification is raised well (message is fine there) but the intent when the user actions the notification it uses old data, so previous message is passed and not the brand new message.So someway the intent is caching and reusing previous extras. How can I make it unique per contact and per action?
View 3 Replies
View Related