expo-intent-launcher 12.1.0-canary-20250131-5c4e588 → 12.1.0-canary-20250219-4a5dade
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
5
|
-
apply from: expoModulesCorePlugin
|
|
6
|
-
applyKotlinExpoModulesCorePlugin()
|
|
7
|
-
useCoreDependencies()
|
|
8
|
-
useDefaultAndroidSdkVersions()
|
|
9
|
-
useExpoPublishing()
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
apply plugin: 'expo-module-gradle-plugin'
|
|
14
|
-
} catch (e) {
|
|
15
|
-
if (!e instanceof UnknownPluginException) {
|
|
16
|
-
throw e
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
useLegacyExpoModulesCorePlugin()
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.library'
|
|
3
|
+
id 'expo-module-gradle-plugin'
|
|
20
4
|
}
|
|
21
5
|
|
|
22
6
|
group = 'host.exp.exponent'
|
|
@@ -90,7 +90,7 @@ export interface IntentLauncherParams {
|
|
|
90
90
|
*/
|
|
91
91
|
type?: string;
|
|
92
92
|
/**
|
|
93
|
-
* Category provides more details about the action the intent performs. See [Intent.addCategory](https://developer.android.com/reference/android/content/Intent
|
|
93
|
+
* Category provides more details about the action the intent performs. See [`Intent.addCategory`](https://developer.android.com/reference/android/content/Intent#addCategory(java.lang.String)).
|
|
94
94
|
*/
|
|
95
95
|
category?: string;
|
|
96
96
|
/**
|
|
@@ -105,7 +105,7 @@ export interface IntentLauncherParams {
|
|
|
105
105
|
*/
|
|
106
106
|
data?: string;
|
|
107
107
|
/**
|
|
108
|
-
* Bitmask of flags to be used. See [Intent.setFlags](
|
|
108
|
+
* Bitmask of flags to be used. See [`Intent.setFlags`](https://developer.android.com/reference/android/content/Intent#setFlags(int)) for more details.
|
|
109
109
|
*/
|
|
110
110
|
flags?: number;
|
|
111
111
|
/**
|
|
@@ -138,7 +138,7 @@ export declare enum ResultCode {
|
|
|
138
138
|
*/
|
|
139
139
|
Success = -1,
|
|
140
140
|
/**
|
|
141
|
-
* Means that the activity was canceled,
|
|
141
|
+
* Means that the activity was canceled, for example, by tapping on the back button.
|
|
142
142
|
*/
|
|
143
143
|
Canceled = 0,
|
|
144
144
|
/**
|
|
@@ -149,16 +149,16 @@ export declare enum ResultCode {
|
|
|
149
149
|
/**
|
|
150
150
|
* Starts the specified activity. The method will return a promise which resolves when the user
|
|
151
151
|
* returns to the app.
|
|
152
|
-
* @param activityAction The action to be performed,
|
|
152
|
+
* @param activityAction The action to be performed, for example, `IntentLauncher.ActivityAction.WIRELESS_SETTINGS`.
|
|
153
153
|
* There are a few pre-defined constants you can use for this parameter.
|
|
154
|
-
* You can find them at [expo-intent-launcher/src/IntentLauncher.ts](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).
|
|
154
|
+
* You can find them at [`expo-intent-launcher/src/IntentLauncher.ts`](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).
|
|
155
155
|
* @param params An object of intent parameters.
|
|
156
156
|
* @return A promise which fulfils with `IntentLauncherResult` object.
|
|
157
157
|
*/
|
|
158
158
|
export declare function startActivityAsync(activityAction: ActivityAction | string, params?: IntentLauncherParams): Promise<IntentLauncherResult>;
|
|
159
159
|
/**
|
|
160
160
|
* Opens an application by its package name.
|
|
161
|
-
* @param packageName
|
|
161
|
+
* @param packageName For example: `com.google.android.gm` for Gmail.
|
|
162
162
|
*/
|
|
163
163
|
export declare function openApplication(packageName: string): any;
|
|
164
164
|
/**
|
|
@@ -166,7 +166,7 @@ export declare function openApplication(packageName: string): any;
|
|
|
166
166
|
* The returned string is prefixed with `data:image/png;base64,` and can be used directly in an `expo-image` `<Image>`
|
|
167
167
|
* component's `source` prop.
|
|
168
168
|
*
|
|
169
|
-
* @param packageName The package name of the target application,
|
|
169
|
+
* @param packageName The package name of the target application. For example, `com.google.android.gm` for Gmail.
|
|
170
170
|
* @return A promise that resolves to the base64-encoded PNG icon of the specified application, or an empty string if the icon could not be retrieved.
|
|
171
171
|
*/
|
|
172
172
|
export declare function getApplicationIconAsync(packageName: string): Promise<string>;
|
package/build/IntentLauncher.js
CHANGED
|
@@ -95,7 +95,7 @@ export var ResultCode;
|
|
|
95
95
|
*/
|
|
96
96
|
ResultCode[ResultCode["Success"] = -1] = "Success";
|
|
97
97
|
/**
|
|
98
|
-
* Means that the activity was canceled,
|
|
98
|
+
* Means that the activity was canceled, for example, by tapping on the back button.
|
|
99
99
|
*/
|
|
100
100
|
ResultCode[ResultCode["Canceled"] = 0] = "Canceled";
|
|
101
101
|
/**
|
|
@@ -107,9 +107,9 @@ export var ResultCode;
|
|
|
107
107
|
/**
|
|
108
108
|
* Starts the specified activity. The method will return a promise which resolves when the user
|
|
109
109
|
* returns to the app.
|
|
110
|
-
* @param activityAction The action to be performed,
|
|
110
|
+
* @param activityAction The action to be performed, for example, `IntentLauncher.ActivityAction.WIRELESS_SETTINGS`.
|
|
111
111
|
* There are a few pre-defined constants you can use for this parameter.
|
|
112
|
-
* You can find them at [expo-intent-launcher/src/IntentLauncher.ts](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).
|
|
112
|
+
* You can find them at [`expo-intent-launcher/src/IntentLauncher.ts`](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).
|
|
113
113
|
* @param params An object of intent parameters.
|
|
114
114
|
* @return A promise which fulfils with `IntentLauncherResult` object.
|
|
115
115
|
*/
|
|
@@ -124,7 +124,7 @@ export async function startActivityAsync(activityAction, params = {}) {
|
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* Opens an application by its package name.
|
|
127
|
-
* @param packageName
|
|
127
|
+
* @param packageName For example: `com.google.android.gm` for Gmail.
|
|
128
128
|
*/
|
|
129
129
|
export function openApplication(packageName) {
|
|
130
130
|
if (!ExpoIntentLauncher.openApplication) {
|
|
@@ -137,7 +137,7 @@ export function openApplication(packageName) {
|
|
|
137
137
|
* The returned string is prefixed with `data:image/png;base64,` and can be used directly in an `expo-image` `<Image>`
|
|
138
138
|
* component's `source` prop.
|
|
139
139
|
*
|
|
140
|
-
* @param packageName The package name of the target application,
|
|
140
|
+
* @param packageName The package name of the target application. For example, `com.google.android.gm` for Gmail.
|
|
141
141
|
* @return A promise that resolves to the base64-encoded PNG icon of the specified application, or an empty string if the icon could not be retrieved.
|
|
142
142
|
*/
|
|
143
143
|
export async function getApplicationIconAsync(packageName) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntentLauncher.js","sourceRoot":"","sources":["../src/IntentLauncher.ts"],"names":[],"mappings":"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","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport ExpoIntentLauncher from './ExpoIntentLauncher';\n\n// @needsAudit\n/**\n * Constants are from the source code of [Settings provider](https://developer.android.com/reference/android/provider/Settings).\n */\nexport enum ActivityAction {\n ACCESSIBILITY_SETTINGS = 'android.settings.ACCESSIBILITY_SETTINGS',\n ADD_ACCOUNT_SETTINGS = 'android.settings.ADD_ACCOUNT_SETTINGS',\n AIRPLANE_MODE_SETTINGS = 'android.settings.AIRPLANE_MODE_SETTINGS',\n APN_SETTINGS = 'android.settings.APN_SETTINGS',\n APP_NOTIFICATION_REDACTION = 'android.settings.ACTION_APP_NOTIFICATION_REDACTION',\n APP_NOTIFICATION_SETTINGS = 'android.settings.APP_NOTIFICATION_SETTINGS',\n APP_OPS_SETTINGS = 'android.settings.APP_OPS_SETTINGS',\n APPLICATION_DETAILS_SETTINGS = 'android.settings.APPLICATION_DETAILS_SETTINGS',\n APPLICATION_DEVELOPMENT_SETTINGS = 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS',\n APPLICATION_SETTINGS = 'android.settings.APPLICATION_SETTINGS',\n BATTERY_SAVER_SETTINGS = 'android.settings.BATTERY_SAVER_SETTINGS',\n BLUETOOTH_SETTINGS = 'android.settings.BLUETOOTH_SETTINGS',\n CAPTIONING_SETTINGS = 'android.settings.CAPTIONING_SETTINGS',\n CAST_SETTINGS = 'android.settings.CAST_SETTINGS',\n CONDITION_PROVIDER_SETTINGS = 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS',\n DATA_ROAMING_SETTINGS = 'android.settings.DATA_ROAMING_SETTINGS',\n DATE_SETTINGS = 'android.settings.DATE_SETTINGS',\n DEVICE_INFO_SETTINGS = 'android.settings.DEVICE_INFO_SETTINGS',\n DEVICE_NAME = 'android.settings.DEVICE_NAME',\n DISPLAY_SETTINGS = 'android.settings.DISPLAY_SETTINGS',\n DREAM_SETTINGS = 'android.settings.DREAM_SETTINGS',\n HARD_KEYBOARD_SETTINGS = 'android.settings.HARD_KEYBOARD_SETTINGS',\n HOME_SETTINGS = 'android.settings.HOME_SETTINGS',\n IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS',\n IGNORE_BATTERY_OPTIMIZATION_SETTINGS = 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS',\n INPUT_METHOD_SETTINGS = 'android.settings.INPUT_METHOD_SETTINGS',\n INPUT_METHOD_SUBTYPE_SETTINGS = 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS',\n INTERNAL_STORAGE_SETTINGS = 'android.settings.INTERNAL_STORAGE_SETTINGS',\n LOCALE_SETTINGS = 'android.settings.LOCALE_SETTINGS',\n LOCATION_SOURCE_SETTINGS = 'android.settings.LOCATION_SOURCE_SETTINGS',\n MANAGE_ALL_APPLICATIONS_SETTINGS = 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS',\n MANAGE_APPLICATIONS_SETTINGS = 'android.settings.MANAGE_APPLICATIONS_SETTINGS',\n MANAGE_DEFAULT_APPS_SETTINGS = 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS',\n MEMORY_CARD_SETTINGS = 'android.settings.MEMORY_CARD_SETTINGS',\n MONITORING_CERT_INFO = 'android.settings.MONITORING_CERT_INFO',\n NETWORK_OPERATOR_SETTINGS = 'android.settings.NETWORK_OPERATOR_SETTINGS',\n NFC_PAYMENT_SETTINGS = 'android.settings.NFC_PAYMENT_SETTINGS',\n NFC_SETTINGS = 'android.settings.NFC_SETTINGS',\n NFCSHARING_SETTINGS = 'android.settings.NFCSHARING_SETTINGS',\n NIGHT_DISPLAY_SETTINGS = 'android.settings.NIGHT_DISPLAY_SETTINGS',\n NOTIFICATION_LISTENER_SETTINGS = 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS',\n NOTIFICATION_POLICY_ACCESS_SETTINGS = 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS',\n NOTIFICATION_SETTINGS = 'android.settings.NOTIFICATION_SETTINGS',\n PAIRING_SETTINGS = 'android.settings.PAIRING_SETTINGS',\n PRINT_SETTINGS = 'android.settings.ACTION_PRINT_SETTINGS',\n PRIVACY_SETTINGS = 'android.settings.PRIVACY_SETTINGS',\n QUICK_LAUNCH_SETTINGS = 'android.settings.QUICK_LAUNCH_SETTINGS',\n REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS',\n SECURITY_SETTINGS = 'android.settings.SECURITY_SETTINGS',\n SETTINGS = 'android.settings.SETTINGS',\n SHOW_ADMIN_SUPPORT_DETAILS = 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS',\n SHOW_INPUT_METHOD_PICKER = 'android.settings.SHOW_INPUT_METHOD_PICKER',\n SHOW_REGULATORY_INFO = 'android.settings.SHOW_REGULATORY_INFO',\n SHOW_REMOTE_BUGREPORT_DIALOG = 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG',\n SOUND_SETTINGS = 'android.settings.SOUND_SETTINGS',\n STORAGE_MANAGER_SETTINGS = 'android.settings.STORAGE_MANAGER_SETTINGS',\n SYNC_SETTINGS = 'android.settings.SYNC_SETTINGS',\n SYSTEM_UPDATE_SETTINGS = 'android.settings.SYSTEM_UPDATE_SETTINGS',\n TETHER_PROVISIONING_UI = 'android.settings.TETHER_PROVISIONING_UI',\n TRUSTED_CREDENTIALS_USER = 'android.settings.TRUSTED_CREDENTIALS_USER',\n USAGE_ACCESS_SETTINGS = 'android.settings.USAGE_ACCESS_SETTINGS',\n USER_DICTIONARY_INSERT = 'android.settings.USER_DICTIONARY_INSERT',\n USER_DICTIONARY_SETTINGS = 'android.settings.USER_DICTIONARY_SETTINGS',\n USER_SETTINGS = 'android.settings.USER_SETTINGS',\n VOICE_CONTROL_AIRPLANE_MODE = 'android.settings.VOICE_CONTROL_AIRPLANE_MODE',\n VOICE_CONTROL_BATTERY_SAVER_MODE = 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE',\n VOICE_CONTROL_DO_NOT_DISTURB_MODE = 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE',\n VOICE_INPUT_SETTINGS = 'android.settings.VOICE_INPUT_SETTINGS',\n VPN_SETTINGS = 'android.settings.VPN_SETTINGS',\n VR_LISTENER_SETTINGS = 'android.settings.VR_LISTENER_SETTINGS',\n WEBVIEW_SETTINGS = 'android.settings.WEBVIEW_SETTINGS',\n WIFI_IP_SETTINGS = 'android.settings.WIFI_IP_SETTINGS',\n WIFI_SETTINGS = 'android.settings.WIFI_SETTINGS',\n WIRELESS_SETTINGS = 'android.settings.WIRELESS_SETTINGS',\n ZEN_MODE_AUTOMATION_SETTINGS = 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS',\n ZEN_MODE_EVENT_RULE_SETTINGS = 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS',\n ZEN_MODE_EXTERNAL_RULE_SETTINGS = 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS',\n ZEN_MODE_PRIORITY_SETTINGS = 'android.settings.ZEN_MODE_PRIORITY_SETTINGS',\n ZEN_MODE_SCHEDULE_RULE_SETTINGS = 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS',\n ZEN_MODE_SETTINGS = 'android.settings.ZEN_MODE_SETTINGS',\n}\n\n// @needsAudit\nexport interface IntentLauncherParams {\n /**\n * A string specifying the MIME type of the data represented by the data parameter. Ignore this\n * argument to allow Android to infer the correct MIME type.\n */\n type?: string;\n /**\n * Category provides more details about the action the intent performs. See [Intent.addCategory](https://developer.android.com/reference/android/content/Intent.html#addCategory(java.lang.String)).\n */\n category?: string;\n /**\n * A map specifying additional key-value pairs which are passed with the intent as `extras`.\n * The keys must include a package prefix, for example the app `com.android.contacts` would use\n * names like `com.android.contacts.ShowAll`.\n */\n extra?: Record<string, any>;\n /**\n * A URI specifying the data that the intent should operate upon. (_Note:_ Android requires the URI\n * scheme to be lowercase, unlike the formal RFC.)\n */\n data?: string;\n /**\n * Bitmask of flags to be used. See [Intent.setFlags](<https://developer.android.com/reference/android/content/Intent.html#setFlags(int)>) for more details.\n */\n flags?: number;\n /**\n * Package name used as an identifier of ComponentName. Set this only if you want to explicitly\n * set the component to handle the intent.\n */\n packageName?: string;\n /**\n * Class name of the ComponentName.\n */\n className?: string;\n}\n\n// @needsAudit\nexport interface IntentLauncherResult {\n /**\n * Result code returned by the activity.\n */\n resultCode: ResultCode;\n /**\n * Optional data URI that can be returned by the activity.\n */\n data?: string;\n /**\n * Optional extras object that can be returned by the activity.\n */\n extra?: object;\n}\n\n// @needsAudit\nexport enum ResultCode {\n /**\n * Indicates that the activity operation succeeded.\n */\n Success = -1,\n /**\n * Means that the activity was canceled, e.g. by tapping on the back button.\n */\n Canceled = 0,\n /**\n * First custom, user-defined value that can be returned by the activity.\n */\n FirstUser = 1,\n}\n\n// @needsAudit\n/**\n * Starts the specified activity. The method will return a promise which resolves when the user\n * returns to the app.\n * @param activityAction The action to be performed, e.g. `IntentLauncher.ActivityAction.WIRELESS_SETTINGS`.\n * There are a few pre-defined constants you can use for this parameter.\n * You can find them at [expo-intent-launcher/src/IntentLauncher.ts](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).\n * @param params An object of intent parameters.\n * @return A promise which fulfils with `IntentLauncherResult` object.\n */\nexport async function startActivityAsync(\n activityAction: ActivityAction | string,\n params: IntentLauncherParams = {}\n): Promise<IntentLauncherResult> {\n if (!ExpoIntentLauncher.startActivity) {\n throw new UnavailabilityError('IntentLauncher', 'startActivityAsync');\n }\n if (!activityAction || typeof activityAction !== 'string') {\n throw new TypeError(`'activityAction' argument must be a non-empty string!`);\n }\n return ExpoIntentLauncher.startActivity(activityAction, params);\n}\n\n/**\n * Opens an application by its package name.\n * @param packageName e.g., `com.google.android.gm` for Gmail.\n */\nexport function openApplication(packageName: string) {\n if (!ExpoIntentLauncher.openApplication) {\n throw new UnavailabilityError('IntentLauncher', 'openApplication');\n }\n return ExpoIntentLauncher.openApplication(packageName);\n}\n\n/**\n * Returns the icon of the specified application as a base64-encoded PNG image string.\n * The returned string is prefixed with `data:image/png;base64,` and can be used directly in an `expo-image` `<Image>`\n * component's `source` prop.\n *\n * @param packageName The package name of the target application, e.g. `com.google.android.gm` for Gmail.\n * @return A promise that resolves to the base64-encoded PNG icon of the specified application, or an empty string if the icon could not be retrieved.\n */\nexport async function getApplicationIconAsync(packageName: string): Promise<string> {\n if (!ExpoIntentLauncher.getApplicationIcon) {\n throw new UnavailabilityError('IntentLauncher', 'getApplicationIconAsync');\n }\n return ExpoIntentLauncher.getApplicationIcon(packageName);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IntentLauncher.js","sourceRoot":"","sources":["../src/IntentLauncher.ts"],"names":[],"mappings":"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","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport ExpoIntentLauncher from './ExpoIntentLauncher';\n\n// @needsAudit\n/**\n * Constants are from the source code of [Settings provider](https://developer.android.com/reference/android/provider/Settings).\n */\nexport enum ActivityAction {\n ACCESSIBILITY_SETTINGS = 'android.settings.ACCESSIBILITY_SETTINGS',\n ADD_ACCOUNT_SETTINGS = 'android.settings.ADD_ACCOUNT_SETTINGS',\n AIRPLANE_MODE_SETTINGS = 'android.settings.AIRPLANE_MODE_SETTINGS',\n APN_SETTINGS = 'android.settings.APN_SETTINGS',\n APP_NOTIFICATION_REDACTION = 'android.settings.ACTION_APP_NOTIFICATION_REDACTION',\n APP_NOTIFICATION_SETTINGS = 'android.settings.APP_NOTIFICATION_SETTINGS',\n APP_OPS_SETTINGS = 'android.settings.APP_OPS_SETTINGS',\n APPLICATION_DETAILS_SETTINGS = 'android.settings.APPLICATION_DETAILS_SETTINGS',\n APPLICATION_DEVELOPMENT_SETTINGS = 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS',\n APPLICATION_SETTINGS = 'android.settings.APPLICATION_SETTINGS',\n BATTERY_SAVER_SETTINGS = 'android.settings.BATTERY_SAVER_SETTINGS',\n BLUETOOTH_SETTINGS = 'android.settings.BLUETOOTH_SETTINGS',\n CAPTIONING_SETTINGS = 'android.settings.CAPTIONING_SETTINGS',\n CAST_SETTINGS = 'android.settings.CAST_SETTINGS',\n CONDITION_PROVIDER_SETTINGS = 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS',\n DATA_ROAMING_SETTINGS = 'android.settings.DATA_ROAMING_SETTINGS',\n DATE_SETTINGS = 'android.settings.DATE_SETTINGS',\n DEVICE_INFO_SETTINGS = 'android.settings.DEVICE_INFO_SETTINGS',\n DEVICE_NAME = 'android.settings.DEVICE_NAME',\n DISPLAY_SETTINGS = 'android.settings.DISPLAY_SETTINGS',\n DREAM_SETTINGS = 'android.settings.DREAM_SETTINGS',\n HARD_KEYBOARD_SETTINGS = 'android.settings.HARD_KEYBOARD_SETTINGS',\n HOME_SETTINGS = 'android.settings.HOME_SETTINGS',\n IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS',\n IGNORE_BATTERY_OPTIMIZATION_SETTINGS = 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS',\n INPUT_METHOD_SETTINGS = 'android.settings.INPUT_METHOD_SETTINGS',\n INPUT_METHOD_SUBTYPE_SETTINGS = 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS',\n INTERNAL_STORAGE_SETTINGS = 'android.settings.INTERNAL_STORAGE_SETTINGS',\n LOCALE_SETTINGS = 'android.settings.LOCALE_SETTINGS',\n LOCATION_SOURCE_SETTINGS = 'android.settings.LOCATION_SOURCE_SETTINGS',\n MANAGE_ALL_APPLICATIONS_SETTINGS = 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS',\n MANAGE_APPLICATIONS_SETTINGS = 'android.settings.MANAGE_APPLICATIONS_SETTINGS',\n MANAGE_DEFAULT_APPS_SETTINGS = 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS',\n MEMORY_CARD_SETTINGS = 'android.settings.MEMORY_CARD_SETTINGS',\n MONITORING_CERT_INFO = 'android.settings.MONITORING_CERT_INFO',\n NETWORK_OPERATOR_SETTINGS = 'android.settings.NETWORK_OPERATOR_SETTINGS',\n NFC_PAYMENT_SETTINGS = 'android.settings.NFC_PAYMENT_SETTINGS',\n NFC_SETTINGS = 'android.settings.NFC_SETTINGS',\n NFCSHARING_SETTINGS = 'android.settings.NFCSHARING_SETTINGS',\n NIGHT_DISPLAY_SETTINGS = 'android.settings.NIGHT_DISPLAY_SETTINGS',\n NOTIFICATION_LISTENER_SETTINGS = 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS',\n NOTIFICATION_POLICY_ACCESS_SETTINGS = 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS',\n NOTIFICATION_SETTINGS = 'android.settings.NOTIFICATION_SETTINGS',\n PAIRING_SETTINGS = 'android.settings.PAIRING_SETTINGS',\n PRINT_SETTINGS = 'android.settings.ACTION_PRINT_SETTINGS',\n PRIVACY_SETTINGS = 'android.settings.PRIVACY_SETTINGS',\n QUICK_LAUNCH_SETTINGS = 'android.settings.QUICK_LAUNCH_SETTINGS',\n REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS',\n SECURITY_SETTINGS = 'android.settings.SECURITY_SETTINGS',\n SETTINGS = 'android.settings.SETTINGS',\n SHOW_ADMIN_SUPPORT_DETAILS = 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS',\n SHOW_INPUT_METHOD_PICKER = 'android.settings.SHOW_INPUT_METHOD_PICKER',\n SHOW_REGULATORY_INFO = 'android.settings.SHOW_REGULATORY_INFO',\n SHOW_REMOTE_BUGREPORT_DIALOG = 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG',\n SOUND_SETTINGS = 'android.settings.SOUND_SETTINGS',\n STORAGE_MANAGER_SETTINGS = 'android.settings.STORAGE_MANAGER_SETTINGS',\n SYNC_SETTINGS = 'android.settings.SYNC_SETTINGS',\n SYSTEM_UPDATE_SETTINGS = 'android.settings.SYSTEM_UPDATE_SETTINGS',\n TETHER_PROVISIONING_UI = 'android.settings.TETHER_PROVISIONING_UI',\n TRUSTED_CREDENTIALS_USER = 'android.settings.TRUSTED_CREDENTIALS_USER',\n USAGE_ACCESS_SETTINGS = 'android.settings.USAGE_ACCESS_SETTINGS',\n USER_DICTIONARY_INSERT = 'android.settings.USER_DICTIONARY_INSERT',\n USER_DICTIONARY_SETTINGS = 'android.settings.USER_DICTIONARY_SETTINGS',\n USER_SETTINGS = 'android.settings.USER_SETTINGS',\n VOICE_CONTROL_AIRPLANE_MODE = 'android.settings.VOICE_CONTROL_AIRPLANE_MODE',\n VOICE_CONTROL_BATTERY_SAVER_MODE = 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE',\n VOICE_CONTROL_DO_NOT_DISTURB_MODE = 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE',\n VOICE_INPUT_SETTINGS = 'android.settings.VOICE_INPUT_SETTINGS',\n VPN_SETTINGS = 'android.settings.VPN_SETTINGS',\n VR_LISTENER_SETTINGS = 'android.settings.VR_LISTENER_SETTINGS',\n WEBVIEW_SETTINGS = 'android.settings.WEBVIEW_SETTINGS',\n WIFI_IP_SETTINGS = 'android.settings.WIFI_IP_SETTINGS',\n WIFI_SETTINGS = 'android.settings.WIFI_SETTINGS',\n WIRELESS_SETTINGS = 'android.settings.WIRELESS_SETTINGS',\n ZEN_MODE_AUTOMATION_SETTINGS = 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS',\n ZEN_MODE_EVENT_RULE_SETTINGS = 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS',\n ZEN_MODE_EXTERNAL_RULE_SETTINGS = 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS',\n ZEN_MODE_PRIORITY_SETTINGS = 'android.settings.ZEN_MODE_PRIORITY_SETTINGS',\n ZEN_MODE_SCHEDULE_RULE_SETTINGS = 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS',\n ZEN_MODE_SETTINGS = 'android.settings.ZEN_MODE_SETTINGS',\n}\n\n// @needsAudit\nexport interface IntentLauncherParams {\n /**\n * A string specifying the MIME type of the data represented by the data parameter. Ignore this\n * argument to allow Android to infer the correct MIME type.\n */\n type?: string;\n /**\n * Category provides more details about the action the intent performs. See [`Intent.addCategory`](https://developer.android.com/reference/android/content/Intent#addCategory(java.lang.String)).\n */\n category?: string;\n /**\n * A map specifying additional key-value pairs which are passed with the intent as `extras`.\n * The keys must include a package prefix, for example the app `com.android.contacts` would use\n * names like `com.android.contacts.ShowAll`.\n */\n extra?: Record<string, any>;\n /**\n * A URI specifying the data that the intent should operate upon. (_Note:_ Android requires the URI\n * scheme to be lowercase, unlike the formal RFC.)\n */\n data?: string;\n /**\n * Bitmask of flags to be used. See [`Intent.setFlags`](https://developer.android.com/reference/android/content/Intent#setFlags(int)) for more details.\n */\n flags?: number;\n /**\n * Package name used as an identifier of ComponentName. Set this only if you want to explicitly\n * set the component to handle the intent.\n */\n packageName?: string;\n /**\n * Class name of the ComponentName.\n */\n className?: string;\n}\n\n// @needsAudit\nexport interface IntentLauncherResult {\n /**\n * Result code returned by the activity.\n */\n resultCode: ResultCode;\n /**\n * Optional data URI that can be returned by the activity.\n */\n data?: string;\n /**\n * Optional extras object that can be returned by the activity.\n */\n extra?: object;\n}\n\n// @needsAudit\nexport enum ResultCode {\n /**\n * Indicates that the activity operation succeeded.\n */\n Success = -1,\n /**\n * Means that the activity was canceled, for example, by tapping on the back button.\n */\n Canceled = 0,\n /**\n * First custom, user-defined value that can be returned by the activity.\n */\n FirstUser = 1,\n}\n\n// @needsAudit\n/**\n * Starts the specified activity. The method will return a promise which resolves when the user\n * returns to the app.\n * @param activityAction The action to be performed, for example, `IntentLauncher.ActivityAction.WIRELESS_SETTINGS`.\n * There are a few pre-defined constants you can use for this parameter.\n * You can find them at [`expo-intent-launcher/src/IntentLauncher.ts`](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).\n * @param params An object of intent parameters.\n * @return A promise which fulfils with `IntentLauncherResult` object.\n */\nexport async function startActivityAsync(\n activityAction: ActivityAction | string,\n params: IntentLauncherParams = {}\n): Promise<IntentLauncherResult> {\n if (!ExpoIntentLauncher.startActivity) {\n throw new UnavailabilityError('IntentLauncher', 'startActivityAsync');\n }\n if (!activityAction || typeof activityAction !== 'string') {\n throw new TypeError(`'activityAction' argument must be a non-empty string!`);\n }\n return ExpoIntentLauncher.startActivity(activityAction, params);\n}\n\n/**\n * Opens an application by its package name.\n * @param packageName For example: `com.google.android.gm` for Gmail.\n */\nexport function openApplication(packageName: string) {\n if (!ExpoIntentLauncher.openApplication) {\n throw new UnavailabilityError('IntentLauncher', 'openApplication');\n }\n return ExpoIntentLauncher.openApplication(packageName);\n}\n\n/**\n * Returns the icon of the specified application as a base64-encoded PNG image string.\n * The returned string is prefixed with `data:image/png;base64,` and can be used directly in an `expo-image` `<Image>`\n * component's `source` prop.\n *\n * @param packageName The package name of the target application. For example, `com.google.android.gm` for Gmail.\n * @return A promise that resolves to the base64-encoded PNG icon of the specified application, or an empty string if the icon could not be retrieved.\n */\nexport async function getApplicationIconAsync(packageName: string): Promise<string> {\n if (!ExpoIntentLauncher.getApplicationIcon) {\n throw new UnavailabilityError('IntentLauncher', 'getApplicationIconAsync');\n }\n return ExpoIntentLauncher.getApplicationIcon(packageName);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-intent-launcher",
|
|
3
|
-
"version": "12.1.0-canary-
|
|
3
|
+
"version": "12.1.0-canary-20250219-4a5dade",
|
|
4
4
|
"description": "Provides a way to launch Android intents, e.g. opening a specific activity.",
|
|
5
5
|
"main": "build/IntentLauncher.js",
|
|
6
6
|
"types": "build/IntentLauncher.d.ts",
|
|
@@ -34,9 +34,10 @@
|
|
|
34
34
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/intent-launcher/",
|
|
35
35
|
"dependencies": {},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"expo-module-scripts": "4.0.
|
|
37
|
+
"expo-module-scripts": "4.0.5-canary-20250219-4a5dade"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"expo": "53.0.0-canary-
|
|
41
|
-
}
|
|
40
|
+
"expo": "53.0.0-canary-20250219-4a5dade"
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "4a5daded61d3d8b9d501059039ac74c09c25675b"
|
|
42
43
|
}
|
package/src/IntentLauncher.ts
CHANGED
|
@@ -97,7 +97,7 @@ export interface IntentLauncherParams {
|
|
|
97
97
|
*/
|
|
98
98
|
type?: string;
|
|
99
99
|
/**
|
|
100
|
-
* Category provides more details about the action the intent performs. See [Intent.addCategory](https://developer.android.com/reference/android/content/Intent
|
|
100
|
+
* Category provides more details about the action the intent performs. See [`Intent.addCategory`](https://developer.android.com/reference/android/content/Intent#addCategory(java.lang.String)).
|
|
101
101
|
*/
|
|
102
102
|
category?: string;
|
|
103
103
|
/**
|
|
@@ -112,7 +112,7 @@ export interface IntentLauncherParams {
|
|
|
112
112
|
*/
|
|
113
113
|
data?: string;
|
|
114
114
|
/**
|
|
115
|
-
* Bitmask of flags to be used. See [Intent.setFlags](
|
|
115
|
+
* Bitmask of flags to be used. See [`Intent.setFlags`](https://developer.android.com/reference/android/content/Intent#setFlags(int)) for more details.
|
|
116
116
|
*/
|
|
117
117
|
flags?: number;
|
|
118
118
|
/**
|
|
@@ -149,7 +149,7 @@ export enum ResultCode {
|
|
|
149
149
|
*/
|
|
150
150
|
Success = -1,
|
|
151
151
|
/**
|
|
152
|
-
* Means that the activity was canceled,
|
|
152
|
+
* Means that the activity was canceled, for example, by tapping on the back button.
|
|
153
153
|
*/
|
|
154
154
|
Canceled = 0,
|
|
155
155
|
/**
|
|
@@ -162,9 +162,9 @@ export enum ResultCode {
|
|
|
162
162
|
/**
|
|
163
163
|
* Starts the specified activity. The method will return a promise which resolves when the user
|
|
164
164
|
* returns to the app.
|
|
165
|
-
* @param activityAction The action to be performed,
|
|
165
|
+
* @param activityAction The action to be performed, for example, `IntentLauncher.ActivityAction.WIRELESS_SETTINGS`.
|
|
166
166
|
* There are a few pre-defined constants you can use for this parameter.
|
|
167
|
-
* You can find them at [expo-intent-launcher/src/IntentLauncher.ts](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).
|
|
167
|
+
* You can find them at [`expo-intent-launcher/src/IntentLauncher.ts`](https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts).
|
|
168
168
|
* @param params An object of intent parameters.
|
|
169
169
|
* @return A promise which fulfils with `IntentLauncherResult` object.
|
|
170
170
|
*/
|
|
@@ -183,7 +183,7 @@ export async function startActivityAsync(
|
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
185
|
* Opens an application by its package name.
|
|
186
|
-
* @param packageName
|
|
186
|
+
* @param packageName For example: `com.google.android.gm` for Gmail.
|
|
187
187
|
*/
|
|
188
188
|
export function openApplication(packageName: string) {
|
|
189
189
|
if (!ExpoIntentLauncher.openApplication) {
|
|
@@ -197,7 +197,7 @@ export function openApplication(packageName: string) {
|
|
|
197
197
|
* The returned string is prefixed with `data:image/png;base64,` and can be used directly in an `expo-image` `<Image>`
|
|
198
198
|
* component's `source` prop.
|
|
199
199
|
*
|
|
200
|
-
* @param packageName The package name of the target application,
|
|
200
|
+
* @param packageName The package name of the target application. For example, `com.google.android.gm` for Gmail.
|
|
201
201
|
* @return A promise that resolves to the base64-encoded PNG icon of the specified application, or an empty string if the icon could not be retrieved.
|
|
202
202
|
*/
|
|
203
203
|
export async function getApplicationIconAsync(packageName: string): Promise<string> {
|