Android :: Multiple Notifications -/Pending Intents With Different Data?

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...

Android :: Multiple Notifications -/Pending Intents with different data?


Android :: Pending Intents In Notifications

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

Android :: Possible Bug With Intents / Pending Intents

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

Android :: Need Widget / Pending Intents

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

Android :: Reusing Intents With Notification / Pending

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

Android :: LocationManager RequestLocationUpdates And Pending Intents

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

Android :: How To Tie Pending Intents To Specific Buttons On Widgets?

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

Android :: Broadcast Receivers Not Receiving Pending Intents

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

Android :: Which Intent Flags When Setting Pending Intents?

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

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 View Related

Android :: Alarm Manager For Multiple Pending Intent Are Not Working.

Aug 16, 2010

In my application i have created pending intent which calls another activity (after 20mins of alarm off) with the help of alarm manger. It should happen each time for each new pending intent or when I call that activity. But when i create one pending intent and after few mins again create new pending intent ,then the last one overlap the other previous pending intents and start specified activity only for ones for the last pending intent.I want that each time i create any pending intent it should start specified activity after 20 mins of it's alarm off time.How it can be done ?

View 7 Replies View Related

General :: Display All Pending Calendar Notifications

Dec 5, 2012

In Android, is it possible to display all pending calendar notifications (in case the phone just booted and no notifications has occurred yet)?

View 3 Replies View Related

Motorola : Want To Get Notifications / Intents / Changes From Systemlog In Android

Nov 19, 2010

Is there any nice to way to get notifications/intents/changes from the systemlog in Android. Logcat only shows the latest part of the systemlog which I find very limited and I would like to stream the changes to a webserver or such from an application.

View 1 Replies View Related

Android :: Multiple Intents In A ListView Populated Via Subclass

Jun 2, 2010

I have a ListActivity which is being filled via an internal class "OrderAdapter" - while the list is being populated I set various OnClickListeners on the TextView elements which should open the same view with different parameter values per line. My problem I have is that no matter which entry in the list I click I will always get to a view with the same parameter ID (it's always the ID of the last line in the list) - even though the output of the ID varies if I output it to the TextView.

Here is the code of the internal class which populates the list in the ListActivity:

CODE:.............

Any ideas why it always opens the view with the same ID even though the TextView "tvCheatTitle" displays a different value in every line?

View 4 Replies View Related

Android :: Passing Data With Pending Intent

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

Android :: Intents In Queue - Send Data Via Web Service

Sep 29, 2010

Is it possible, with an IntentService, to send another intent to the IntentService from within the IntentService? For example, say my IntentService is processing an Intent which has it write a bunch of data to the database. During this time, several other Intents to write other data may [or may not] have been queued up in the IntentService. Suppose, after processing that Intent by writing the data to the application's database, I want to queue up another Intent to send that data via web service to "the cloud." Perhaps I want to queue this processing in another Intent because sending to the cloud is secondary. Is it possible? Would it cause any problems if the Intent being processed is the only Intent in the queue at the time the IntentService is trying to queue another Intent?

View 2 Replies View Related

Android :: Use Of Intents Used For Sending Data To Activity From Service

Feb 16, 2010

I am little confused with the use of intents used for sending data to activity from service. In my application I have to have startactivity from the service and have to pass data ,so that activity can utilize the data while launching.For this i have written the following code Intent intent = new Intent(Service.this,Activity.class); intent.putExtra("data", data); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.start Activity(); I assume that the data is passed to the activity and can be parsed on the oncreate function of the activity.Now the service running in the background has to pass data to the activity continously for UI updates.For this I have written the following codeIntent intent = new Intent(Service.this, Activity.class); intent.putExtra("Data", data); intent.setAction(Intent.ACTION_ATTACH_DATA); sendBroadcast(intent,null); (Do I need to broadcast the intent???) In activity I have done following things:- Implemented broadcast reciever:private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_ATTACH_DATA.equals(intent.getAction())) { Bundle extra = intent.getExtras(); float Data[] = extra.getFloatArray("Data"); update(Data);

View 4 Replies View Related

Android :: How To Send Custom Data Objects With Intents Phone?

Jul 30, 2010

Intents in Android are an elegant way to pass messages between uncoupled components, but what if you want to send extra data with the Intent? I know you can add various value types, and objects that implement Parcelable, as extras, but this doesn't really cater for sending user defined types locally (i.e. not over a remote interface). Any ideas?

View 3 Replies View Related

Android :: Unable To Get Data From Activity To Service / How Intents Could Pass That?

Nov 24, 2010

I am pretty new to this but I was told I could get good help here. A friend and myself are playing around with creating Android apps (using ADT)

Here is how we are trying to make the program: in activity, user sets threshold values for the X and Y axis on accelerometer. When user hits button "Start", startService is invoked and starts TiltService.

TiltService is designed to run in the background always on the phone without user interaction. TiltService constantly compares the threshold with the accelerometer values and will vibrate if they are off.

My problem is I can't seem to get the putExtra() data correctly. I have overridden the onStartCommand in my service but I get the message "unreachable code" when I save the getExtras() to a bundle.

Here is the relevant code (I can post the whole thing, just do not want to clog up page) code...

I thought I understood the basic of how Intents could pass data, but I guess I don't. Is it obvious what I am missing?

View 2 Replies View Related

Android :: Managing Multiple Notifications

Aug 12, 2010

I am trying to create multiple notifications in my application. To identify each notification uniquely, i have given them an unique identificationId.

Problem: When a notification is selected, Tabs activity is called passing the intent. I want to access the unique notificationId of the notification that was selected in Tabs. I tried intent.putExtra() to save the notificationId in the intent. But, for multiple notifications its overwriting the notificationId and returns the latest one. I dont understand as to why this is happening and how can i avoid this overwriting of notificationId.

View 2 Replies View Related

Android :: Schedule Multiple Notifications At Different Times

Mar 31, 2010

I need to be able to schedule multiple Notifications at different times in the future.

I tried doing this with an AlarmManager, but that isn't suitable, for the following reason. From AlarmManager.set(): "If there is already an alarm for this Intent scheduled (with the equality of two intents being defined by filterEquals(Intent)), then it will be removed and replaced by this one."

Guess what, the sending intents are equal, apart from different Extra's (but those don't count for filterEquals).

