Capacitor plugin for sharing key-value data between Android and iOS apps using Content Provider and App Groups.
npm install capacitor-shared-storeCapacitor plugin for sharing key-value data between Android and iOS apps using Content Provider and App Groups.
``bash`
npm install capacitor-shared-store
npx cap sync
* getItem(...)
* setItem(...)
* isAppInstalledAndroid(...)
`typescript`
getItem(options: { key: string; appGroup: string; }) => Promise<{ value: string | null; }>
Lấy giá trị theo key từ App Group
| Param | Type |
| ------------- | ----------------------------------------------- |
| options | { key: string; appGroup: string; } |
Returns: Promise<{ value: string | null; }>
--------------------
`typescript`
setItem(options: { key: string; value: string; appGroup: string; }) => Promise
Lưu giá trị key-value vào App Group
| Param | Type |
| ------------- | -------------------------------------------------------------- |
| options | { key: string; value: string; appGroup: string; } |
--------------------
`typescript`
isAppInstalledAndroid(options: { packageName: string; }) => Promise<{ installed: boolean; }>
Kiểm tra app đã cài đặt trên Android (chỉ dùng cho Android)
| Param | Type |
| ------------- | ------------------------------------- |
| options` | { packageName: string; } |
Returns: Promise<{ installed: boolean; }>
--------------------