[android-developers] Re: How to programaticly create playlists ?

2014-07-24 Thread Nayanesh Gupte
Hi François R.,

 
Did you get any solution for this?

On Sunday, December 6, 2009 12:02:31 AM UTC+5:30, François R. wrote:

 Hi, 

 I would like to write some code creating automaticly some playlist for 
 the mp3 player. 

 I use 

 ContentValues values = new ContentValues(); 
 values.put(MediaStore.Audio.Playlists.NAME, nom); 
 return getContentResolver().insert 
 (MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, values); 

 to create my playlist and something alike for members. 

 It runs well but every time I mount the sd card, MediaScanner scans 
 again my mp3, erase all the members and let the playlist empty. When I 
 run the music player, the playlist are still there but when I chose 
 one of them, there is no more mp3 in it. 

 I can start my program to refill the playlists but I would like to 
 know why MediaScanner erase my members. Is there a better way to do or 
 a trick to avoid this ? I tried to read MediaScanner.java but i don't 
 see how... 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Launch navigation app with an Intent - [DS]

2012-08-12 Thread NayAnesh Gupte


You could use something like this:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
Uri.parse(http://maps.google.com/maps?saddr=20.344,34.34daddr=20.5666,45.345;));
startActivity(intent);

You can use an actual street address instead of latitude and longitude. 
However this will give the user a dialog to choose between opening it via 
browser or Google Maps.

If you are in the US, you could use an unofficial way (Since it isn't 
official, I don't recommend using it). This will fire up Google Maps in 
navigation mode. Haven't played with it since where I live it isn't 
available.

Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(google.navigation:q=an+address+city);



If you want to get rid of the dialog you can give the intent a hint as to 
which package you want to use. 
Before the startActivity() add this: 
intent.setClassName(com.google.android.apps.maps, 
com.google.android.maps.MapsActivity); 


On Saturday, December 12, 2009 3:18:20 AM UTC+5:30, Declan Shanaghy wrote:

 Hello,
 I realize this might not be the proper place to post this since it's not 
 Android specific, but rather its about integrating with a google app.

 I've been trying to find some documentation on launching / controlling the 
 Google Navigation app via Intents or otherwise.
 I was hoping to find an intent to launch the navigation app with address 
 parameters setup and start navigation immediately.

 Can't find anything out there, so I'm still not even sure if it can be 
 done.

 Anyone have any ideas?


 Thanks,
 Dek


 -- 
 An engineer's definition of done is the perfect set of code, and left to 
 his own devices, an engineer will endlessly improve the code on the mythic 
 journey to done.
 -- http://www.randsinrepose.com

 [DS]



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Run background thread or service till application is in foregrouund.

2012-07-11 Thread NayAnesh Gupte
Hello all,

I want to run a background thread or service till application is in 
foreground. Means i want that service to run in background only if any 
activity of an application is in foreground and visible.
when application is in background or not running i.e no activity is in 
foreground or visible it should stop service or cancel that background 
thread.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en