Skip to content

Fix "opened_position" intent extra, to use for index based playlist opening

popy popy requested to merge popy/vlc-android:fix_opened_position into master

This is the "opened_position" part of not merged !1628 (closed). It enables the user to use the "opened_position" extra from an intent, to start an playlist at an given index.

Examples of usage to start index 5:

intent:

 int vlcRequestCode = 42;
 Uri uri = Uri.parse("https://www.domain.com/playlist.m3u8");
 Intent vlcIntent = new Intent(Intent.ACTION_VIEW);
 vlcIntent.setPackage("org.videolan.vlc");
 vlcIntent.setDataAndTypeAndNormalize(uri, "audio/*");
 vlcIntent.putExtra("title", "Test");
 vlcIntent.putExtra("from_start", false);
 vlcIntent.putExtra("opened_position", 5);
 startActivityForResult(vlcIntent, vlcRequestCode);

Merge request reports

Loading