i've a music player app using MediaBrowser... YouMediaPlayer
i need to create a widget with which to control some functions such as play / pause / stop / etc.
if i play a song from my app and then minimize the app, the song continue playing..
how can i STOP or pause the song from widget?the problem is that they are 2 separate apps (widget and app) and cannot interact
some ideas?
Use an intent to send the player app an intent which pauses/plays/skips the media.
You will need to build in intent filters to your player to receive the intent, and generate intents in the widget.
Sub Activity_Resume
Dim Intent1 As Intent
Intent1=Activity.GetStartingIntent
If Intent1.HasExtra("Var1") AND Intent1.HasExtra("Var2") Then
Dim Var1 As String=intent1.GetExtra("Var1")
Dim Var2 As String=intent1.GetExtra("Var2")
Else
' handle the activity being started with an Intent that doesn't contain the required values
End If
End Sub