@goki-lock/react-native
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

Goki lock sdk for react-native

how to install

yarn add @goki-lock/react-native

or

npm install @goki-lock/react-native

then add the stream alias to your metro.config.js & install stream-browserify if needed

module.exports = {
  // ...
  resolver: {
    extraNodeModules: {
      'stream': require.resolve('stream-browserify'),
    },
  },
  //...
}

please follow react-native-ble-plx@2.+ documentation and install it and add the required permissions to your app.

Please make sure these requirements are met before calling the sdk methods other it will fail.

  • iOS requirements
    • bluetooth should be on in both control center and settings
    • bluetooth permission needs to be granted
  • Android requirements
    • bluetooth should be on
    • bluetooth permission needs to be granted
    • location permission needs to be granted
    • location service needs to be enabled

you can use @goki-lock/react-native-utils to do these checks

How to use

import GokiLockSDK from '@goki-lock/react-native'

const lockdata = '...'
GokiLockSDK.unlock(lockdata)
.then(() => {
  console.log('unlock success')
})
.catch(err => {
  console.log('unlock failed', err)
})

related packages

Readme

Keywords

none

Package Sidebar

Install

npm i @goki-lock/react-native

Weekly Downloads

1

Version

0.0.8

License

agpl-3.0

Unpacked Size

11.8 kB

Total Files

8

Last publish

Collaborators

  • mobile.goki.travel
  • a.dehnavi