-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from lana/feature-13796-aries
Feature 13796 aries
- Loading branch information
Showing
9 changed files
with
315 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
### AriesSDK.fetchContacts() | ||
|
||
```js readonly | ||
AriesSDK.fetchContacts(); | ||
``` | ||
|
||
Ask the native for the contacts stored on the device. | ||
|
||
Response: | ||
|
||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `contacts` | List<Contact> | List with device contacts. | | ||
|
||
A successful response body will contain the following information: | ||
```js readonly | ||
{ | ||
response: { | ||
"contacts": [ | ||
{ | ||
"id": 1, | ||
"name": "Name", | ||
"note": "Notes", | ||
"company": "Company", | ||
"jobTitle": "Job Title", | ||
"department": "Department", | ||
"phones": [ | ||
{ | ||
"phone": "+XX XXXXXXXXX", | ||
"type": "Mobile" | ||
}, | ||
{ | ||
"phone": "+XX XXXXXXXXX", | ||
"type": "Home" | ||
} | ||
], | ||
"addresses": [ | ||
{ | ||
"city": "City 1", | ||
"country": "Country 1", | ||
"label": "Home 1", | ||
"region": "Region 1", | ||
"street": "Stret 1" | ||
} | ||
], | ||
"emails": [ | ||
{ | ||
"email": "[email protected]", | ||
"type": "Home" | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"type": "Work" | ||
} | ||
], | ||
"ims": [ | ||
{ | ||
"type": "@username", | ||
"value": "Skype" | ||
} | ||
], | ||
"websites": [ | ||
{ | ||
"type": "Website", | ||
"url": "www.lana.xyz" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
#### Contact model details #### | ||
|
||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| id | Long | Contact id in local device | | ||
| name | String | Name | | ||
| note | String | Note | | ||
| company | String | Company | | ||
| department | String | Department | | ||
| jobTitle | String | Job Title | | ||
| phones | List<Phone> | Address list | | ||
| addresses | List<Address> | Address list | | ||
| emails | List<Email> | Email list | | ||
| ims | List<Im> | List of instant messaging services | | ||
| websites | List<Website> | List of instant messaging services | | ||
|
||
### Models details (Phone, Address, Email, Im and Website) | ||
|
||
#### Phone fields | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `phone` | String | Phone | | ||
| `type` | String | Type | | ||
|
||
#### Address fields | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `street` | String | Street | | ||
| `city` | String | City | | ||
| `region` | String | Region | | ||
| `contry` | String | Country | | ||
| `label` | String | Label | | ||
|
||
#### Email fields | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `email` | String | Email | | ||
| `type` | String | Type | | ||
|
||
#### Im fields | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `type` | String | Type | | ||
| `value` | String | Value | | ||
|
||
#### Website fields | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `type` | String | Type | | ||
| `url` | String | Url | | ||
|
||
### Types | ||
|
||
#### Phone Types -> More info: [Android Developers](https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Phone) | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `Home` | String | Home | | ||
| `Assistant` | String | Assistant | | ||
| `Callback` | String | Callback | | ||
| `Car` | String | Car | | ||
| `Company Main` | String | Company Main | | ||
| `Fax Home` | String | Fax Home | | ||
| `Fax Work` | String | Fax Work | | ||
| `Isdn` | String | Isdn | | ||
| `Main` | String | Main | | ||
| `Mms` | String | Mms | | ||
| `Mobile` | String | Mobile | | ||
| `Other` | String | Other | | ||
| `Other Fax` | String | Other Fax | | ||
| `Radio` | String | Radio | | ||
| `Telex` | String | Telex | | ||
| `Tty TDD` | String | Tty TDD | | ||
| `Work` | String | Work | | ||
| `Work Mobile` | String | Work Mobile | | ||
| `Work Pager` | String | Work Pager | | ||
| `unknown_$type` | String | Default value when phone type is not found. `$type` is Int (Example: unkwnown_1) | | ||
|
||
#### Address Types -> More info: [Android Developers](https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.StructuredPostal) | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `Home` | String | Home | | ||
| `Other` | String | Other | | ||
| `Work` | String | Work | | ||
| `unknown_$type` | String | Default value when address type is not found. `$type` is Int (Example: unkwnown_1) | | ||
|
||
|
||
#### Email Types -> More info: [Android Developers](https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Email) | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `Home` | String | Home | | ||
| `Mobile` | String | Mobile | | ||
| `Other` | String | Other | | ||
| `Work` | String | Work | | ||
| `unknown_$type` | String | Default value when email type is not found. `$type` is Int (Example: unkwnown_1) | | ||
|
||
#### Im Types -> More info: [Android Developers](https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Im) | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `Aim` | String | Aim | | ||
| `Msn` | String | Msn | | ||
| `Yahoo` | String | Yahoo | | ||
| `Skype` | String | Skype | | ||
| `Qq` | String | Qq | | ||
| `Google Talk` | String | Google Talk | | ||
| `Icq` | String | Icq | | ||
| `Jabber` | String | Jabber | | ||
| `Netmeeting` | String | Netmeeting | | ||
| `unknown_$type` | String | Default value when im type is not found. `$type` is Int (Example: unkwnown_1) | | ||
|
||
#### Website Types -> More info: [Android Developers](https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Website) | ||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `HomePage` | String | HomePage | | ||
| `Blog` | String | Blog | | ||
| `Profile` | String | Profile | | ||
| `Home` | String | Home | | ||
| `Work` | String | Work | | ||
| `Ftp` | String | Ftp | | ||
| `Other` | String | Other | | ||
| `unknown_$type` | String | Default value when website type is not found. `$type` is Int (Example: unkwnown_1) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
### AriesSDK.fetchDeviceInfo() | ||
|
||
```js readonly | ||
AriesSDK.fetchDeviceInfo(); | ||
``` | ||
|
||
It obtains information from the device, from Lana's own app and the list of installed apps. | ||
|
||
Sends events to the different analytics provider configured in the native app. | ||
|
||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `device` | Object | Information about device | | ||
| `lanaApplication` | Object | Information about Lana App installed | | ||
| `packagesList` | Object | List of applications installed on the device | | ||
|
||
```js readonly | ||
{ | ||
"device": { | ||
"brand": "google", | ||
"country": "US", | ||
"language": "es", | ||
"manufacturer": "Google", | ||
"model": "sdk_gphone64_x86_64", | ||
"name": "emulator64_x86_64_arm64", | ||
"systemName": "Android", | ||
"systemVersion": "30", | ||
"uuid": "6e87ef6e149493a4" | ||
}, | ||
"lanaApplication": { | ||
"appInstallerPackageName": "", | ||
"appIsInstalledViaGooglePlay": false, | ||
"flavor": "staging", | ||
"isDebug": true, | ||
"name": "xyz.lana.b2c.staging", | ||
"version": "1.7.1-staging" | ||
}, | ||
"packagesList": [ | ||
{ | ||
"className": "xyz.lana.b2c.LanaApplication", | ||
"name": "Lana", | ||
"packageName": "xyz.lana.b2c", | ||
"targetSdkVersion": 30 | ||
} | ||
] | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
### AriesSDK.checkPermission(permission: String) | ||
|
||
```js readonly | ||
AriesSDK.checkPermission('permission'); | ||
``` | ||
|
||
Ask native, if the app has been granted the permission granted by parameter. | ||
|
||
#### Permissions supported: | ||
|
||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `contacts` | string | READ_CONTACTS | | ||
| `camera` | string | CAMERA | | ||
| `location` | string | ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION | | ||
|
||
#### Response: | ||
|
||
| Field | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `result` | string | The result if you have the permission granted in native. `result` , `result` or `result` | | ||
|
||
#### Result types: | ||
|
||
| Result | Type | Description | | ||
| ----- | ---- | ----------- | | ||
| `granted` | string | The user has explicitly granted permission. | | ||
| `denied` | string | The user explicitly and permanently denied permission. | | ||
| `unknown` | string | The user has not yet granted or permanently denied permission. | | ||
|
||
A successful response body will contain the following information: | ||
```js readonly | ||
{ | ||
response: { | ||
"result": "granted" | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### AriesSDK.openAppSettings() | ||
|
||
```js readonly | ||
AriesSDK.openAppSettings(); | ||
``` | ||
|
||
Launch the native application settings screen. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters