Questions tagged [extras]

113 questions
1
vote
1 answer

Dyanamically adding RemoteViews in custom notification in for loop, issue in setting pendingintent

I am creating a custom notification and adding buttons dynamically using this code: RemoteViews remoteViews = new RemoteViews(this.getPackageName(), R.layout.custom_notification); for (int i = 0; i < 100; i++) { Intent mybuttonsIntent…
Usman
  • 2,331
  • 2
  • 21
  • 29
1
vote
4 answers

Take picture with camera and send the path to other activity

I'm working on my app in Android and I'm having a little problem. On my MainActivity I take a picture and then save the path in a String, then I send this string to CameraActivity. This is my code: btnCamera.setOnClickListener(new…
LordCommanDev
  • 922
  • 12
  • 38
1
vote
3 answers

Getting extras always null

Using a recycler view. On selecting an card I have put an intent on click of card in recyclerviews adapter which changes the activity by these lines of code Intent i =new Intent (view.getContext(),ExpandedActivity.class); …
Aarje Ishu
  • 53
  • 2
  • 11
1
vote
1 answer

How to peek into Intent Extras in Android

I have an application that starts Activity with extras. I would like to see what extras are inside Intent. Both applications (calling and called) are not written by me.
pixel
  • 24,905
  • 36
  • 149
  • 251
1
vote
4 answers

Activity does not get correct bundle

I am working with GCM, and this is my onMessage function: @Override protected void onMessage(Context context, Intent intent) { if (intent != null && intent.getExtras() != null) { try { String message =…
rosu alin
  • 5,674
  • 11
  • 69
  • 150
1
vote
1 answer

How do I pass data from a widget config class to a widget provider class via intents?

I am not going to delete this question as commons brings up some excellent points below, but I did rework the code and ask the question differently here: How do I retrieve shared preferences data in a Widget Service class without passing in…
PGMacDesign
  • 6,092
  • 8
  • 41
  • 78
1
vote
1 answer

Intent passed into onHandleIntent is missing intent extras that I set

I am creating an Intent and adding a string extra to it, then I create a PendingIntent, which is given to the alarm manager to execute: String value = "someValue"; Intent intent = new Intent(this,…
1
vote
0 answers

Broadcastreceiver missing Extra data from Intent

I have a Problem with my Broadcastreceiver and I have no idea what I am doing wrong. I already read many posts @stackoverflow, but nothing helped. I am sending a broadcast from my helperclass, the broadcastreceiver is implemented in an activity. I…
counters
  • 23
  • 6
1
vote
4 answers

Extras Folder Accidentally Deleted - Android SDK

I accidentally deleted some of the plugins inside Extras Folder in Android SDK. Coz it looks broke. Now my problem is I dont know how to recover it. And my android emulator is not working coz it cant select device that the Google provides. Can…
jajaja
  • 389
  • 1
  • 12
  • 26
1
vote
1 answer

How to replace an extras value?

I am a beginner in android programming and I couldn't find a way to replace an extra value @Override protected void onListItemClick(ListView l, View v, int position, long id) { list_1= new Intent(this,Ekran1.class); list_2= new…
1
vote
1 answer

How to save a List> to an SQLite db

I want to save a List> to my small db. How to achieve it.. I want to use this list in many activities of my app. Is there any other possible way to access this particular list as it is in my other activities.
Niko
  • 1,367
  • 1
  • 13
  • 37
1
vote
1 answer

Android: How to get extras from Activity to Service to a Second Activity

I am trying to send extras through an intent to a service which then opens an activity that should receive the intent's extras. The extras appear to be null in the second activity when I look for them, here are snippets of the…
Vnge
  • 1,295
  • 25
  • 49
1
vote
4 answers

Android intent.extras returns null

I am trying to pass 3 strings to a new activity. By debugging I have discovered that my variables are not null when I put them in extras but when I try to get them they are null calendarView.setOnDateChangeListener(new OnDateChangeListener() { …
Ken
  • 365
  • 1
  • 6
  • 16
1
vote
1 answer

Passing the same Intent extra multiple times, and somehow the extras don't match

I have an app that is set up to display an entry from a database as a notification when it receives a broadcast. The _id for that database entry is passed as an extra for the broadcast's intent. When the notification is clicked, the app is supposed…
MowDownJoe
  • 728
  • 1
  • 11
  • 29
1
vote
1 answer

Intent extras only work on some devices

In my app I send some intent extras from one activity to another. But some users report back that these data are always zero - even though I can see the values are alright in the sending activity. Here's the code of the sending activity: Intent…
user1057831
  • 211
  • 1
  • 11