extras

Is there any way to put extras to Intent from preferences ?

Hi i'm launching activity from preferences screen. Activity is shared among three preferences. I wonder if i can set extras for this activity in xml <Preference android:key="action_1" android:title="@string/action_1_title" > <intent android:action="com.package.SHAREDACTION" > </intent> </Preference> i wond...

Android: How to catch Intent's Extras if the activity is already running?

Hi, I put a notification in the status bar with a PendingIntent (with Extras info) that points to my main app (main activity). When the user clicks the staus bar, the PendingIntent is fired and my app launches and I can read the Extras info in my onCreate() method. So far so good. But if my app is already running, the PendingIntent s...

Multiple calls to AlarmManager.setRepeating deliver the same Intent/PendingIntent extra values, but I supplied different ones

Solved while writing this question, but posting in case it helps anyone: I'm setting multiple alarms like this, with different values of id: AlarmManager alarms = (AlarmManager)context.getSystemService( Context.ALARM_SERVICE); Intent i = new Intent(MyReceiver.ACTION_ALARM); // "com.example.ALARM" i.putExtra(MyReceiver.EXTRA_ID...

startActivityForResult and Intents Extras, it seams extras are not pushed back

I have this code: Intent intent = new Intent(); intent.setAction(Intent.ACTION_PICK); intent.setData(ContactsContract.Contacts.CONTENT_URI); intent.putExtra(EXTRA_ONLINE_ID, (String) v.getTag()); startActivityForResult(intent, PICK_CONTACT); Then on response: public void onActivityResult(int reqCode, i...

Why the PendingIntent doesn't send back my custom Extras setup for the Intent?

This questions somehow relates to the question when I was looking to get the extras back in startActivityForResult but now I face another challenge. I have subscribed to receive ProximityAlerts and I have explicitly constructed the Intent to include some Extras. But when I got the service the extras are not there. After the answers her...

Android keeps caching my intents Extras, how to declare a pending intent that keeps fresh extras?

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. I define a PendingIntent this way: Intent intent = new Intent(this, viewContactQuick.class); intent.setAction("newmessage"+...

Intent not extracting extra

I have this code: protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Log.i(TAG, "The id of the selected note is " + id); Intent editNote = new Intent(this, TaskEditActivity.class); editNote.putExtra(TasksDBAdapter.KEY_ID, id); startActivityForResult(...