Skip to content

Commit

Permalink
Merge pull request #212 from OdyseeTeam/media-controls-notification-n…
Browse files Browse the repository at this point in the history
…o-disambiguation

Fix media controls notification showing disambiguation drawer
  • Loading branch information
akinwale committed May 23, 2022
2 parents 4e301b2 + 3103b43 commit 26767be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/com/odysee/app/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ public void handleOnBackPressed() {
purchasedChecker = new PurchasedChecker(this, MainActivity.this);
purchasedChecker.createBillingClientAndEstablishConnection();

playerNotificationManager = new PlayerNotificationManager.Builder(
this, PLAYBACK_NOTIFICATION_ID, PLAYER_NOTIFICATION_CHANNEL_ID, new PlayerNotificationDescriptionAdapter()).build();
playerNotificationManager = new PlayerNotificationManager.Builder(this, PLAYBACK_NOTIFICATION_ID, PLAYER_NOTIFICATION_CHANNEL_ID)
.setMediaDescriptionAdapter(new PlayerNotificationDescriptionAdapter()).build();

// TODO: Check Google Play Services availability
// castContext = CastContext.getSharedInstance(this);
Expand Down Expand Up @@ -2696,7 +2696,9 @@ public CharSequence getCurrentContentTitle(Player player) {
@Override
public PendingIntent createCurrentContentIntent(Player player) {
if (nowPlayingClaimUrl != null) {
Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(nowPlayingClaimUrl));
Intent launchIntent = new Intent(MainActivity.this, MainActivity.class);
launchIntent.setAction(Intent.ACTION_VIEW);
launchIntent.setData(Uri.parse(nowPlayingClaimUrl));
launchIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
return PendingIntent.getActivity(MainActivity.this, 0, launchIntent, 0);
}
Expand Down

0 comments on commit 26767be

Please sign in to comment.