UNPKG

7.61 kBJavaScriptView Raw
1import { NativeModules, Platform } from 'react-native';
2/**
3 * Constants are from the source code of Settings:
4 * https://developer.android.com/reference/android/provider/Settings.html
5 */
6export const ACTION_ACCESSIBILITY_SETTINGS = 'android.settings.ACCESSIBILITY_SETTINGS';
7export const ACTION_APP_NOTIFICATION_REDACTION = 'android.settings.ACTION_APP_NOTIFICATION_REDACTION';
8export const ACTION_CONDITION_PROVIDER_SETTINGS = 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS';
9export const ACTION_NOTIFICATION_LISTENER_SETTINGS = 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS';
10export const ACTION_PRINT_SETTINGS = 'android.settings.ACTION_PRINT_SETTINGS';
11export const ACTION_ADD_ACCOUNT_SETTINGS = 'android.settings.ADD_ACCOUNT_SETTINGS';
12export const ACTION_AIRPLANE_MODE_SETTINGS = 'android.settings.AIRPLANE_MODE_SETTINGS';
13export const ACTION_APN_SETTINGS = 'android.settings.APN_SETTINGS';
14export const ACTION_APPLICATION_DETAILS_SETTINGS = 'android.settings.APPLICATION_DETAILS_SETTINGS';
15export const ACTION_APPLICATION_DEVELOPMENT_SETTINGS = 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS';
16export const ACTION_APPLICATION_SETTINGS = 'android.settings.APPLICATION_SETTINGS';
17export const ACTION_APP_NOTIFICATION_SETTINGS = 'android.settings.APP_NOTIFICATION_SETTINGS';
18export const ACTION_APP_OPS_SETTINGS = 'android.settings.APP_OPS_SETTINGS';
19export const ACTION_BATTERY_SAVER_SETTINGS = 'android.settings.BATTERY_SAVER_SETTINGS';
20export const ACTION_BLUETOOTH_SETTINGS = 'android.settings.BLUETOOTH_SETTINGS';
21export const ACTION_CAPTIONING_SETTINGS = 'android.settings.CAPTIONING_SETTINGS';
22export const ACTION_CAST_SETTINGS = 'android.settings.CAST_SETTINGS';
23export const ACTION_DATA_ROAMING_SETTINGS = 'android.settings.DATA_ROAMING_SETTINGS';
24export const ACTION_DATE_SETTINGS = 'android.settings.DATE_SETTINGS';
25export const ACTION_DEVICE_INFO_SETTINGS = 'android.settings.DEVICE_INFO_SETTINGS';
26export const ACTION_DEVICE_NAME = 'android.settings.DEVICE_NAME';
27export const ACTION_DISPLAY_SETTINGS = 'android.settings.DISPLAY_SETTINGS';
28export const ACTION_DREAM_SETTINGS = 'android.settings.DREAM_SETTINGS';
29export const ACTION_HARD_KEYBOARD_SETTINGS = 'android.settings.HARD_KEYBOARD_SETTINGS';
30export const ACTION_HOME_SETTINGS = 'android.settings.HOME_SETTINGS';
31export const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS';
32export const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS = 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS';
33export const ACTION_INPUT_METHOD_SETTINGS = 'android.settings.INPUT_METHOD_SETTINGS';
34export const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS';
35export const ACTION_INTERNAL_STORAGE_SETTINGS = 'android.settings.INTERNAL_STORAGE_SETTINGS';
36export const ACTION_LOCALE_SETTINGS = 'android.settings.LOCALE_SETTINGS';
37export const ACTION_LOCATION_SOURCE_SETTINGS = 'android.settings.LOCATION_SOURCE_SETTINGS';
38export const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS';
39export const ACTION_MANAGE_APPLICATIONS_SETTINGS = 'android.settings.MANAGE_APPLICATIONS_SETTINGS';
40export const ACTION_MANAGE_DEFAULT_APPS_SETTINGS = 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS';
41export const ACTION_MEMORY_CARD_SETTINGS = 'android.settings.MEMORY_CARD_SETTINGS';
42export const ACTION_MONITORING_CERT_INFO = 'android.settings.MONITORING_CERT_INFO';
43export const ACTION_NETWORK_OPERATOR_SETTINGS = 'android.settings.NETWORK_OPERATOR_SETTINGS';
44export const ACTION_NFCSHARING_SETTINGS = 'android.settings.NFCSHARING_SETTINGS';
45export const ACTION_NFC_PAYMENT_SETTINGS = 'android.settings.NFC_PAYMENT_SETTINGS';
46export const ACTION_NFC_SETTINGS = 'android.settings.NFC_SETTINGS';
47export const ACTION_NIGHT_DISPLAY_SETTINGS = 'android.settings.NIGHT_DISPLAY_SETTINGS';
48export const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS = 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS';
49export const ACTION_NOTIFICATION_SETTINGS = 'android.settings.NOTIFICATION_SETTINGS';
50export const ACTION_PAIRING_SETTINGS = 'android.settings.PAIRING_SETTINGS';
51export const ACTION_PRIVACY_SETTINGS = 'android.settings.PRIVACY_SETTINGS';
52export const ACTION_QUICK_LAUNCH_SETTINGS = 'android.settings.QUICK_LAUNCH_SETTINGS';
53export const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS';
54export const ACTION_SECURITY_SETTINGS = 'android.settings.SECURITY_SETTINGS';
55export const ACTION_SETTINGS = 'android.settings.SETTINGS';
56export const ACTION_SHOW_ADMIN_SUPPORT_DETAILS = 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS';
57export const ACTION_SHOW_INPUT_METHOD_PICKER = 'android.settings.SHOW_INPUT_METHOD_PICKER';
58export const ACTION_SHOW_REGULATORY_INFO = 'android.settings.SHOW_REGULATORY_INFO';
59export const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG = 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG';
60export const ACTION_SOUND_SETTINGS = 'android.settings.SOUND_SETTINGS';
61export const ACTION_STORAGE_MANAGER_SETTINGS = 'android.settings.STORAGE_MANAGER_SETTINGS';
62export const ACTION_SYNC_SETTINGS = 'android.settings.SYNC_SETTINGS';
63export const ACTION_SYSTEM_UPDATE_SETTINGS = 'android.settings.SYSTEM_UPDATE_SETTINGS';
64export const ACTION_TETHER_PROVISIONING_UI = 'android.settings.TETHER_PROVISIONING_UI';
65export const ACTION_TRUSTED_CREDENTIALS_USER = 'android.settings.TRUSTED_CREDENTIALS_USER';
66export const ACTION_USAGE_ACCESS_SETTINGS = 'android.settings.USAGE_ACCESS_SETTINGS';
67export const ACTION_USER_DICTIONARY_INSERT = 'android.settings.USER_DICTIONARY_INSERT';
68export const ACTION_USER_DICTIONARY_SETTINGS = 'android.settings.USER_DICTIONARY_SETTINGS';
69export const ACTION_USER_SETTINGS = 'android.settings.USER_SETTINGS';
70export const ACTION_VOICE_CONTROL_AIRPLANE_MODE = 'android.settings.VOICE_CONTROL_AIRPLANE_MODE';
71export const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE = 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE';
72export const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE = 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE';
73export const ACTION_VOICE_INPUT_SETTINGS = 'android.settings.VOICE_INPUT_SETTINGS';
74export const ACTION_VPN_SETTINGS = 'android.settings.VPN_SETTINGS';
75export const ACTION_VR_LISTENER_SETTINGS = 'android.settings.VR_LISTENER_SETTINGS';
76export const ACTION_WEBVIEW_SETTINGS = 'android.settings.WEBVIEW_SETTINGS';
77export const ACTION_WIFI_IP_SETTINGS = 'android.settings.WIFI_IP_SETTINGS';
78export const ACTION_WIFI_SETTINGS = 'android.settings.WIFI_SETTINGS';
79export const ACTION_WIRELESS_SETTINGS = 'android.settings.WIRELESS_SETTINGS';
80export const ACTION_ZEN_MODE_AUTOMATION_SETTINGS = 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS';
81export const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS = 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS';
82export const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS = 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS';
83export const ACTION_ZEN_MODE_PRIORITY_SETTINGS = 'android.settings.ZEN_MODE_PRIORITY_SETTINGS';
84export const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS = 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS';
85export const ACTION_ZEN_MODE_SETTINGS = 'android.settings.ZEN_MODE_SETTINGS';
86export function startActivityAsync(activity,
87// TODO: Make this type more precise
88data = null, uri = null) {
89 if (Platform.OS === 'android') {
90 return NativeModules.ExponentIntentLauncher.startActivity(activity, data, uri);
91 }
92 else {
93 return Promise.reject(new Error('Unsupported platform'));
94 }
95}
96//# sourceMappingURL=IntentLauncherAndroid.js.map
\No newline at end of file