android-intent

Best way to play a Video file?

I have a URL for a video file which I need to play using the native Video-player of the handset. I figured using Intent.ACTION_VIEW and setting the URI as Intent data, I am able to achieve the aforementioned on G1 except HTC hero. In case of Hero, I have to explicitly set the class Name in the Intent to start the default Video Player: in...

Starting activity from packageinfo

Is there a way run an intent from packageinfo? I've been searching and I don't find it. I tried like that Intent i = new Intent(); i.setAction(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); i.setComponent(new ComponentName(p.applicati...

How do I use the android media services to return that media to my activity?

Hi! I'm interested in capturing media to use in my activity in two ways: 1) capturing immediately from the supplied app. (like http://stackoverflow.com/questions/2314958/using-the-camera-activity-in-android) Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); this.startActivityForResult(camera, PICTURE_RESULT); 2...

Restricting Android camera

Hello! Avoiding having to create a whole camera app myself, I am calling up: Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); this.startActivityForResult(camera, PICTURE_RESULT); However, the camera is very advanced and beautiful :) but not for my purposes. :( Is there a way to restrict the camera to control size, resolut...

How do I make an Android audio list using intents?

Hello! I believe I'm really close but not quite. Why do you think this code doesn't work? private Uri Atarget = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; (...) Intent intent = new Intent(Intent.ACTION_VIEW, Atarget); //intent.setType("audio/*"); startActivityForResult(intent,2); ...

Launch Google Maps app

Hi, I'm trying to launch Google maps from my application. I'm using: GeoPoint center = _mapView.getMapCenter(); Uri uri = Uri.parse("geo:"+center.getLatitudeE6()+","+center.getLongitudeE6()); Log.d(LOG_TAG, "Launching Google Maps with Uri: ("+uri+")"); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); ...

Should I use vnd.youtube:videoID?

While playing around with the emulator, I noticed that when trying to view a YouTube video the browser gives an error saying it can not load the page at vnd.youtube:ngc978y6rCU?some=parameters. I don't have an Android device, but by this I can suppose that launching a VIEW intent with the data URI set to vnd.youtube:VIDEO_ID would launch...

Find package name for Android apps to use Intent to launch Market app from web

I'm creating a mobile website that will include a page from which people can download relevant apps that we recommend. I've found instructions for creating the links to launch the Market but this assumes that you are the developer of the app in question and know the exact package name. Is there any way to get the package name, other th...

Android - Make default android image viewer to show only images from speciffic dir

Hello! I want to programaticly open androids image application to show only images from speciffic directory on the SDcard. Is there any way to do it? I just cant find a way. ...

open a live folder via an intent

I have a live folder in which are put reports for the user to see. When new reports are available I instantiate a notification and I want open the live folder when the user presses the notification. Is that possible? I tried with Intent.VIEW as an action and the content URI as the intent data but it does not work. Also I am using andro...

Using intent.getStringExtra from within an activity

I am relatively new to android. I have two applications A and B. I have an activity in A, lets name it x, that would launch the application B. Now the intent sent by x contains StringExtra that I want the Starting activity in B to use. Is there a way for the activity in B to do that? Thanks! ...

Android - Launch Intent within ExpandableListView

Hello, I'm trying to figure out if it is possible to launch an intent within an ExpandableListView. Basically one of the "Groups" is Phone Number and its child is the number. I want the user to be able to click it and have it automatically call that number. Is this possible? How? Here is my code to populate the ExpandableListView u...

Launch intent viewer to display image from url

I have the url of an image. What i need to do is launch the default image viewer for images using an intent. I tried launching it by using: Uri uri = Uri.parse("http://www.google.com/intl/en_ALL/images/srpr/logo1w.png"); Intent it = new Intent(Intent.ACTION_VIEW); it.setDataAndType(uri, "image/*") startActivity(it); But it doesn't ...

Android: Sending an Intent to Browser to open specific URL

Hi guys, I'm just wondering how to fire up an Intent to the phone's browser to Open an specific URL and display it. Can someone please give a hint? Is there also a way to pass coords directly to google maps to display? greetz, poeschlorn ...

Intent object not triggering intent-filter

Perhaps I'm misunderstanding how Intents and intent-filters work, but it seems to me that this should be a strait-forward case. However it's not working. Here is the Intent I'm sending: Intent i = new Intent(Intent.ACTION_VIEW); i.setType("vnd.android.cursor.item/vnd.connectsy.event"); startActivity(i); And here is the intent-filter:...

Alternatives for Pushing data from an Android Service to an Activity

I've a service that is receiving UDP data from the network. I want to push this data from the service to a UI activity. One way to do it is using broadcast Intents. What is the performance overhead of sending broadcasts frequently from the service to the activities? Are there any other alternatives for doing this ? Thanks. ...

Android: Programatically triggering phone checkin

From within my Android application, I need to make the phone 'checkin' with Google for Market updates. This can be done manually by the user by opening the dialer and typing '*#*#CHECKIN#*#*'. My app needs the ability to do the same thing. I'm positive this done using an Intent. Some digging shows that the Alarm Manager has this pend...

How to determine the expected arguments for an Android Intent?

Android provides a lot of Intents in the base OS and packages. How do I determine the arguments (that is, Data, Extras, etc.) to send to an Intent? For example, you can open the Settings app to show the Application Info for a particular app using this intent: String pkgname = "com.example.application"; // whatever the app is Intent i...

android - navigating frm 1 screen to anothr, done using Intent but eclipse gives some error

0 in my case i hav to navigate frm 1 screen to nthr aftr the timer is completed ... i hav 2 classes named test.java and test2.java!! inside Test.java class i hav created a class named Timer and in that in onFinish() method wen i write startActivity(new Intent(this,Test2.class)); finish(); eclipse shows an error "The constructor Intent...

Update Widget on System Broadcast Intent

I'm working on an Android widget that will show the current network state (i.e 1xRTT, EvDo Rev. A, WiMax, etc.). It may seem like a pointless idea, but for whatever the reason, the Evo doesn't differentiate between 1x & EvDo, it just says 3G for both, which is annoying if you're in a fringe 3G area. Anyways, to the point: I have the wid...