Questions tagged [extras]

114 questions
62
votes
2 answers

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…
Pentium10
  • 190,605
  • 114
  • 394
  • 474
56
votes
8 answers

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
Alex Volovoy
  • 65,307
  • 13
  • 71
  • 53
48
votes
1 answer

Android Intent.getStringExtra() returns null

This is how strings are being added to Extras: Intent i = new Intent(); i.putExtra("Name", edt_name.getText()); i.putExtra("Description", edt_desc.getText()); i.putExtra("Priority", skb_prior.getProgress()); setResult(RESULT_OK, i); finish(); This…
hotkey
  • 111,884
  • 27
  • 298
  • 285
35
votes
5 answers

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…
Pentium10
  • 190,605
  • 114
  • 394
  • 474
25
votes
3 answers

How can I correctly pass unique extras to a pending intent?

I'm having a problem with alarmManager and the pending intent with extras that will go along with it. If I set multiple alarms, they will go off, however the extras stay the same. I have already read into these questions: android pending intent…
ninjasense
  • 13,382
  • 17
  • 71
  • 91
19
votes
2 answers

How do I write an android JUnit test when my activity relies on extras passed through an Intent?

I am writing an android Junit test for a class that relies on extras passed to it through an Intent. I was able to get the class working properly, but I would still like to know how to write a unit test for such a class, as the test still…
Steve Westfall
  • 321
  • 1
  • 2
  • 8
19
votes
4 answers

startActivityForResult and Intents Extras, it seems 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()); …
Pentium10
  • 190,605
  • 114
  • 394
  • 474
17
votes
3 answers

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…
Chris Boyle
  • 11,168
  • 7
  • 46
  • 62
13
votes
3 answers

Android: Starting app from 'recent applications' starts it with the last set of extras used in an intent

Bit of a confusing problem for me here: I've got a home screen widget which, when clicked, starts my main app Activity with a few extras put in the intent: Intent start = new Intent(context, Main.class); start.putExtra("action",…
r3mo
  • 537
  • 1
  • 8
  • 19
9
votes
3 answers

Pass arraylist of user defined objects to Intent android

I am trying to pass a structure of arraylist to an intent as follows, In the calling function i am using ArrayList s=(ArrayList)msg.obj; Intent i = new Intent(ReadTasks.this,…
bharath
  • 903
  • 4
  • 17
  • 30
8
votes
3 answers

Android: Part of my extras are getting lost in pending intent

I am making an Android app for the first time and I am having this problem. When a user A sends a friend request to another user B, user B gets a notification. I wish when the user B click on the notification to be redirected to user A profile. The…
6
votes
3 answers

Is there way to tell IntelliJ IDEA which output folder to use for GWT compiler?

Is there way to tell IntelliJ IDEA which output folder to use for GWT compiler ? I know it copies artifacts to project folder but it doesn't copy extras which I set using "-extra" command line parameter of gwt compiler. IntelliJ IDEA leaves it in…
expert
  • 26,897
  • 27
  • 105
  • 198
6
votes
1 answer

Intent extras in Unit test Android Mockito

I am trying to verify that specific extras are added to Intent, but all the time I get null for the Intent in Unit test Android. I have the following class that need to be test: public class TestClass extends SomeNotifier { private Intent…
Mr.Robot
  • 149
  • 1
  • 4
6
votes
2 answers

Differences between org.apache.log4j.RollingFileAppender and org.apache.log4j.rolling.RollingFileAppender

Can someone tell what are different between this things? Moreover, I can't understand, why needs use TimeBasedRollingPolicy if DailyRollingFileAppender exists ?
Fire
  • 193
  • 3
  • 11
5
votes
0 answers

How to filter the intent according to his extra data?

I got some activity that have defined intent filter like this:
Lukap
  • 29,596
  • 60
  • 146
  • 239
1
2 3 4 5 6 7 8