Create individual stream notifications for convenience on Android 7.0 and later.
This commit is contained in:
parent
8cfba4003d
commit
7742c40ac0
3 changed files with 81 additions and 29 deletions
|
|
@ -563,11 +563,8 @@ public final class NavigationHelper {
|
|||
@Nullable final PlayQueue playQueue,
|
||||
final boolean switchingPlayers) {
|
||||
|
||||
final Intent intent = getOpenIntent(context, url, serviceId,
|
||||
StreamingService.LinkType.STREAM);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.putExtra(Constants.KEY_TITLE, title);
|
||||
intent.putExtra(VideoDetailFragment.KEY_SWITCHING_PLAYERS, switchingPlayers);
|
||||
final Intent intent = getStreamIntent(context, serviceId, url, title)
|
||||
.putExtra(VideoDetailFragment.KEY_SWITCHING_PLAYERS, switchingPlayers);
|
||||
|
||||
if (playQueue != null) {
|
||||
final String cacheKey = SerializedCache.getInstance().put(playQueue, PlayQueue.class);
|
||||
|
|
@ -680,6 +677,15 @@ public final class NavigationHelper {
|
|||
return getOpenIntent(context, url, serviceId, StreamingService.LinkType.CHANNEL);
|
||||
}
|
||||
|
||||
public static Intent getStreamIntent(final Context context,
|
||||
final int serviceId,
|
||||
final String url,
|
||||
@Nullable final String title) {
|
||||
return getOpenIntent(context, url, serviceId, StreamingService.LinkType.STREAM)
|
||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.putExtra(Constants.KEY_TITLE, title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish this <code>Activity</code> as well as all <code>Activities</code> running below it
|
||||
* and then start <code>MainActivity</code>.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue