android-intent

Android: Open Browser with Supplying Session Cookie

Hi, I'm currently looking for a way to launch the default browser application on Android and pass a session cookie to it. My application communicates with an external API over which I have no control using HttpClient, then passes the user to the site for the final stages. I am aware that this is probably possible using a WebView, Howe...

Is it possible to block outgoing SMS on an Android phone?

Is there a way to listen for outgoing SMS messages in Android? If so, is it possible to prevent the message from being sent? ...

Android: Different start activity depending on user preference

My application starts with a welcome screen Activity, but that screen has an option to skip that screen altogether in future launches. What's the proper Android way to do this? Initially, I just automatically detected the skipWelcome preference and switched to the 2nd activity from Welcome. But this had the effect of allowing the use...

Get Mail Sent Notification in onActivityResult "Android"

Hi, I am launching a mail activity by //Sending mail final int SENT_MAIL = 1; startActivityForResult(Intent.createChooser(i, "Send mail"),SENT_MAIL); and in onActivityResult(int req, int res,Intent data) i am trying to find the result of email sending, so as to confirm if my mail was sent or was discarded by the use...

One application installed, show two entries in launcher

In Android, how to implement the following effect? Install just one application, but in the launcher, there are two entries, and entering each will go to different ui. Just like google map, you can see only one application, but there are map and navigation entries. Thanks. ...

Adding an intent filter for the default mail app

Hi I've added this intent filter <intent-filter android:label="@string/app_name"> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/plain" /> </intent-filter> My app shows up as a target for the intent in the chooser for many apps but no...

System-wide TouchEvent on Android

Hi, I'd like to receive a TouchEvent in my Android application any time the screen is touched. Even if my application is not in focus. Is there an general even listener or intent filter I can write to achieve this? The goal is to write system wide gesture engine. So for example, if the user swiped up and then down, a certain applica...

How do I ask for information from another Android application?

Hi. I need third party applications ("Foo") to get information from my application ("Bar"), but my solution so far seems cumbersome: Application Foo needs information from Bar and sends a broadcast ("bar.POLL"). Application Bar listens for this broadcast, and replies with another broadcast ("bar.PUSH"); Foo listens for bar.PUSH and re...

Android: restrict directories for images to be searched for from SD Card with ACTION_PICK

All, I want to ensure that a certain directory on the SD Card is not searched when my client app launches an intent to choose a picture from the library. I start the Intent like so: private static final int TAKE_PICTURE_FROM_LIBRARY = 2; private static final Intent takePictureFromLibraryIntent = new Intent(Intent.ACTION_PICK, android....

how do you get the name of a package that dispatched an intent in android?

I have a service setup to receive a PACKAGE_ADDED and a PACKAGE_REMOVED intent from all <data android:scheme="package" /> I receive the intent correctly, but I need to know how to use the Intent and Context classes from onReceive to get the name and label of the application that was added or removed. I have been able to use Intent.getD...

ActivityNotFoundException trying to load Contacts ContentProvider?

This is a weird one. I am seeing this crash report on some devices: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.PICK dat=content://com.android.contacts/contacts } The intent that generates this error is: Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT...

Cannot figure out the context when launching an Intent from within a thread completion method

I am trying to launch a new intent after I have loaded data. I am using a handler that calls a method when the thread is complete and then in this method I am trying to launch a new Intent but my app is crashing every time. I have narrowed it down to the Context variable in the Intent constructor. Here is my code: /** Called when the...

Sending information with Intent.putExtra

Hello! I have an array of integers in the activity A: int array[] = {1,2,3}; And i want to send that variable to the activity B, so i create a new intent and use the putExtra method: Intent i = new Intent(A.this, B.class); i.putExtra("numbers", array); startActivity(i); In the activity B i get the info: Bundle extras = getIntent(...

Add an option when long-pressing a number

Hi I'd like to add an option when long-pressing a number in the call list. Actually I have: Dial Send SMS Add to contact Edit before calling Remove Is it possible to add an option there? Such option should start my application through an Intent when pressed. Thanks ...

Android Image Intent from URL to Browser or other activity

I want to have an image open from a URL to an intent, most likely the browser or maybe a picture previewer like the one built into twidroyd. Intent intent = new Intent(); Uri uri = Uri.parse("http://nssdc.gsfc.nasa.gov/image/planetary/earth/gal_new-zealand.jpg"); intent.setDataAndType(uri, "image/*"); intent.setAction(android.content....

[Android] What's the best practice to pass data between Activities? Should I favor Parceable over Serializable as Intent Extra?

I'm developing an app which basically navigates through a xml-feed. When I parse the feed or let's say the list, then each (list)item becomes a model. All the models are wrapped up in an array list. Now, when the user clicks on a list item, the underlying model is going to be serialized and sent as IntentExtra to the next Activity (e.g...

Android SMS Message delivery report intent

Android isn't firing the delivery intent when sending a text message. I'm testing this on Android 2.2 on the HTC EVO 4G. This is the current code. I'm seeing "SMS sent intent received." in the logs, but not "SMS delivered intent received.". // Constants String SENT_ACTION = "SMS_SENT_ACTION"; String DELIVERED_ACTION = "SMS_DELIVERED_AC...

Make my activity one of the mail apps shown in the intent chooser

When clicking an email address from a browser or contacts app... Is there any way for my app to show a mail client in the intent list? ...

Wireless settings dialog

Hello, i am checking networking connection using the below code: public static boolean haveInternet(Context ctx) { NetworkInfo info = (NetworkInfo) ((ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo(); if (info == null || !info.isConnected()) { return false; // no connecti...

Return from an android activity back to widget (main menu)

I have a social network app+ widget, When user clicks on status (TextView) in the widget I open a short activity just to edit the status and save. Upon closing the status edit activity I want the user return to the main window (the page with the widget that initiated the textedit activity launch). Currently the status edit activity finis...