Google Maps Broadcast Event for audible navigation instructions start and stop?

by skyhigh » Tue, 15 Dec 2009 03:53:02 GMT


Sponsored Links
 I have an application which is playing audio.  I have some customers
that use this application while driving and who also use the Google
Maps application to get directions to the places where they are
driving.

They have asked me to change my application to pause my audio while
the Google Maps application is giving them audio navigation
instructions.  I am trying to find out if I can register a Broadcast
Receiver to let me know when the Google Maps application is giving
audio navigation instructions, or if there is a way to detect when any
other application has started or stopped playing audio.

It seems that this type of functionality would be beneficial for
Google Maps and for any type of application which is playing media, so
I am hoping that Google Maps is broadcasting events when it starts and
stops giving audio navigation instructions, or that there is a generic
way to discover when overlapping audio sources are trying to play.

--



Google Maps Broadcast Event for audible navigation instructions start and stop?

by justinh » Tue, 15 Dec 2009 04:19:13 GMT


 Unless it is here then it is unsupported and you shouldn't use it
anyway:  http://developer.android.com/reference/android/content/Intent.html 

Of course, there is nothing from any of the Google apps listed there.
Not sure about just general audio.





--


Sponsored Links


Google Maps Broadcast Event for audible navigation instructions start and stop?

by blindfold » Tue, 15 Dec 2009 15:55:19 GMT


 +1. I am interested in this functionality too, to mute my app when
Google Maps Navigation is talking.




--



Google Maps Broadcast Event for audible navigation instructions start and stop?

by skyhigh » Wed, 16 Dec 2009 10:38:05 GMT


 I checked the Android reference intent documentation that you linked
to, but couldn't find anything that I could use to detect either
Google Map audible navigation or generic overlapping media playing.

It seems like this would be a useful broadcast notification for anyone
providing an audio application.  If Google Maps doesn't already
provide this broadcast notification is there a way to request this
functionality be added to Google Map?

--



Google Maps Broadcast Event for audible navigation instructions start and stop?

by Dianne Hackborn » Wed, 16 Dec 2009 10:59:18 GMT


 The platform needs to have richer features for deciding which audio to do at
various times.  I don't think having maps send a broadcast is really a good
solution for this, and likely to quickly become a mess for everyone.




>



Google Maps Broadcast Event for audible navigation instructions start and stop?

by skyhigh » Wed, 16 Dec 2009 13:32:53 GMT


 It would be great if the platform provided this functionality so that
audio applications could pause when appropriate for audio
notifications or other interruptions.  I agree that providing this
support in the platform would be best, then it would work regardless
of the source of the audio notification/interruption.

Long term audio apps such as music players, podcast listeners, and
audiobook players could automatically pause when appropriate and then
resume after the interruption has finished.  Short term audio users
such as audible notifications, alerts, and phone calls could signal
the long term audio apps to get out of the way until they have
finished so that overlapping audio isn't playing.  A single platform
provided mechanism for this would be very nice.

I hope that your comment means that you have forwarded an enhancement
request for this type of platform supported audio coordination to the
appropriate people.


--



Other Threads

1. Connection between Android phone and python server

I want to be able to send  Messages Between Android phone and Python
Server so to be able to send my lat and lang in GPS appear on my
Android mobile phone . because i cant open socket on my android mobile
and i want to be able to send lat and lang (GPS ) from my android
mobile to my Server Python and i cant open socket using the phone;
socket can be open only when i use Emulator .. So tany solution !! or
suggestion to solve the problem?

-- 

2. AlarmManager pitfalls

n my alarm clock I use the following code to enable signals:

Intent i = new Intent(AlarmReciever.ACTION_WAKEUP);
i.putExtra(AlarmDao.ID_COLUMN, a.getId());
PendingIntent pendingIntent = PendingIntent.getBroadcast(
context, a.getId(), i, PendingIntent.FLAG_CANCEL_CURRENT);
Calendar cal = a.getNextAlarm();
if(cal!=null){
    AlarmManager alarmManager = (AlarmManager)
context.getSystemService(context.ALARM_SERVICE);
    alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
pendingIntent);
    if(toast) showToast(context, cal);
}
My receiver starts service, that plays music and show "switch off"
dialog.

onReceive(....
context.startService(wakePlayer);
context.startActivity(wakeWindow);
...}
The problem with this code is that sometimes it fails. I mean it
doesn't start music and show the dialog. Have anyone faced the same
problem?

-- 

3. Bind to Service in Fragment

4. Music app that can see hidden folders?

5. OOT : Facebook ketangkep basah main "Belakang"

6. Emulator:how are add-on platform images merged ?

7. Proper way to define task affinity name