broadcastreceiver - How to access duration of audio file in android using Broadcast Receiver -


 if.addaction("com.android.music.metachanged");     if.addaction("com.htc.music.metachanged");     if.addaction("fm.last.android.metachanged");     if.addaction("com.sec.android.app.music.metachanged");     if.addaction("com.nullsoft.winamp.metachanged");     if.addaction("com.amazon.mp3.metachanged");          if.addaction("com.miui.player.metachanged");             if.addaction("com.real.imp.metachanged");     if.addaction("com.sonyericsson.music.metachanged");     if.addaction("com.rdio.android.metachanged");     if.addaction("com.samsung.sec.android.musicplayer.metachanged");     if.addaction("com.andrew.apollo.metachanged");     registerreceiver(mreceiver, if);  }   private broadcastreceiver mreceiver = new broadcastreceiver() {     @override     public void onreceive(context context, intent intent) {         string action = intent.getaction();         string cmd = intent.getstringextra("command");         string artist = intent.getstringextra("artist");         string album = intent.getstringextra("album");         string track = intent.getstringextra("track");         toast.maketext(mainactivity.this, track +"\n"+artist+"--"+album, toast.length_short).show();      } }; 

i new in android please me someone. code work can't access duration , path of mp3 file. please me.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -