Android :: Use An Intent To Send Data To My Activity
Nov 6, 2010I have a server running that notifies the user with a statusbar notification that opens my main activity, how can I pass data to my activity trough that intent?
View 1 RepliesI have a server running that notifies the user with a statusbar notification that opens my main activity, how can I pass data to my activity trough that intent?
View 1 RepliesI have an activity that uses a service. While the service is running (it sends some stuff in background) I display a progress bar and disable the send button.
Now I created an Intent to update the interface after the send service has finished. How can I do this only if the activity is still on top? I tried to figure out this in the service with:
CODE:..................
Can anyone guide me as to how I can pass an object of a custom type from one Activity to another with the putExtra() method of Intent?
View 5 Replies View RelatedHow do I get data within an Android Service that was passed from an invoking Activity?
View 1 Replies View RelatedI have a widget that supposed to call an Activity of the main app when the user clicks on widget body. My setup works for a single widget instance but for a second instance of the same widget the PendingIntent gets reused and as result the vital information that I'm sending as extra gets overwritten for the 1st instance. So I figured that I should pass widget ID as Intent data however as soon as I add Intent#setData I would see in the log that 2 separate Intents are appropriately fired but the Activity fails to pick it up so basically Activity will not come up and nothing happens (no error or warning ether)
View 1 Replies View RelatedI have an application where there are two screens(activities.) When I make changes in the second screen those values should get reflected in the first screen. For that I have to pass the values of second screen to the first one.
View 5 Replies View RelatedI am writing an application to listen the SMS inbox in android with one activity and one BroadcastReceiver. Once the SMS comes the Receiver is showing alert message. But I want to send the message information from Receiver to Activity. I don't know how to achieve this.
View 2 Replies View RelatedI have a notification that starts my activity and passes a messages using the intent's putExtra() function. The message is then displayed to the user in the activity's onCreate function. When the application is restarted due to a orientation change, the message is shown again as it is still in the intent's bundled data.
How can I remove the extra data?
I tried the following:
Bundle bundle = getIntent().getExtras();
if (bundle.getBoolean("showMessage")) {
// ... show message that is in bundle.getString("message")
// remove message
bundle.remove("showMessage");
}
But the message will still be shown after the orientation changed, seems like the intent used is not the one I changed, but the original one. The only workaround I found is to save the showMessage additionally in onSaveInstanceState(). Is there another way? Or is this the way to go?
Can I send an email without invoking any activity (with Send/SendTo action)? Just compose a mail and send to recipient from my application.
View 7 Replies View RelatedUsually, I putExtra inside an Intent to transfer stuff between Activities. But it seems like I can't do this with a Service? Bundle extras = getIntent().getExtras(); That doesn't work for a android Service. How do I send a string from an Activity to a Service then?
View 1 Replies View RelatedMy app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.
As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Intent).
Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity() call ?
I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app. My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity. steps: Launch root activity A, press home Open email attachment, intent filter triggers launches root activity A Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?
View 1 Replies View RelatedI wrote a new application and i want to send an intent to another application.is it not enough if i broadcast that intent from my new app and add an intent filter in the receiving application? The intent seems to be not received in the receiving application. should i add / register the intent somewhere in the framework so that it gets received.can someone help me on this.
View 4 Replies View RelatedI am trying to test how my activity responds to an intent. I can write a test activity and send my intent. I am wondering if there is a command line tool to just send an intent. I looked at "am" tool. When I use "am -D INTENT", I get "your application is waiting for debugger connection" popup. Is there any way to skip this popup?
View 3 Replies View RelatedI'm trying to setup an intent that allows users to share an Jpeg, stored in the applications file cache.
Trying this:
CODE:.................
It works for the eMail application, but not for any other app (like Facebook or Twitdroid). Gallery supports them. Does anyone know, how exactly Gallery does it?
I have a problem in my application. I have to send MMS with audio attachment. code...
View 4 Replies View RelatedHow to send a message from one activity to another using intent and intent filters?
View 1 Replies View RelatedI would like to send an email with an Intent.
I would like to programatically open up an dialog that shows the different programs that handle this Intent and lets the user show his favourite mail program. In the program I want to specify a Title, an receiver and a message body.
Could you give me an example on how to this?
I want to receive Intent "android.intent.action.SEND" in a Service. Is it possilbe to register for this Intent via registerReceiver() and get the Intent in Broadcast receiver in the Service?
Or is there any restrictions that "android.intent.action.SEND" can only be registered via Manifest.xml of an Activity and not in a Service?
I am trying to a menu item to launch the Send intent. This is what I did, I see the menu item
but i don't see send intent launch when i select the menu item. code...
Iam getting this error in email without using intent.
02-12 18:04:01.647: E/MailApp(11838): Could not send email
02-12 18:04:01.647: E/MailApp(11838): android.os.NetworkOnMainThreadException
02-12 18:04:01.647: E/MailApp(11838): at
[Code]....
I want to send an intent to my service everytime the state of Wifi connectivity changes. So when I currently use a broadcast receiver to listen for the state changes in Wifi, so when this recieves an intent I want to be able to send this info on to my service. Is this possible and if so the correct way to do it?
View 2 Replies View Relatedi have a drawer menu, when i press one of its buttons to start a sharing intent as below:
Code:
Intent iFriends = new Intent(Intent.ACTION_SEND);
iFriends.setType("text/plain");
iFriends.putExtra(Intent.EXTRA_TEXT, "http://www.liveplus.mobi");
iFriends.createChooser(iFriends, "Invite Friends");
startActivity(iFriends);
The sharing dialog appears, but if i press the back button, the whole application exits!
Is it possible to get the Activity from an Intent?
View 2 Replies View RelatedI know a variant of this question was asked before trying-to-attach-a-file-from-sd-card-to-email But the solution offered, i.e. a reboot doesn't seem to do it for me. I have seen a good number of group postings which support this being a problem. I can only assume the OP for the linked to question made some other changes, possibly to the manifest which allowed his code to work.
The behaviour I am seeing is the Email intent handling the attachment of the jpeg from the sdcard but dealing with it as a 0 length file which is discarded when sent. I have tried setType as jpeg/image and image/jpeg as I have seen it expressed both ways....................
I wanna develop an app that uses CSD or Data channel of GSM Service to send data. Can anyone help me out with it?
View 1 Replies View RelatedI'm switching between different Activities using Intents. For one Activity, I would like it to clear the history stack so when the user presses the back button, it takes them Home instead of previous activities in my application.
View 2 Replies View RelatedI've searched for a few hours for a solution to this, so hopefully this isn't a repost I'm setting a shortcut on the Home screen which raises an Intent to my application - the problem is that I don't want to show my app, just run a little code and display a Toast notification. This must be possible - I just can't work out how.. Once I'm handling the shortcut Intent in onCreate() the UI has initialised and I get a little screen flicker if I then run my code and finish().
View 4 Replies View RelatedI have a service that is downloading a file. When the download is done, I would like to update my "Downloaded files" list in my Activity, but only if the Activity is running. I do not want the Activity to start if it's not already running. I was hoping I could do this by making a new Intent with some special flag. Anyone have any idea how I can achieve this? A tiny code example maybe?
View 3 Replies View RelatedI have three classes one main-activity(named MainMap), one non-activity class(named MyItemizedOverlay), and one activity class(named AudioStream). I want to start AudioStream activity from non-activity class but i don't know how to.
View 1 Replies View Related