Receiving Android Google Play Music broadcast twice -


i hope you're having day :)

let's point... in manifest file have added receiver :

<receiver android:name="com.example.app.androidmusicbroadcastreceiver" android:exported="false">     <intent-filter>         <action android:name="com.android.music.metachanged" />     </intent-filter> </receiver> 

i've created class com.example.app.androidmusicbroadcastreceiver .

public class androidmusicbroadcastreceiver extends  broadcastreceiver {  public androidmusicbroadcastreceiver() {     // todo auto-generated constructor stub }  @override public void onreceive(context arg0, intent arg1) {       log.v("myapp","artist : "+arg1.getstringextra("artist"));     log.v("myapp","song : "+arg1.getstringextra("track"));    } } 

and works... reason log thing happens twice in row every time song changes. :

logcat

how come ? right assume option if want use information (artist, track) later, save in file somewhere ?


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -