OkHi on your Android app
The suite of OkHi android libraries that will enable you to start collecting and verifying your user's addresses.
tl;dr
To start verifying address you need to integrate two libraries. OkCollect & OkVerify.
OkCollect - enables you to launch OkHi from your app and collect accurate addresses from your users.
OkVerify - enables you to verify the addresses created from OkCollect
Prerequisites
OkHi Client Key and Branch Id
First you need to obtain your OkHi client key and branch ID. You can get these by signing up here.
Use your sandbox keys while you test and develop, and your production mode keys before you publish your app.
Installation
Androidx
Please make sure AndroidX is enabled in your project by modifying android/gradle.properties
and adding 2 lines:
Add the JitPack repository to your build file
Add the OkHi Core library dependencies
Check for the latest release on github.
Configure your app
Add ACCESS_FINE_LOCATION
and ACCESS_BACKGROUND_LOCATION
permissions to your AndroidManifest.xml
If you're targeting Android versions >= 8 you need to make sure your users select on "Allow always" when granting permissions otherwise the verification process won't work. See our best practices section
Authentication
Open your AndroidManifest.xml
located under android/app/src/main/AndroidManifest.xml
and add in your keys as shown bellow
See OkHi Core API reference here.
Last updated