-
Notifications
You must be signed in to change notification settings - Fork 140
Description
Introduction
As you know on Android, you can send intents to open other applications (including Settings), deep linking and more. For example, on Android P, if I was developing the Facebook application, I could give the user the option to open the following screen:
Using this intent:
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName);
intent.putExtra(Settings.EXTRA_CHANNEL_ID, notificationChannelId);
startActivity(intent);
There is a library out there but only with specific cases https://github.com/lucasferreira/react-native-send-intent/blob/master/android/src/main/java/com/burnweb/rnsendintent/RNSendIntentModule.java (there are too many cases). And to be honest, I think this is quite important (core feature of the platform) to depend on an external library.
The Core of It
I think we should provide a standard way of opening intents in the core. Maybe it makes sense to have it in the Linking
module?
Discussion points
- Should we add it as part of React Native? I think yes.
- Should be part of
Linking
module? I think yes but I don't have much knowledge of the core to be 100% sure. - This change is Android only
P.S. I am working in a PR that should land soon so you can see it in action + code.