React-native-track-player: [ANROID] A new instance is launched every time the notification is tapped.

Created on 30 May 2019  路  2Comments  路  Source: react-native-kit/react-native-track-player

Configuration

React Native Environment Info:
System:
OS: Windows 8.1
CPU: (4) x64 Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz
Memory: 982.21 MB / 3.94 GB
Binaries:
Yarn: 1.16.0 - C:Program Files (x86)Yarnbinyarn.CMD
npm: 6.9.0 - C:Program Filesnodejsnpm.CMD
Watchman: 4.9.4 - C:watchmanwatchman.EXE

"react-native-track-player": "^1.1.4"

Issue

This code that should prevent a new instance from being launched does not work,

Intent openApp = context.getPackageManager().getLaunchIntentForPackage(packageName); // Prevent the app from launching a new instance openApp.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);

Android

Most helpful comment

My bad, had left out the singleTask option in the manifest file.

All 2 comments

My bad, had left out the singleTask option in the manifest file.

Is it working now? Can I close this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mnlbox picture mnlbox  路  4Comments

tarahiw picture tarahiw  路  3Comments

moduval picture moduval  路  4Comments

krunalbad picture krunalbad  路  3Comments

toooldmohammad picture toooldmohammad  路  3Comments