intent

Android intent for playing video?

Hi! I'm trying to play video's on Android, by launching an intent. The code I'm using is: tostart = new Intent(Intent.ACTION_VIEW); tostart.setDataAndType(Uri.parse(movieurl), "video/*"); startActivity(tostart); This works on most phones, but not on the HTC Hero. It seems to load a bit different video player. This does play the first ...

Android:NPE while trying to activityForResult with ACTION_APPWIDGET_PICK intent

Hi all, I have a problem then trying to put an intent with AppWidgetManager.ACTION_APPWIDGET_PICK there is a problem somethere inside of android AppWidget ecosystem as I can see from the logs. So that I doing wrong? See sample code and stack trace below public class NPEDemoActivity extends Activity { private final static int HOST_C...

Multiple MIME types in Android

Is there a way to use setType() and supply multiple broad types (like images and video)? I'm using an ACTION_GET_CONTENT. It seems to be working with just comma-separated types. ...

Receiving MP3 play actions in a BroadcastReceiver in Android

I am trying to build an Android Service that should get notified when the user starts playing an MP3. I checked LogCat when I start playing a song and saw that the following Intent is logged: Intent { act=com.android.music.PLAYBACK_VIEWER flg=0x4000000 cmp=com.android.music/.MediaPlaybackActivity } I couldn't figure out how to write a...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity's launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would reuse a single Activity instance and give me the Intent in the onNewIntent callback. I did both of these things, and onNewIntent never fi...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the 'net, and have it passed to my application to deal with it, but I haven't been able to figure out the intent filter. The filetype is not included in the mimetypes, and I tried using <data android:path="*.ext" /> but I couldn't get that to work. ...

Overriding the Activity/Task behavior in Android

I'm writing a simple Android app, and I'd like better control over the navigation/relationship between the activities. I don't want my activities to act like android activities...I don't want them to stack up within the Task. I want one activity (let's call it MainActivity) to be the landing point and always be at the bottom of the sta...

Android: Callback for an application launch

Is there a way I can be notified of an application launch and termination in Android? I mean, more like subscribing to the Activity Manager and then determining which applications have been started and stopped... ...

Android Intent-filter working for Magic, but no Hero, what could be the problem?

Hi Im working on an application that got an acivity that is set to have intentfilter <intent-filter> <action android:name="android.intent.action.RINGTONE_PICKER"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> This works fine when im testing with a HTC Magic phone, when I go to s...

How do I launch the email app with the "to" field pre-filled?

I tried this code which I found here: Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", "[email protected]", null)); startActivity(intent); But I get a message on the screen which reads "Unsupported Action". Any ideas of how to get this working? Thanks! ...

android : how does the OS chose a component implementation when multiple implementation respond to the same intent ?

I have a free and a premium version of the same app (almost same code, same classes with "if"s here and there, different packages in the manifest, same process name in the manifest). The main activity calls a service to execute some stuff, using an IMPLICIT intent. When I install both apps on the phone, it turns out that the premium ac...

Email Intent not showing the chooser.

I'm using the following to initiate the sending of an email: Intent i = new Intent(Intent.ACTION_SEND); i.setType("message/rfc882"); i.putExtra(Intent.EXTRA_EMAIL, new String[]{s}); startActivity(Intent.createChooser(i, "Send mail...")); The problem that I'm having is that (on my phone) it pulls up Gmail's Compose window instead of a...

Android camera intents

Roger, I see that you've been tinkering with camera intents. I'm having real trouble just getting a simple app to tell me when the camera button has been pressed. Do you have some code to help me on my way. Thanks. David ...

Start system activity picker even when a default one is set

Hi, Is there a way to show the system activity picker even when a default activity for the intent is set? I'm aware there is an ACTION_CHOOSER, but it does not give user a second chance to change the default settings. Thanks ...

How do I bypass the "Complete Action Using ..."

Hey guys, I have a question related to choosing an application programmatically when shown the dialog "Complete Action Using" in Android. An example would be as follow: In my code, I have this statement startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=98yl260nMEA"))); I will then shown a...

Problem with system intents

I have a program that has a broadcast receiver that listens for Phone_State and then sends a user defined intent. Well, my problem is that the system also sends out an intent (the one that I am trying to replace with my program) So I am trying to find a way to CANCEL the systems intent. I have found that if i have a timer just wait for a...

BroadcastReceiver not receiving intent

So now I have my BroastcastReceiver declared in the manifest file... <receiver android:name=".MyReceiver"> <intent-filter> <action android:name="android.intent.action.CALL_BUTTON" /> </intent-filter> </receiver> I want to catch the intent when the Call button is pressed. Here is my code... public class MyReceiver...

Android ACTION_IMAGE_CAPTURE Intent

We are trying to use the native camera app to let the user take a new picture. It works just fine if we leave out the EXTRA_OUTPUT extra and returns the small Bitmap image. However, if we putExtra(EXTRA_OUTPUT,...) on the intent before starting it, everything works until you try to hit the "Ok" button in the camera app. The "Ok" button j...

Trying to Send Data To App Widget

Hey there, I'm working on a widget that will change the data it is displaying when a user taps on it. This would normally be easy to deal with, but my app widget provider is handling multiple widget instances that have different sets of data. With that being said, when a user taps on the widget, a PendingIntent is launched that calls th...

Android Intent Save Path

Hey Guys At the moment I am using two intents. One for voice-recording, another for the camera: Intent photoIntent = new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(photoIntent, ACTIVITY_TAKE_PHOTO); Intent voiceIntent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION); startActivityForResult(voiceIntent...