React Native SDK Reference

Class CredoAppService

Represents the bridge between React native and native SDK

CredoAppService

Method execute()

Static method.

๐Ÿ“˜

Collects data from the phone and returns locally.

CredoAppService.execute(value: bool)

Parameters:

NameDescriptionType
valueOptional 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 though false value.

Returns:

TypeDescription
Promise<String>Returns JSON dataset in compressed string format if collect action is succeeded or error with code and message

Error Codes

Status CodeReasonDescription
30Duplicated areas errorThe extracting areas are duplicated.
90Unknown errorAn unexpected error occurred.