react-native-macos/Libraries
Estevão Lucas fa426cf05f - Add openSettings method to Linking module (#23965)
Summary:
This will create a cross-platform and safe way to programmatically open the app's settings into the iOS /Android Settings app.

Right now it's possible to open the app's settings, but _**only for iOS**_ via `Linking.openURL("app-settings:")`

To do the same for Android, you need to either create NodeModule or install a dependency such as [react-native-open-settings](https://github.com/lunarmayor/react-native-open-settings).

Why this new method is useful: since Android 6, app permissions work similar to iOS. It's granular and it's requested in the app runtime.

https://developer.android.com/guide/topics/permissions/overview#runtime_requests_android_60_and_higher

> If the device is running Android 6.0 (API level 23) or higher, and the app's targetSdkVersion is 23 or higher, the user isn't notified of any app permissions at install time. Your app must ask the user to grant the dangerous permissions at runtime. When your app requests permission, the user sees a system dialog telling the user which permission group your app is trying to access. The dialog includes a Deny and Allow button.

Thus, if the user checks the **"Never ask again box"** and taps **"Deny"**, for some specific permission, the only way to change the permission is going to the Android Setting app.

And that's where this new method becomes useful. It'll allow our apps to programmatically send the the user to  settings app.

Also, `openSettings()` doesn't receive a parameter to redirect to specific subsections of the Settings app because there's no public API to do it on iOS ([there's a way to have, via private API, but it causes the app to get rejected.](https://github.com/mauron85/cordova-plugin-background-geolocation/issues/394))

Create `Linking.openSettings()` for iOS and Android;

[General] [add ] - Add openSetting method to Linking module
Pull Request resolved: https://github.com/facebook/react-native/pull/23965

Differential Revision: D14502910

Pulled By: cpojer

fbshipit-source-id: d27d62282b9df499845c78d983d3b6936c36ea39
2019-03-18 08:06:12 -07:00
..
ART Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
ActionSheetIOS Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
Alert Properly gate platform specific code in Alert 2019-02-13 04:24:12 -08:00
Animated Upgrade fbjs-scripts to 1.1.0 2019-02-28 09:46:05 -08:00
AppState Remove android initialAppState fallback check (#23487) 2019-02-17 15:32:13 -08:00
BatchedBridge Use `invariant` instead of `fbjs/lib/invariant` 2018-12-03 00:07:02 -08:00
Blob Bump Prettier to 1.16.4 2019-03-14 07:00:27 -07:00
BugReporting Upgrade to Flow v0.88.0 2018-12-11 20:01:00 -08:00
CameraRoll RCTCameraRollManager: fix "all" photos filter 2019-02-26 11:29:56 -08:00
Color Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
Components - add more iOS flags into AccessibilityInfo (#23913) 2019-03-15 11:34:20 -07:00
Core Use GlobalPerformanceLogger explicitly during bundle load 2019-03-14 06:49:46 -07:00
DeprecatedPropTypes Use `invariant` instead of `fbjs/lib/invariant` 2018-12-03 00:07:02 -08:00
EventEmitter Use `invariant` instead of `fbjs/lib/invariant` 2018-12-03 00:07:02 -08:00
Experimental Flow strict ScrollView; get rid of InternalScrollViewType (#22301) 2019-03-08 11:39:41 -08:00
Geolocation Add tests for Geolocation module (#23987) 2019-03-18 07:40:56 -07:00
Image Bump Prettier to 1.16.4 2019-03-14 07:00:27 -07:00
Inspector Resolve relative size rendering error in inspector (#23804) 2019-03-13 02:07:02 -07:00
Interaction Bump Prettier to 1.16.4 2019-03-14 07:00:27 -07:00
JSInspector Remove explicit requires of Map and Set 2018-10-19 10:57:24 -07:00
LayoutAnimation Globally disable LayoutAnimation during Snapshot Tests 2019-01-24 15:24:59 -08:00
Linking - Add openSettings method to Linking module (#23965) 2019-03-18 08:06:12 -07:00
LinkingIOS - Add openSettings method to Linking module (#23965) 2019-03-18 08:06:12 -07:00
Lists Bump Prettier to 1.16.4 2019-03-14 07:00:27 -07:00
Modal RCTModalHostView (#23030) 2019-01-17 02:41:59 -08:00
NativeAnimation Fix native implementation of `Animated.modulo` (#23973) 2019-03-18 07:40:56 -07:00
Network Make FBReactModule, RCTNetworking, and RCTImageLoader use new Plugin API 2019-03-12 21:07:36 -07:00
Performance Use `invariant` instead of `fbjs/lib/invariant` 2018-12-03 00:07:02 -08:00
PermissionsAndroid feat(permissions-android): export Rationale type and add missing properties according to docs (#23510) 2019-02-18 07:04:58 -08:00
PushNotificationIOS Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
ReactNative Move RCTTest & takeSnapshot to RNTester (#23721) 2019-03-14 11:24:21 -07:00
Renderer React sync for revisions f24a0da...8e25ed2 2019-02-27 07:57:19 -08:00
Sample RN: Missing Copyright Headers 2018-10-31 01:37:26 -07:00
Settings Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
Share Use `invariant` instead of `fbjs/lib/invariant` 2018-12-03 00:07:02 -08:00
Storage Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
StyleSheet Remove LayoutStyle, ShadowStyle, TransformStyle in favor of just ViewStyleProp 2019-01-08 18:49:37 -08:00
SurfaceBackedComponent RCTSurface: Calling `start` is now required to start the Surface 2018-12-18 12:57:38 -08:00
SurfaceHostingComponent Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
Text Fix semi-transparent backgrounds on Text components (#23872) 2019-03-14 10:23:19 -07:00
TurboModule Only call __turboModuleProxy when it exists 2019-02-04 11:08:10 -08:00
Types Flow strict ScrollView; get rid of InternalScrollViewType (#22301) 2019-03-08 11:39:41 -08:00
Utilities Add tests for utilities (#23989) 2019-03-18 07:40:55 -07:00
Vibration Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
WebSocket Bump Prettier to 1.16.4 2019-03-14 07:00:27 -07:00
Wrapper Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
YellowBox Bump Prettier to 1.16.4 2019-03-14 07:00:27 -07:00
fishhook Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
polyfills Added groupCollapsed polyfill (#21457) 2019-01-22 07:05:22 -08:00
react-native Add deprecation warning for status-bar (#23898) 2019-03-15 03:54:44 -07:00
vendor Deploy 0.94 to xplat 2019-03-06 14:57:30 -08:00
.npmignore npmignore: ignore tests and fixtures 2018-02-27 08:42:14 -08:00
Promise.js Deploy 0.94 to xplat 2019-03-06 14:57:30 -08:00
UTFSequence.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
promiseRejectionIsError.js Deploy 0.94 to xplat 2019-03-06 14:57:30 -08:00