Android :: Launching M3u Playlist With Intent?
Aug 16, 2009
Is there a way to launch a playlist whith intent? I can retrieve the path of the m3u playlist with: Cursor cursor = context.getContentResolver().query (MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, null, null, null, null); cursor.getString(cursor.getColumnIndex (MediaStore.Audio.Playlists.DATA)); But, I can't launch this m3u file neither with Intent nor with MediaPlayer.
View 5 Replies
Aug 25, 2010
I know this has been asked a lot of times in StackOverflow already, but I haven't quite found a solution yet. My app sends an email with a link in it that when clicked should launch the app. According to @hackbod, the best way to do it is to make use of the Intent URI (see this). Here's my code that sets the intent and puts it in the email body: Code...
View 1 Replies
View Related
Jul 2, 2010
My program has a list of tabs that each contain a list of people.Clicking a person should edit their details, but instead, clicking a person throws an ActivityNotFoundException.
View 2 Replies
View Related
Jul 28, 2010
I've got two activities, one of them is called MyActivity. I want both of them to be able to use a function located in a class othat we may call MyClass. In MyClass, I try to use an intent to launch the activity AnotherActivity. Since the constructor takes a context as parameter, I simply tried to store a context from the activity in the constructor, and then use it when I try to create my intent.However, even thought none of the arguments are null (checked that with a simple if-statement), intent seems to be null and a NullPointerException is thrown. Why does it not work, and what can I do to solve the problem?
I'm quite new to Android and Java development, so please explain it as basic as you can.
View 2 Replies
View Related
Apr 18, 2010
My app needs to show Google Maps directions from A to B, but I don't want to put the Google Maps into my application - instead, I want to launch it using an Intent. Is this possible? If yes, how?
View 2 Replies
View Related
Jul 15, 2009
Wine by the Bar app (free in Android Market) is crashing on the HTC Magic.What intent settings/extras are needed to successfully launch ACTION_IMAGE_CAPTURE on HTC Magic?intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);App works fine on G1.Also need proper intent for choosing an picture already on the phone, and a cropping intent.
View 4 Replies
View Related
Jun 2, 2010
First of all let me say that this questions is slightly connected to another question by me. Actually it was created because of that. I have the following code to write a bitmap downloaded from the net to a file in the sd card:
// Get image from url
URL u = new URL(url);
HttpGet httpRequest = new HttpGet(u.toURI());
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = (HttpResponse) httpclient.execute(httpRequest);
HttpEntity entity = response.getEntity();
BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity);
InputStream instream = bufHttpEntity.getContent();
Bitmap bmImg = BitmapFactory.decodeStream(instream);
instream.close();
// Write image to a file in sd card
File posterFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/Android/data/com.myapp/files/image.jpg");
posterFile.createNewFile();
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(posterFile));
Bitmap mutable = Bitmap.createScaledBitmap(bmImg,bmImg.getWidth(),bmImg.getHeight(),true);
mutable.compress(Bitmap.CompressFormat.JPEG, 100, out);
out.flush();
out.close();
// Launch default viewer for the file
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(posterFile.getAbsolutePath()),"image/*");
((Activity) getContext()).startActivity(intent);
A few notes. I am creating the "mutable" bitmap after seeing someone using it and it seems to work better than without it. And I am using the parse method on the Uri class and not the fromFile because in my code I am calling these in different places and when I am creating the intent I have a string path instead of a file. Now for my problem. The file gets created. The intent launches a dialog asking me to select a viewer. I have 3 viewers installed. The Astro image viewer, the default media gallery (I have a milstone on 2.1 but on the milestone the 2.1 update did not include the 3d gallery so it's the old one) and the 3d gallery from the nexus one (I found the apk in the wild). Now when I launch the 3 viewers the following happen:
Astro image viewer: The activity launches but I see nothing but a black screen.
Media Gallery: I get an exception dialog shown "The application MediaGallery (process com.motorola.gallery) has stoppedunexpectedly. Please try again" with a force close option.
3D gallery: Everything works as it should.
When I try to simply open the file using the Astro file manager (browse to it and simply click) I get the same option dialog but this time things are different:
Astro image viewer: Everything works as it should.
Media Gallery: Everything works as it should.
3D gallery: The activity launches but I see nothing but a black screen.
As you can see everything is a complete mess. I have no idea why this happens but it happens like this every single time. It's not a random bug. Am I missing something when I am creating the intent? Or when I am creating the image file? As noted in the comment here is the part of interest in adb logcat. Also I should note that I changed the way I create the image file. Since I want to create a file that reflects an online file I simply download it instead of creating a Bitmap and then creating the file (this was done because at some point I needed the Bitmap but now I do it the other way around). The problems persist thought and are exactly the same:
I/ActivityManager(18852): Starting
activity: Intent {
act=android.intent.action.VIEW
dat=/sdcard/Android/data/com.myapp/files/image.jpg
typ=image/* flg=0x3800000
cmp=com.motorola.gallery/.ViewImage }
I/ActivityManager(18852): Start proc
com.motorola.gallery:ViewImage for
activity
com.motorola.gallery/.ViewImage:
pid=29187 uid=10017 gids={3003, 1015}
I/dalvikvm(29187): Debugger thread not
active, ignoring DDM send
(t=0x41504e4d l=38)
I/dalvikvm(29187): Debugger thread not
active, ignoring DDM send
(t=0x41504e4d l=64)
I/ActivityManager(18852): Process
com.handcent.nextsms (pid 29174) has died.
I/ViewImage(29187): In View Image
onCreate!
D/AndroidRuntime(29187): Shutting down VM
W/dalvikvm(29187): threadid=3: thread
exiting with uncaught exception
(group=0x4001b170)
E/AndroidRuntime(29187): Uncaught
handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(29187):
java.lang.RuntimeException: Unable to
start activity
ComponentInfo{com.motorola.gallery/com.motorola.gallery.ViewImage}:
java.lang.NullPointerException
E/AndroidRuntime(29187): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
E/AndroidRuntime(29187): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
E/AndroidRuntime(29187): at
android.app.ActivityThread.access$2200(ActivityThread.java:119)
E/AndroidRuntime(29187): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
E/AndroidRuntime(29187): at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(29187): at
android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(29187): at
android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime(29187): at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(29187): at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(29187): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(29187): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(29187): at
dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(29187): Caused by:
java.lang.NullPointerException
E/AndroidRuntime(29187): at
com.motorola.gallery.ImageManager.allImages(ImageManager.java:5621)
E/AndroidRuntime(29187): at
com.motorola.gallery.ImageManager.getSingleImageListByUri(ImageManager.java:5515)
E/AndroidRuntime(29187): at
com.motorola.gallery.ViewImage.onCreate(ViewImage.java:1801)
E/AndroidRuntime(29187): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(29187): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
E/AndroidRuntime(29187): ... 11 more
View 3 Replies
View Related
Jun 25, 2009
From the JavaDoc, the EXTRA_STREAM parameter when launching an intent needs to be an URI. How can I pass a Bitmap object which I get from launching a "android.provider.MediaStore.ACTION_IMAGE_CAPTURE" intent? code...
View 6 Replies
View Related
Jul 23, 2009
I have an activity that is showing a video and when the user clicks a button, a new activity is launched. When the video activity stops, I pause the video view. When the video activity starts up again, I try to resume the video view videoView.start(), however, the video starts over from the beginning. I'm thinking that the buffer must be lost somewhere, so I now try to capture the current position via videoView.getCurrentPosition(), however, this is always returning 0.
Anybody know how to resume video playback when an activity starts up again?
View 5 Replies
View Related
Oct 5, 2010
Launching a Streetview intent for a location doesn't guarantee that a Streetview exists for that location. If the Streetview doesn't exist, the user just sees a black screen that spins. Is there a way to programmatically check if it exists before launching the Streetview intent?
View 2 Replies
View Related
Apr 3, 2010
I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app. My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity. steps: Launch root activity A, press home Open email attachment, intent filter triggers launches root activity A Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?
View 1 Replies
View Related
Apr 22, 2010
I was curious...does anyone know if there is a app out there that allows you to add a playlist of ringtones? Everytime you recieve a call it would be a random ring tone from the list. If you have specifically set a ring tone for a specific contact, then that one will play when they call you, but if no ring tone is set...then it would pick a random one from your playlist.
View 1 Replies
View Related
Mar 31, 2010
I'm making a media player, but my code doesn't show all my playlists and for many others it does not show any.Why doesn't the code below work completely?
View 2 Replies
View Related
Jul 7, 2010
When i add new songs to my HTC Tattoo Android Phone, it correctly adds the songs to the list in the standard Music Player.
But when i delete songs from the phone through USB-connection, the songs stays on the playlist, even though they dont exist.
This has resulted in a playlist of over 400 songs, which only 40 of them actually works..
Is there any way to force a renew on the playlist so i can get a "clean" playlist?
View 2 Replies
View Related
Dec 22, 2009
As of right now I am using the stock Music widget on the droid for my music. I made several playlists today but now would like to move some songs to another playlist and delete them from the original playlist. However there is no way to do this. The only option I found was to delete the song from the library all together! Any apps you all recommend that might be better to use for my music?
View 1 Replies
View Related
Apr 13, 2010
I am wanting to query the members of a given playlist. I have the correct playlist id, and want to use a managedQuery() to look at the playlist members in question.
What I have is this: Code...
I don't know what the volume argument needs to be. I've tried this: MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI.toString() for the "volume" argument.
That gives me back a valid content URI that looks like:
content://media/external/audio/playlists/2/members
However, my cursor comes back null. I probably am way off base -- I know what I want to do is very simple.
View 1 Replies
View Related
Jul 23, 2010
when i did, a playlist that has taken me the last two weeks to make disappeared. as luck would have it though it reappeared today for some reason. i would like to make a copy of it to save on my pc in case it decides to disappear again, but i can't seem to find the file. i made the playlist using the "Music" app that came with the phone. it's about 250 songs out of the 4.5 gigs i put on sd card.
View 6 Replies
View Related
Jul 18, 2010
I am looking for an Android Audio Player that is based on a "now playing" playlist, like Amarok, Winamp or WMP. In relation with that playlist, I want buttons to add a song as the next song, or to add the song to the end of the playlist. Like the Rockbox firmware does it. Is there any app out there that works like this? I don't need any advanced features like lyrics, covers, etc, I just want to listen to music. In case there's nothing around, I'll even consider developing my own. Who needs synched lyrics if there's not even an "add next" option?
View 4 Replies
View Related
Apr 22, 2010
The playlist names can be found by a query on MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI
and then look at the MediaStore.Audio.PlaylistsColumns.NAME column. There is a data column too, MediaStore.Audio.PlaylistsColumns._DATA, but it is returning null. The list of songs (MediaStore.Audio.Media.EXTERNAL_CONTENT_URI/id) do not seem to show any playlist affiliation.
View 1 Replies
View Related
Jul 27, 2009
Anyone knows if Android 1.5 support video playlist format such SMIL? Also Android SDK doesn't include all the classes in J2ME such as: javax.microedition.media.protocol.DataSource.
View 2 Replies
View Related
Jan 10, 2010
I'm using the MixZing app for my music. It's otherwise not bad, but I find I have to manually (and individually!) enter songs to a Playlist from my G1. I'd rather do it via Windows Explorer with a right-click function, but I don't believe there is one. Is there any way I can add songs on my G1 to a playlist using Windows Explorer?
View 1 Replies
View Related
Oct 22, 2009
I created a shortcut to a playlist (m3u) on my Home screen. When I clicked it, it asked if I wanted to use Meridian media player or the standard one. I prefer Meridian, so I selected that. It opened Meridian and showed the playlist file name, etc, but not the actual playlist. Is there any way to get this to work and actually play (or load) the playlist?
View 1 Replies
View Related
Nov 15, 2010
With my old phone, MyTouch, Android 1.6, I would export a playlist from iTunes as an .m3u file, and copy that playlist file over to /sdcard/music/playlists so that it would be on my phone. I manually copy all of the music from the playlists into /sdcard/music so that every song that is in said playlists is in the music directory. The music app would take awhile to update and read everything, but once I gave it some time to work, everything worked wonderfully. That was all I had to do.
With my new phone, Incredible, Android 2.2, when I do the same steps, it doesn't work. I open the music app, go to the playlist option, and it thinks and thinks and thinks. Then each playlist will appear, alphabetically, and then disappear, until there are no playlists at all.
I read some forums online and have tried multiple things, and apparently Android 2.2 reads the SD card looking for music, and when reading a playlist, if it can't find any of the songs in the list, it deletes the playlist. The playlist is not only deleted from the list in the music app, but is completely deleted from the SD card entirely.
Here is my concern... When this playlist is exported, it has the path from C: on my computer, because that is where the music is housed on the computer. Moving it to my phone has never been a problem previously because it ignored the C: path and just found the song, without worrying about the additional directory information. But the newer version of Android isn't doing the same thing, I think it's more picky?
Anywho, I need my playlists! I don't want to use MediaMonkey, and the m3u files have worked fine in the past - quick and easy, without having to use additional programs. I really, really, REALLY don't want to have to go through these playlist files and remove all of the path information because these are huge lists, but I guess I might have to. Do you have any other ideas on what I can do to make this work?
I've tried different directories for the playlists on the phone - but I don't think that's the problem because the phone can SEE the playlists, and then deletes them. I've tried creating a playlist on the phone so that I could see the format of it, but the playlist that I created can't be found on the phone. I don't know how the phone creates them, or where it houses them, as I tried to search for it and was unsuccessful.
View 1 Replies
View Related
Mar 18, 2010
I have a Nexus I would like to sync with my iTunes on my Mac. What is the best way to do this to get the playlists etc?
View 6 Replies
View Related
Dec 10, 2009
Does anyone know if there is a good car kit that I can plug my Hero into my car and listen to the playlist or Pandora through my car stereo?...and also charge it at the same time?
View 4 Replies
View Related
Nov 15, 2009
This can't be as difficult as it seems. Just to make sure the SD card is clean I formatted it, then mounted the SD card and using doubleTwist did the following:
- Brought my iTunes playlists into doubleTwist
- Selected the one I wanted on the Droid (named "Mobile Phone")
- Drug it to the connected Droid and the songs start transferring just fine (there's only about 300 in this playlist).
- Transfer gets about 70% completed and just hangs up. DoubleTwist at this point is hung up so can't unmount the SD card. Unplug the USB cable
- Now when I go to the SD card it says "SD card is busy" but of course nothing is happening.
- At this point I have to do a battery pull to gain access to the SD card in order to format it again.
View 2 Replies
View Related
Aug 17, 2010
I want to change the order of songs of playlists created in my Android [Samsung Galaxy S / Vibrant], but can't figure out how to do it. I've figured out how to create playlists and delete duplicates. I can delete songs from a playlist, but if I just want to move them up, so far no luck. [I'm trying the free version of MixZing player since the std. player says there's not room in my music database to show me the artists in my collection, but that's a different problem. I suppose there's a chance that upgrading MixZing might solve this problem, but I doubt it.
View 1 Replies
View Related
Jul 8, 2009
I am developing an Android application to launch the another Android application in the device.Please let me know Is there any possible way to do this?
View 2 Replies
View Related
Jan 13, 2010
How can I code my Android application to start the web browser to display a given URL?(I'd rather not embed a web browser component into my app, but rather want to start the Android web browser to show the URL)
View 1 Replies
View Related
Jan 14, 2010
Does anyone know how to get playlist.com to play songs? I assume it's some sort of plugin I don't have but I dunno. There have been a few sites that Just had a large grey circle with an X in the middle.
View 2 Replies
View Related