Android :: How To Pass SortedSet As Intent's Extra?
Jun 28, 2010
I have a service that produces as result a SortedSet object. I need to pass it to another Intent that will use it. First is put in the notification area, then when the user actions it it will need to fire the activity.As it it's own SortedSet is not Parcelable nor Serializable so it won't work. One single item in SortedSet is already parcelable and it's used fine, but I need the whole set.How to pass a SortedSet as an Intent's extra?
View 1 Replies
Aug 3, 2010
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(editNote, EDIT_TASK_REQUEST);
}And this code that retrieves the extra FROM A DIFFERENT ACTIVITY: if (savedInstanceState != null) { id = savedInstanceState.getLong(TasksDBAdapter.KEY_ID); Log.i(TAG, "Id of note = " + id);In the first code snippet, Logcat says: The id of the selected note is 2, but in the second code snippet, Logcat says: Id of note = 0. What just happened here? Any solutions to this VERY annoying problem.
View 2 Replies
View Related
Aug 20, 2010
I've started to write a small app for android. It looks very nice, but there is one thing I don't understand.I've created a new intent in the activity A and I've added a serialized vector intent.putExtra("key", vector).
View 3 Replies
View Related
Oct 15, 2010
Is there any way to put an extra into the intent launched by a shortcut?
View 1 Replies
View Related
Nov 19, 2009
How to know the list of available extra for a intent?For example, I want to know all available extra for ACTION_BATTERY_CHANGED. What is the method to know them?I have seen nothing on the official dev guide, reference in http://developer.android.com.I have seen nothing on watching the intent on debugger (on Eclipse)I have seen no methods on the intent documentation, like myIntent.getListExra()
View 2 Replies
View Related
Mar 24, 2010
i'm trying to find out what extra's there are for a specific intent.in the eclipse debug window i can see it has extra's , but i can''t find a list of those extra's. I also can't find a function to get all extra's into a human readable format.
View 4 Replies
View Related
Aug 3, 2010
I have a program that sends a broadcast Intent that needs an "extra" value.The value is declared as being of type Object[], though I know that the elements are always of type Integer or String.That's part of an API not under my control. What's the most concise and/or efficient way to do the equivalent of the putExtra call below?
View 6 Replies
View Related
Aug 11, 2010
But the problem is i am getting a blank view.My view is not coming up with textview. is this proper to set background "DetailsTextView.setBackgroundResource"?
View 1 Replies
View Related
Nov 19, 2009
I've got a problem My app show a first layout like: Gridview1 (3 images in 1 row) ImageView1 (1 image) Gridview2 (3 images in 1 row) ImgaeView2 (1 image) Gridview3 (3 images in 1 row) ImgaeView3 (1 image) When you clik over an image it will be open full screen in a second layout, The problem was that I don't know how to pass the image to the new intent. Now I've the next code:
public AdapterView.OnItemClickListener pulsarImagen = new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,long arg3) { Intent intent = new Intent(GridViewer.this , GalleryViewer.class); intent.putExtra("id", arg0.getItemIdAtPosition (arg2)); startActivity(intent); //finish(); } };
But the ItemID is always 0. Before I've only one gridview and then I passed the item's position. But now I've 3 different gridviews and I don't know if the position of item selecte it's from gridview 1,2 or 3. I supose that the great solutin it will be to pass the id resource (image) but I don't know how to pass it. Can you help me?
View 4 Replies
View Related
Jun 25, 2009
Is it possible to pass an object to the intent so i can access that object in my new activity?
View 2 Replies
View Related
Oct 15, 2010
I would like to know if it is possible to pass a certain intent from one device to another? For example, device A is viewing a certain webpage, then I want that link to be sent to device B, and automatically launch that intent to device B. But without using the C2DM feature.
View 10 Replies
View Related
Dec 2, 2013
The below passes in an extra message to a class called DisplayMessageActivity
[HIGH]
/** Called when the user clicks the Send button */
public void sendmessage(View view) {
Intent intent = new Intent(this, DisplayMessageActivity.class);
EditText editText = (EditText) findViewById(R.id.edit_message);
String message = editText.getText().toString();
intent.putExtra(EXTRA_MESSAGE, message); // here extra value
startActivity(intent);
}
[/HIGH]
How can i pass in another value because at the other end i can only get Extra_message which can only be used once....
this is inside the DisplayMessageActivity
[HIGH]
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
[/HIGH]
How to pass two values
View 3 Replies
View Related
Jul 20, 2010
How do I get data within an Android Service that was passed from an invoking Activity?
View 1 Replies
View Related
Sep 3, 2010
Can I pass a singleton class's object from one activity to another activity using intent? I am using singleton class as image class img = image class.get Instance();, so i need the img instance for another activity, how can i pass an object instance in Android.
View 2 Replies
View Related
Aug 7, 2009
I am developing an app that connects to a server. For that connection I created a class Client that maintains info about the connection . My app consists of several Activities and each of that Activity needs access to the Client object to communicate to the server. 1) Can I put somewhere the Client object so that all Acitvities have an access to it? 2) If not I would probably need to pass the object to each Activity via Intent.putExtra(). But putExtra doesn't accept Object as an argument. It only accepts several types like int, long, String etc. So how can I pass an object to another Activity?
View 2 Replies
View Related
Aug 10, 2010
MyService and MyClient are both running, although MyClient is currently in the background. If MyService sends an Intent to MyClient via:
CODE:..............
How do I get this Intent in MyClient? Running this code triggers onResume() in MyClient, but because it's already running, calling getIntent() returns the Intent that initially created MyClient, which is always android.intent.action.MAIN
View 2 Replies
View Related
Sep 15, 2010
I have saved a cookie in android. Now I want to pass it into my browser intent. Look at my current code:
Intent browser = new Intent("android.intent.action.VIEW",
Uri.parse("http://mypage.php/memberpagethatrequireacookie.php"));
//putExtra cannot take these arguments -> browser.putExtra("org.apache.http.cookie.Cookie", cookie);
startActivity(browser);
I want it to store temporarily in my browser so my member page loads successfully.
My cookie are successfully created from the HTTP request and I assign it to a List<Cookie> cookie;
Tell me if I should provide some more code.
View 1 Replies
View Related
May 14, 2010
I have an activity that when started needs access to two different ArrayLists. Both Lists are different Objects I have created myself.
Basically I need a way to pass these objects to the activity from an Intent. I can use addExtras() but this requires a Parceable compatible class. I could make my classes to be passed serializable but as I understand this slows down the program.
What are my options?
Can I pass an Enum?
As an an aside: is there a way to pass parameters to an Activity Constructor from an Intent?
View 3 Replies
View Related
Jun 25, 2009
From the JavaDoc, the EXTRA_STREAM parameter when launching an intent needs to be an URI. How can I pass a Bitmap object which I get from launching a "android.provider.MediaStore.ACTION_IMAGE_CAPTURE" intent? code...
View 6 Replies
View Related
Jul 13, 2010
I was just on there yesterday i go into browse tonight and now all of a sudden it says pass world invalid from last night till this morning i tried typing in the little letters they had and I cant read it so I go to the google site. I put the info in and it says sorry account has been terminated for terms and conditions I didnt even do any thing to violate them?
View 1 Replies
View Related
Jun 8, 2009
Is it possible to add extra languages to Android? My current Android phone only supports English and Chinese language input. I would like to have Dutch also, as I can use it for word completion. The question on top of that is, how to switch easily between these languages in the text input (keyboard) GUI?
View 5 Replies
View Related
Mar 19, 2009
When I run my app, I see about 8 or 9 icons in the main phone menu. One is to run the app, and the others actually run activities within the app.I want there to only be one icon for users.Any ideas as to why this is happening?My code is structured similar to examples from the book "Android - A Programmers Guide" by JF DiMarzio.How do I hide the other icons so users have to start at the main menu screen?
View 5 Replies
View Related
Jul 26, 2010
I have a iPhone 4G and I wanting to try a Galaxy S Captivate.it should be in soon.is there a way AT&T can give me a normal sim card and I can just turn my iPhone off while I use the Captivate or do I gotta switch the sim cards out?
View 1 Replies
View Related
Aug 12, 2010
Say an app is 2 dollars, but but does your network also charge you a fee for downloading something?
so its like 2 dollars + a few dollars charged by your network? and this is all using my home WIFI.
View 1 Replies
View Related
Oct 6, 2010
I've built a widget that uses a LinearLayout and I've put two TextViews in the layout.
The gravity of the layout is "top".
The problem is that I get a space between the two TextViews and I can't get rid of it.
CODE:....................
As you can see I tried putting padding 0 and verticalSpacing 0 but I still get a space between them.
View 2 Replies
View Related
Feb 17, 2010
When I created a button view, Android always create some extra space between this button and other views below it.
In this example below, there is a button above the second button. You can see the gap between these two buttons. How can I get rid of this gap?
CODE:................
View 3 Replies
View Related
Sep 28, 2010
I have the following layout. This defines a row in my ListView. I noticed that the text is not centered in the row. There seems to be extra bottom padding. How can I make the text appear in the center, vertically, so there is no padding? code...
View 1 Replies
View Related
May 25, 2009
So I just bought 2 apps from the market.1 was 1 dollar,1 was 2 dollar.on my bank statement the 66p came out and the 1.32p.but after each transition there is also a 1 pound charge.is there a standing charge for buying apps?or am i getting ripped off?
View 2 Replies
View Related
Apr 13, 2010
I'm trying to pass an object from an activity to another activity. In the first activity i do:
Intent intent = new Intent(this, SecondsActivity.class); intent.putExtra("package.class", SerializableObject);
And in the second activity:
Class object = (Class) extras.getSerializable("package.class"); objetc.modifySomething(2432);
Intent intent = new Intent(this, ThirdActivity.class); intent.putExtra("package.class", SerializableObject);
But if i modify the object in the second activity, it fails when i send this object to a third activity.Why does it fail? What am i doing wrong? I just need to pass objects between diferent activities because i have an object which contains many information, and creating a Boundle would be very big and ugly in my code.
View 3 Replies
View Related
Dec 16, 2009
The product I have in mind is a Android phone with 32 GB of internal storage, plus the usual microSD expansion slot.
View 9 Replies
View Related