intent

Android: passing paramters between classes

I have a class2 which is involved by class1 when clicks are made. I have to pass some parameters/objects from class1 to class2. I only know the standard way which does not have an option of passing parameters. // launch the full article Intent i = new Intent(this, Class2.class); startActivity(i); ...

The concept of an Intent in Android?

I don't really understand the use and concept of an Intent. I DO understand that an activity are one visual interface and one endeavour that the user can partake in. I THINK an intent is used to launch and communicate between different activities. If so, then how would you accomplish that? A code sample would be helpful. In analogy form,...

Intent receiver according to preference

Hi, I have a intent receiver in my android manifest, but would like to give the user the opportunity to choose whether he/her wants the app to automatically start at the specific state. Until now, I've used a service with a broadcast receiver, but I really want to delete this service as it seems a bit unnecessary. Can register the inte...

How to programmatically answer a call?

Hi all, I want to answer a phone call. I found the intent android.intent.action.ANSWER but it seems that the only effect that I obtain is an ActivityNotFoundException. Why? Is it a deprecated intent? How can I achieve answer? I have also heard about the "telnet technique". What is that? Thanks ...

How do I pass data from a BroadcastReceiver through to an Activity being started?

I've got an Android application which needs to be woken up sporadically throughout the day. To do this, I'm using the AlarmManager to set up a PendingIntent and have this trigger a BroadcastReceiver. This BroadcastReceiver then starts an Activity to bring the UI to the foreground. All of the above seems to work, in that the Activity la...

Android: Adding data to Intent fails to load Activity

I 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 tha...

More efficient way of updating UI from Service than intents?

I currently have a Service in Android that is a sample VOIP client so it listens out for SIP messages and if it recieves one it starts up an Activity screen with UI components. Then the following SIP messages determine what the Activity is to display on the screen. For example if its an incoming call it will display Answer or Reject or ...

added TextToSpeech to my activity and now my onDestroy is not called any more, bug?

I added TextToSpeech to my app, following the guidelines in the following post: http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html and now my onDestroy is no longer called when the back button is pressed. I filed a bug report regarding this: http://code.google.com/p/android/issues/detail?id=7674 Figu...

Android application chrashes after "share" intent

Hi, My app offers a "share/tell-a-friend" function. When the "share" button is pressed the following method is being called to open a list of apps, which can perform the action (Eg. Gmail, Twittroid, Facebook...): public void share() { Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType("text/...

What is the point of defining actions within intent filters on a reciever tag

I'm currently exploring Broadcast Receivers and Broadcast Intent. There are some aspects of the tutorials which are ambiguous to me. To my knowledge this is how the process works. I can broadcast an intent from my application and any receiver on the phone can act on that intent as long as the actions match. I can register a broadcast...

How to list Activities which match an intent?

I have a few separate applications which are all launched purely through a main application. I am wondering if I'd be able to use intents to retrieve a list of all the sub-applications which match some discovery intent. The main application currently needs to know what Intents to use to START these sub-applications, but is there a way...

Is it possible to start an activity in a different apk using startActivity on Android using the activity name or similar?

I have tried to write an Android application with an activity that should be launched from a different application. It is not a content provider, just an app with a gui that should not be listed among the installed applications. I have tried the code examples here and it seems to be quite easy to launch existing providers and so on, but ...

How to catch an incomming text message

Hi! I want to be able to control incoming text messages. My application is still on a "proof of concept" version and I'm trying to learn Android programming as I go. First my application need to catch incomming text messages. And if the message is from a known number then deal with it. If not, then send the message as nothing has ha...

Single intent to let user take picture OR pick image from gallery in Android

I'm developing an app for Android 2.1 upwards. I want to enable my users to select a profile picture within my app (I'm not using the contacts framework). The ideal solution would be to fire an intent that enables the user to select an image from the gallery, but if an appropriate image is not available then use the camera to take a p...

Why is my searchable activity's Intent.getAction() null?

I've followed the SearchManager documentation yet am still having trouble making one of my app's activities searchable. From my activity, the Search dialog appears, I enter a query, hit search, my activity reopens, then I see this in the log: D/SearchDialog( 584): launching Intent { act=android.intent.action.SEARCH flg=0x10000000 cmp=c...

How do I start a service which is defined in a different package?

I have two apps, one runs in namespace com.gtosoft.voyager and the other is com.gtosoft.dash. From com.gtosoft.dash I would like to start up the service which is defined in com.gtosoft.voyager... I think I need an intent, but what arg(s) would I pass to the intent before kicking it off with startService()? If they were in the same pac...

Using default gallery for custom image set

Is it possible to use the default image gallery on Android and populate it with a custom set of images to display? When I use ASTRO filebrowser to go through my folders and open an image, I get the choice to use either the ASTRO image viewer, or the default image viewer. I would like to use the latter with a set of multiple images that ...

Scheduling a recurring alarm/event

I have a class that extends Application. In the class I make a call to AlarmManager and pass in an intent. As scheduled my EventReceiver class, that extends BroadcastReceiver, processes the call in the onReceive method. How would I call the intent again from the onReceive method to schedule another event? ...

Android SDK - Other ways?

If I needed to build an android SDK that other developers can integrate into their android apps, is jarring my SDK the only way to go about it? As far as I have learnt, jarring has the following considerations: If your app uses a layout, then you have to create it programmatically. Since jar files cant carry any resources. The jar wil...

Using the pre-installed Google Maps instead of an own activity by using Intents?

Hey guys, I just wanted to know wether it is posssible to pass geocoords to the google maps app bis intents or something similar. I wrote an app for displaying route, coords and so on by myself, but wouldn't it be more elegant to ask google maps itself for displaying this? I don't know if this is possible, but maybe, one of you can ans...