Questions tagged [extras]

113 questions
4
votes
0 answers

Not able to getExtras from Intent obtained from ACTION_VIEW

I am trying to send some Extras in my intent with action as ACTION_VIEW but somehow i am not getting it in the target Activity. I tried putting extras both in bundle and without bundle(directly in intent object itself.) Here is the Sample Code: …
Amritpal Singh
  • 984
  • 2
  • 14
  • 33
4
votes
1 answer

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

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…
user277827
  • 207
  • 1
  • 4
  • 5
4
votes
5 answers

java.lang.NullPointerException on Bundle extras = data.getExtras();

I'm trying to capture image and save it in gallery. For that in onCreate my code Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); File photo = new File(Environment.getExternalStorageDirectory(), "Pic.jpg"); imageUri =…
Shirish Herwade
  • 11,461
  • 20
  • 72
  • 111
3
votes
2 answers

Can you give extras to a Fragment on replace?

I currently have an app that relies heavily on Intents and the extras given to them before starting the activity. The extras are used when calling a webservice which in turn supplies the content that needs to be shown I am trying to convert that…
Sander van't Veer
  • 5,930
  • 5
  • 35
  • 50
3
votes
1 answer

Android: Changing extras to an intent

I have an app that goes between many different activities. One activity, my main activity, has it's behavior dependent on which activity, within the app, launched the main activity. I thought i could log this by having every other activity put an…
aamiri
  • 2,420
  • 4
  • 38
  • 58
3
votes
1 answer

Shortcut intent extras lost after restart?

My application listens to the android.intent.action.CREATE_SHORTCUT broadcast, in my code I am creating a shortcut which includes a String extra like this: Intent shortcutIntent = new…
Daniel Novak
  • 2,746
  • 3
  • 28
  • 37
3
votes
3 answers

Get extras in Cordova app

We have two Android applications: one implemented using native Java and another written using Ionic. The Ionic app launches my app which is the Android app using the lampaa plugin. I could receive the extras that the Ionic app provides using the…
Sandah Aung
  • 6,156
  • 15
  • 56
  • 98
3
votes
1 answer

Broadcast receiver for sent messages

I'm developing an app that sends sms and I'able to get a response to know if the sms was sent (or not). But since I want to identify which sms was sent (by receiver and text) I add these informations to the intent using extras. That works fine, but…
supergiox
  • 1,586
  • 7
  • 19
  • 27
2
votes
1 answer

putExtras multiple putString not working

I need to pass 2 variables from one activitiy to another activity. I have the following for the first activity: @Override public boolean onContextItemSelected(MenuItem item) { Bundle bundle=new Bundle(); switch (item.getItemId()){ case 1: …
user1095784
  • 117
  • 1
  • 2
  • 11
2
votes
2 answers

Service doesn't receive intent / extras

I just can't get what's wrong here. Activity.java: ... Intent intent = new Intent(Activity.this, Service.class); intent.putExtra(Service.KEY_TEST, "123456789"); startService(intent); ... Service.java: ... private Intent intent; public static final…
Iiro Krankka
  • 4,959
  • 5
  • 38
  • 42
2
votes
2 answers

Update Intent extras between ordered BroadcastReceivers android

I am currently getting the SMS_Received Broadcast from the system and am attempting to change the values in the intent before the other broadcastreceivers get it, (such as the default messaging app) However, no matter what way I try and change the…
Steven
  • 21
  • 2
2
votes
1 answer

Pyomo Util Module Not Found

So I asked a question a month ago. I had a really nice answer to that question. I wanted to test if the answer works right now. But I am getting ModuleNotFoundError. I did following before testing: conda install -c conda-forge pyomo conda install -c…
oakca
  • 1,408
  • 1
  • 18
  • 40
2
votes
2 answers

Missing Extras in Intent when received from a BroadcastReceiver

I have a broadcast receiver which listens for all outgoing calls. In another activity I make an outgoing call. In my BC I want to be able to determine which calls were created in the activity, so I use putExtras() to place a marker field when I'm…
Suan
  • 34,563
  • 13
  • 47
  • 61
2
votes
1 answer

android tab pass intent extras to new tabs activity

I have read through the similar questions but do not see one like this. I have a simple calculator application there are two tabs. Each has their own activity class. I initially wrote this with a button on the first screen which onClick would…
Dean-O
  • 1,143
  • 4
  • 18
  • 35
2
votes
2 answers

Subclassing Intent does not send the Extras

Why does this work: sendBroadcast(MyUtil.configMyIntent( new Intent(), ActionType.DATE, new Date().toString())); with: public static Intent configMyIntent(Intent intent,…
A.L.
  • 144
  • 2
  • 9