<div dir="ltr">Oh ok. Apologies. Might I suggest updating the wiki with this information?<div><br><div>Do you want me to resubmit it to ther other mailing list?<br><br><div class="gmail_quote">On Wed, Apr 8, 2015 at 10:25 PM Tristan Matthews <<a href="mailto:tmatth@videolan.org">tmatth@videolan.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Apr 8, 2015 at 4:19 PM, Guillaume <<a href="mailto:h.guillaume@gmail.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=h.guillaume@gmail.com&cc=&bcc=&su=&body=','_blank');return false;">h.guillaume@gmail.com</a>> wrote:<br>
> Forgot to attach the actual patch:<br>
><br>
> ---<br>
> .../src/org/videolan/vlc/<u></u>audio/AudioService.java | 27<br>
> ++++++++++++++++++++++<br>
> 1 file changed, 27 insertions(+)<br>
><br>
> diff --git a/vlc-android/src/org/<u></u>videolan/vlc/audio/<u></u>AudioService.java<br>
<br>
Nice patch, note that vlc-android patches/discussion should normally happen on:<br>
<a href="https://mailman.videolan.org/listinfo/android" target="_blank">https://mailman.videolan.org/<u></u>listinfo/android</a><br>
<br>
Best,<br>
Tristan<br>
<br>
> b/vlc-android/src/org/<u></u>videolan/vlc/audio/<u></u>AudioService.java<br>
> index 090ef6f..f99334d 100644<br>
> --- a/vlc-android/src/org/<u></u>videolan/vlc/audio/<u></u>AudioService.java<br>
> +++ b/vlc-android/src/org/<u></u>videolan/vlc/audio/<u></u>AudioService.java<br>
> @@ -819,6 +819,7 @@ public class AudioService extends Service {<br>
> mHandler.removeMessages(SHOW_<u></u>PROGRESS);<br>
> // hideNotification(); <-- see event handler<br>
> mLibVLC.pause();<br>
> + broadcastMetadata(this);<br>
> }<br>
><br>
> private void play() {<br>
> @@ -828,6 +829,7 @@ public class AudioService extends Service {<br>
> mHandler.sendEmptyMessage(<u></u>SHOW_PROGRESS);<br>
> showNotification();<br>
> updateWidget(this);<br>
> + broadcastMetadata(this);<br>
> }<br>
> }<br>
><br>
> @@ -840,6 +842,7 @@ public class AudioService extends Service {<br>
> mPrevious.clear();<br>
> mHandler.removeMessages(SHOW_<u></u>PROGRESS);<br>
> hideNotification();<br>
> + broadcastMetadata(this);<br>
> executeUpdate();<br>
> executeUpdateProgress();<br>
> changeAudioFocus(false);<br>
> @@ -928,6 +931,7 @@ public class AudioService extends Service {<br>
> setUpRemoteControlClient();<br>
> showNotification();<br>
> updateWidget(this);<br>
> + broadcastMetadata(this);<br>
> updateRemoteControlClientMetad<u></u>ata();<br>
> saveCurrentMedia();<br>
><br>
> @@ -991,6 +995,7 @@ public class AudioService extends Service {<br>
> setUpRemoteControlClient();<br>
> showNotification();<br>
> updateWidget(this);<br>
> + broadcastMetadata(this);<br>
> updateRemoteControlClientMetad<u></u>ata();<br>
> saveCurrentMedia();<br>
><br>
> @@ -1227,6 +1232,7 @@ public class AudioService extends Service {<br>
> setUpRemoteControlClient();<br>
> showNotification();<br>
> updateWidget(AudioService.<u></u>this);<br>
> + broadcastMetadata(<u></u>AudioService.this);<br>
> updateRemoteControlClientMetad<u></u>ata();<br>
> AudioService.this.<u></u>saveMediaList();<br>
> AudioService.this.<u></u>saveCurrentMedia();<br>
> @@ -1258,6 +1264,7 @@ public class AudioService extends Service {<br>
> setUpRemoteControlClient();<br>
> showNotification();<br>
> updateWidget(AudioService.<u></u>this);<br>
> + broadcastMetadata(<u></u>AudioService.this);<br>
> updateRemoteControlClientMetad<u></u>ata();<br>
> determinePrevAndNextIndices();<br>
> }<br>
> @@ -1478,6 +1485,26 @@ public class AudioService extends Service {<br>
> sendBroadcast(i);<br>
> }<br>
><br>
> + private void broadcastMetadata(Context context) {<br>
> + MediaWrapper media = getCurrentMedia();<br>
> + if (media == null)<br>
> + return;<br>
> + String track = media.getTitle();<br>
> + String artist = Util.getMediaArtist(this, media);<br>
> + String album = Util.getMediaAlbum(this, media);<br>
> + long duration = media.getLength();<br>
> + boolean playing = mLibVLC.isPlaying();<br>
> +<br>
> + Intent broadcast = new Intent("com.android.music.<u></u>metachanged");<br>
> + broadcast.putExtra("track", track);<br>
> + broadcast.putExtra("artist", artist);<br>
> + broadcast.putExtra("album", album);<br>
> + broadcast.putExtra("duration", duration);<br>
> + broadcast.putExtra("playing", playing);<br>
> +<br>
> + context.sendBroadcast(<u></u>broadcast);<br>
> + }<br>
> +<br>
> private synchronized void loadLastPlaylist() {<br>
> SharedPreferences prefs =<br>
> PreferenceManager.<u></u>getDefaultSharedPreferences(<u></u>this);<br>
> String currentMedia = prefs.getString("current_<u></u>media", "");<br>
> --<br>
> 2.3.5<br>
><br>
><br>
> ______________________________<u></u>_________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/<u></u>listinfo/vlc-devel</a><br>
><br>
______________________________<u></u>_________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/<u></u>listinfo/vlc-devel</a><br>
</blockquote></div></div></div></div>