react-native-track-player icon indicating copy to clipboard operation
react-native-track-player copied to clipboard

Color & icons being set in updateOptions() not working

Open thinhtt264 opened this issue 2 years ago • 2 comments

I even edited directly into the red native lib but it still doesn't work, any body can use it?

    val accentColor = Color.RED
    val smallIcon = BundleUtils.getIconOrNull(this, options, "icon")
    val pendingIntent = PendingIntent.getActivity(this, 0, openAppIntent, getPendingIntentFlags())
    val notificationConfig = NotificationConfig(buttonsList, accentColor, smallIcon, pendingIntent)

    Log.d("test", notificationConfig.toString())

    player.notificationManager.createNotification(notificationConfig)

thinhtt264 avatar Nov 30 '23 08:11 thinhtt264

Icon also not working

TrackPlayer.updateOptions({

    capabilities: [
      Capability.Play,
      Capability.Pause,
      Capability.SkipToNext,
      Capability.SkipToPrevious,
      Capability.Stop,
    ],

    compactCapabilities: [Capability.Play, Capability.Pause],
    notificationCapabilities: [
      Capability.Play,
      Capability.Pause,
      Capability.SkipToNext,
      Capability.SkipToPrevious,
      Capability.Stop,
    ],

    android: {
      appKilledPlaybackBehavior:
        AppKilledPlaybackBehavior.StopPlaybackAndRemoveNotification,
    },

    icon: require('src/assests/images/Spotify_Logo.png'),
    nextIcon: require('src/assests/images/Spotify_Logo.png'),
    color: 0xffff0000,
  });

thinhtt264 avatar Nov 30 '23 09:11 thinhtt264

icons are known to not work unless in prod. colors i have no idea

lovegaoshi avatar Nov 30 '23 17:11 lovegaoshi

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Feb 29 '24 01:02 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Mar 08 '24 01:03 github-actions[bot]