# @premind/react-native-premind-android

> 1. The library is available on npm, install it with:

Latest version **1.0.8** (published 2021-08-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install @premind/react-native-premind-android
pnpm add @premind/react-native-premind-android
yarn add @premind/react-native-premind-android
bun add @premind/react-native-premind-android
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2021-08-16 |
| First published | 2019-06-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 281.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Premind |
| Maintainers | kunambi, huy.dam, ttl1601, holu15795 |
| Keywords | react-native, premind |

## Links

- npm: https://www.npmjs.com/package/@premind/react-native-premind-android
- Repository: https://gitlab.23c.se/premind/wrapper-react-android
- npm.io page: https://npm.io/package/@premind/react-native-premind-android

## Recent versions

- 1.0.8 (latest) — 2021-08-16
- 1.0.7 — 2021-08-16
- 1.0.6 — 2021-08-16
- 1.0.5 — 2020-04-09
- 1.0.3 — 2019-11-23
- 1.0.2 — 2019-06-05
- 1.0.1 — 2019-06-05
- 1.0.0 — 2019-06-05

## README

# React Native Premind SDK


## Get modules

1. The library is available on npm, install it with: 

    `npm install @premind/react-native-premind-android` 
    
    or 
    
    `yarn add @premind/react-native-premind-android`


2. Link the library with your project:

    `react-native link @premind/react-native-premind-android`


## Setup your application

1. Configure your integration **`key`** and **`secret`** in the <application ... > tag of your App Manifest file.  
        `<meta-data android:name="com.premind.premindsdk.KEY" android:value="\ your-KEY-here" /> `                                                                                                                   
        `<meta-data android:name="com.premind.premindsdk.SECRET" android:value="\ your-SECRET-here" />` 

2. Configuration of MainApplication class:                                              
    `import com.premind.premindsdk.PremindApplication;`

    Change                                                                                        
    `public class MainApplication extends Application implements ReactApplication`                                                       
    To                                                                                          
    `public class MainApplication extends PremindApplication implements ReactApplication`


## Usage

Import it into your project:

`import Premind from '@premind/react-native-premind-android'`



**Authenticate**

Authenticate with your own `User ID` or `Token`, make sure it is unique and not expired. 
The return result is `true` if the authentication is successful.
```
authenticate = async () => {
    try {
      const result = await Premind.authenticate('userID');     
      if(result == true)
      {
        //authenticate success
        //YOUR_CODE
      }
    } catch (error) {
    
    }
  };
```

**Incognito mode**

Get incognito mode (return value is a boolean)
```
getIsIncognito = async () => {
    try {
      const result = await Premind.getIsIncognito();    
      //YOUR_CODE
    } catch (error) {
    
    }
  };
```

Set the incognito mode on or off
```
Premind.setIsIncognito(isIncognito);
```

Get Me (Profile Info)
```
const result = await Premind.getMe();
```

Delete Profile
```
const result = await Premind.deleteFromProfile(key)
```
```
const result = await Premind.deleteVisit(id)
```
```
const result = await Premind.deleteInformation(id)
```

Update Profile
```
const result = await Premind.updateProfile(key, value)
```
```
const result = await Premind.updateInformation(id, key, value)
```

---
_Source: https://npm.io/package/@premind/react-native-premind-android · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
