Upgrading to OkCollect v1.3 & OkVerify v1.3
The latest releases of OkCollect & OkVerify for Android applications offers new features to help you better manage the address creation and verification process
The latest release of OkCollect & OkVerify introduces some new features that not only improves the rate at which users get verified but improves the overall developer experience, streamlining how to authenticate with the library and cut back the amount of code you have to write and maintain. These features include:
Keys and development environments are now required to be part of your
AndroidManifest.xml
file, eliminating the need to keep track of your application version, name etc using the OkHiContext class.You can now customize the icon and icon color of the foreground notification.
The foreground service is now turned on by default so you don't have to call the
startForeground
method after verification starts.You can now turn off the foreground service or verification all together for a particular user via a POST request using our API.
The foreground service is automatically stopped when an address is verified.
Internal improvements that further enhance the reliability of background work resulting in less data being used by the device as well as consume less battery.
Getting started
Include the new versions of OkCollect & OkVerify
Remove and re-install all the OkHi libraries in your application
Authorize your application
Place your provided keys in the AndroidManifest.xml
file located under android/app/src/main/AndroidManifest.xml
as shown bellow.
Remove any instances of OkHiAuth and OkHiContext
Given its required to provide your keys in the Manifest file, remove any instantiations of the OkHiClass and OkHiContext from your source code. Using the previous example remove the import statement as shown
Remove the startForegroundVerification call
Given that we now start the foreground service automatically, there's no need to manually start it
Remove the auth object as a parameter from OkCollect
Its no longer required to pass in the OkHiAuth object to both OkCollect & OkVerify.
Thats it! You're done 🚀 Be sure to checkout the full integration example & more on OkHi foreground's service to customize the notification icon and color
Last updated