android-intent

Customize the Android contact picker

I'd like to present a Contact picker, but add additional prompting when the picker is opened. On 1.5 the title is simply "Contacts". I was thinking I could add an EXTRA_TITLE to the Intent which opens the picker, but it supposedly only works on ACTION_CHOOSER, not ACTION_PICK. Or do I have to roll my own Contact picker? ...

Android add my application intent to edittext menu options

Hi Developers, I need to add a option to my app after select,copy,copy all, paste of menu items of edit text. I have to add intent action in that menu so that when user click the option it will trigger to my application Thanks in advance :) ...

[Android] What are intent-filters?

In my android app, I wanted to start an activity 'B' from initial activity 'A'. I have created classes for both of these. However when using following code to start B, I get runtime error as application has stopped unexpectedly, try again. Intent myIntent = new Intent(this, AddNewActivity.class); startActivity(myIntent); When I added...

Launch Browser Intent with Custom Class - cannot find Activity

I want to specifically run the default Android browser for a given URL. I'm using this code: Intent i = new Intent(); i.setAction("android.intent.action.VIEW"); i.addCategory("android.intent.category.BROWSABLE"); i.setClassName("com.google.android.browser", "com.android.browser.BrowserActivity"); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TAS...

Passing data through Intents from a class to another class and can't catch it?

I've two String Arrays like that , String[] htmlArray = { "file:///android_asset/Pinocchio/OPS/chapter-001.xml", "file:///android_asset/Pinocchio/OPS/chapter-002.xml", "file:///android_asset/Pinocchio/OPS/chapter-035.xml", "file:///android_asset/Pinocchio/OPS/chapter-035.xml" }; String[] htmlArray1 = { ...

2 Intent Filters, 1 Activity - Which opened it?

Is there a way to know which Intent Filter is responsible for launching an Activity which has two Intent Filters defined in AndroidManifest.xml? I want a slightly different set of logic, but not enough that should require a whole new Activity. Thanks! ...

My class extands from InstrumentationTestCase class, it seems like I will not have an Activity

Hi All I quite new to Android I created a class that extends Android class this way: public class MyClass extends InstrumentationTestCase I looked the chain of InstrumentationTestCase and found that there is no Activity class in this chain. So I didn't create a activity. Also in my manifest I see no activity tag. No I wish t...

Display android listview based upon listview selection

Hello, I have a listview say in this instance has the values: UK, USA, FRANCE These values are pulled from a static array held within my string.xml file. Additionally, within the string.xml is 3 arrays each referring to UK, USA and FRANCE & basically I want to load these arrays into a new listview depending on the users onclick event...

Android: open file in byte array representation with Intents

Hi guys, I'm a litte bit desperate to open a file with intent so that android can decide which application should handle this file. My Problem is that i have only the file as an Base64 representation which i decode to an byte Array Now i want to send an intent and open that file. I try to do save it in the internal storage and open th...

Messaging and email intents in Android?

I've searched Google for this, but have only found similar examples--not exactly what I need. I simply need to start messaging (SMS) and email intents from my app with their "to" fields already populated. So I need to send a number with the sms intent and an email address with the email intent. Any help would be appreciated. ...

Register to be default app for custom file type

Register to be able to open files of custom type. Say i have .cool files, and if the user tries to oepn it, Android asks if they would like to open it with my application. How? ...

Using a single intent with multiple buttons!

Hello all, I having a pretty slow day tday so bare with me. Basically I have an android context menu with various selections and depending on the user selection I want to start an intent. The intent starts the same activity for all the buttons but will contain different String variables depending on the selection. I am currently using a...

Android Tabs & Intents

Hello all, I have a auto-complete textbox in which the user makes a selection. From here I want to load a tabbed layout which is based on the user selection. The problem is I cant figure out a clean way to pass that selection to each of the tabs. At the moment I can pass an intent to the 'tabhost' activity and then pass to each child ac...

How do I launch the email client directly to inbox view?

Is this even possible without calling a specific package? I have found countless examples of sending email via intent, but I can find nothing about simply opening the default email client on the device via button press (preferably with a chooser dialog in case the user has multiple clients). ...

Relaunch app from intent

I would like to put a notification with an intent. My intent is basically action = DEFAULT and category = LAUNCHER in order to bring the activity that was launched into the front. When the app is not shown, there is no problem, the intent works perfectly and launches the last activity seen but when there is already an activity launched, ...

How do I permit the android browser to download files of a particular extension?

I want to have the default android browser be able to download files of a particular file extension, .xyz, for example. Without installing Astro (or some other file manager), users will get the error "Cannot download. The content is not supported on this phone". Installing the Astro application allows the android browser to download any...

Android contact picker and search

I have an app which allows the user to select a contact via an ACTION_PICK Intent using code similar to this example. This works fine, but the user can press the Search key and choose a contact from the search results. In this case, the picker brings up the contact view where the only actions available are email, call, etc. I'd expect ...

Cancel dynamic notification in Android when the notification is selected

Suppose I am creating an Android application that's like an SMS app. The requirements are as follows: The user can receive multiple notifications, each one having a dynamic ID of type int. When a notification is selected, it loads an activity which displays a corresponding message (the SMS). The single notification that was selected s...

In Android, how can I detect why my activity was resumed?

I'm developing an Activity that does some of its own state management. I'm trying to differentiate the following onResume cases: New launch task switch (home button long-click) resume after other activity in the same application wake-up after sleep orientation change Is there something in the Activity's intent, or elsewhere, that ca...

startActivityForResult(android.provider.MediaStore.ACTION_VIDEO_CAPTURE) never returns result

I'd like to launch a video capture Intent that calls me back with some kind of result. So far it correctly launches the G1's default Camcorder app, but when I finish recording the video in Camcorder, it just sits there (still in the Camcorder app) instead of calling my onActivityResult() method. Is this just a shortcoming of Camcorder...