Skip to content

English document

YolandaQingniu edited this page Nov 15, 2021 · 7 revisions

Light Ox Bluetooth Android SDK

Fast integration

proguard-rules

  • -keep class com.qingniu.scale.model.BleScaleData{*; }

Specific operation document

Specific integrated documentation [] (https://yolandaqingniu.gitee.io/sdk-doc/)

Android Studio online dependencies

  • Add jitpack** support to build. Gradle ** at the root of your project allprojects { repositories { . maven { url 'https://jitpack.io' } } }
  • Add dependencies to build.gradle** at the root of your module `
2.5.8 can be specified as any release --> 2.5.8 master-snapshot -->

dependencies { compile 'com.github.YolandaQingniu:qnscalesdkX:2.5.8' } `

Android Studio native dependencies

-- Bluetooth permission -->

--6.0 and later require dynamic application -->

-- Store logs -->

-- Network permissions are required if the SDK is online -->

`

Precautions

  • If the targetSdkVersion is 28 or later, you need to obtain location permission before scanning devices. You need to apply for it by yourself
  • Some mobile phones need TO enable GPS to scan devices when using Bluetooth function. The SDK will output logs that GPS is not enabled, but will not call back errors. Developers can limit them independently
  • If your project is multi-process, it is recommended to limit SDK initialization to the main process

FaQs

The specific use of reference [API] (https://yolandaqingniu.gitee.io/sdk-doc/) and Demo, below are some common problems.

  1. An APPID error is displayed during initialization
  • Checks whether the initialization file matches the appID used
  • Check if the introduced SDK is up to date
  1. The scan device is successfully invoked, but no device callback or error callback exists
  • Check whether the scanned device has been connected by others
  • Some mobile phones need TO enable GPS to scan the device, please check whether the MOBILE phone GPS is enabled
  1. The device fails to be connected or is disconnected soon after being successfully connected
  • Check whether the device is connected by someone else
  • Check whether the connected device is paired in the System Bluetooth. If yes, cancel the pairing
  • Some mobile phones need to be scanned before connecting successfully, and the device should be scanned before connecting
  1. The indicators obtained are different from those in business negotiations
  • Check whether the device name displayed during the scan is correct
  • Heart rate scale Regardless of whether the heart rate indicator is enabled, the SDK will issue the heart rate indicator
  1. Data or devices can be monitored for multiple callbacks at a time
  • First make sure that multiple listening is set. Be sure to set it to NULL when listening is not in use
  • Determine if the measurement is done with shoes, which can lead to multiple measurements in a short period of time
  1. The SDK returns no location permission error
  • Check whether ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION are applied, and the SDK verifies both permissions
  • Whether to build version 26 and above, if yes, both permissions need to be applied separately (new in 8.0)
  1. The SDK returns an incorrect file. Ensure that the file location is normal and that the file is used properly in Demo
  • check if the so library has been added Check whether the packaged APK file contains the so library
  1. An error occurs in the measurement of Native method after SDK integration
  • Check if there is a problem with the integration Settings
  • Local integration cannot be mixed with online integration, only one method can be selected

** 'hint' ** : If we encounter a problem that cannot be located, we hope the developer can provide the log as soon as possible, so that we can find the problem as soon as possible