willblaschko / AlexaAndroid

A library and sample app to abstract access to the Amazon Alexa service for Android applications.
GNU General Public License v2.0
280 stars 132 forks source link

How to Listen for playback events(play/pause/next/previous) and route to Local app to play media #151

Open chowdary60 opened 6 years ago

chowdary60 commented 6 years ago

Hello @wblaschkovf ,@willblaschko, @wantitmore, @rohith-krish

I have developed Internet radio which is working in my android local system. I have the AlexaAndroid sample app installed in my system. How can i listen for playback events(play/pause/next/previous) when i speak to Alexa and how can I route to the listened events to my local app?

chowdary60 commented 6 years ago

Any one has any idea how to implement them.

wantitmore commented 6 years ago

you write the correct the Context,and u will receive the response

ihavenoface5 commented 6 years ago

You will get AudioPlayer directives when you say pause/play/next/previous. See https://developer.amazon.com/docs/alexa-voice-service/audioplayer-overview.html

From here I would fire off an intent to your local app with the command that was received.