React Native SDK Reference
Class CredoAppService
CredoAppService
Represents the bridge between React native and native SDK
CredoAppService
Method execute()
execute()
Static method.
Collects data from the phone and returns locally.
CredoAppService.execute(value: bool)
Parameters:
Name | Description | Type |
---|---|---|
value | Optional param iOS If true then SDK requests permissions automatically otherwise SDK omits requesting permissions.The default value is true .Android The true value allows data collection even if not all permissions are granted. The false value restricts data collection until all permissions (including normal permissions) are granted.The default value is true . | bool |
Note for iOS
The Music permission (
NSAppleMusicUsageDescription
- CredoAppMusic module) is requested automatically once SDK requests the data even thoughfalse
value.
Returns:
Type | Description |
---|---|
Promise<String> | Returns JSON dataset in compressed string format if collect action is succeeded or error with code and message |
Error Codes
Status Code | Reason | Description |
---|---|---|
30 | Duplicated areas error | The extracting areas are duplicated. |
90 | Unknown error | An unexpected error occurred. |
Updated about 2 months ago