So how can I schedule multiple notifications, which will still be shown when my application is killed (the whole reason I tried AlarmManager)?

View 1 Replies View Related

HTC Droid Eris :: MMS / SMS Multiple Notifications?

Feb 28, 2010

When I receive a SMS or MMS I get notified by the stock message app and the Handcent app, how can I stop the notification by the stock app?

View 2 Replies View Related

HTC Incredible :: Getting Multiple SMS Notifications / How To Disable?

Nov 16, 2010

I've done some googling, and found plenty of people with my issue, but mine can't seem to be resolved like everyone else's. I've been getting two notifications for every txt I get, one's icon is a Letter, the other's is a Smiley Face. I only use the built-in Messages application that came with the phone, its all I've ever used. If I go into Messages, and disable it from making any notifications, when I get a txt, a tone will still play and I still get the Smiley Face notification. Some people have linked this to Beautiful Widgets Pack 2, and I've seen numerous threads where people uninstall it, and it fixes the issue. I installed Beautiful Widgets Pack 2 last week, didn't like it, and uninstalled it. And yet I still have this issue! I even tried installing it again and then uninstalling it again, then rebooted, and it still pops up a notification with that Smiley Face!

View 3 Replies View Related

HTC Incredible :: Multiple Custom Sound Notifications

May 26, 2010

So i saw you can enter root files so that you can pick wav files or mp3s as alerts. so i was curious is there a way to set different sounds for different alerts...like sms, email, facebook...etc...all having different sounds for notifications?

View 2 Replies View Related

HTC Incredible :: Multiple Notifications When Receiving Text

May 2, 2010

I have uninstalled all my sms messaging apps except for the default HTC messaging app. Every time I receive a text message, I get 2 audio notifications, and there are two icons on the notification bar. When I pull it down, one of the notifications sends me directly to the message, and extinguishes one of the icons. The other icon simply says "you have an unread message", and when I click on it nothing happens, and the icon never goes away (unless you hit clear) on the notification pull down menu.It seems to me like I have two messaging programs installed, but I have gone over the list of apps for an hour and can't seem to find it.If it helps, the icon looks like a postcard, with a vertical line down the middle., black and white.

View 4 Replies View Related

HTC Incredible :: Getting Multiple Notifications For Single Text

May 4, 2010

I am using Handcent text application for my texts.It is far superior in my opinion to the default application. Problem is, I am getting two notifications every time I receive a text.I referenced this thread:Multiple notifications when receiving text..Saw the guy had reverted back to the default message program.That is not what I'm looking to do.Want to keep the third party program, I just don't know how to get the dual notifications to stop.

View 3 Replies View Related

HTC Hero :: Multiple SMS Notifications / Disable Built In One?

Jan 15, 2010

I have handcent as the default sms prog, but when I receive one I get pop ups both from the HTC proggy and Handcent which is a bit annoying.
Any idea how I can disable the built in one?

View 2 Replies View Related

HTC Incredible :: Application For Multiple Customized Sound Notifications / Ringtones?

Jul 27, 2010

Need the ability to have multiple notification sounds per contact. For example: if my friend emailed me, I'd hear one customized sound; if she texted me, I'd hear another; and if she called me, she had a 3rd sound. Now, I know the Inc cannot currently do this, so here's my question: is there an app out there for this?

View 1 Replies View Related

Sony Ericsson Xperia X10 :: Way To Stop Receiving Multiple Sms / Notifications?

Aug 5, 2010

I've had my X10 mini pro for about a month and now I can't stand some of the "features" anymore. First, I thought people where crazy, sending me the same sms two or three times in a row. But now I've realized that they aren't, it's just my phone that receives them over and over again. It is the same thing with notifications. If I set a reminder in the calendar, the reminder pops up in my notification bar sometimes five or six times before I get to angry and delete the whole event from the calendar. Is these problems specific to me or do anyone else recognize them?

View 2 Replies View Related

Android :: Multiple Data For An Intent

Sep 10, 2009

I was just wondering if it is possible to give the intent a set of data, instead of just one. A particular scenario where this could be applicable would be a music application.You select a list of songs, and pass all these data (file path) to the Music Player's application.Another scenario: You need to plot more than one address on the Google Maps. You launch the application with a set of data for the intent.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved