Issue
I have a project where we want to access to a finger print scanner (external scanner). The drivers are written in c++ (NDK).
does Native script support access to Native Components?
Solution
There are a several issues about that on NativeScript's repo on GitHub, all lead to this issue where the solution is to create an AAR file from the CPP file and load it from NativeScript.
I found also a detailed guide about how to do it, here are the main steps summarized by the author:
- Create an Android library using Android Studio
- Import the native C++ library and wrap the code we want to export into a Java class, using JNI
- Export the library to a aar file, and import it into a new NativeScript plugin
- Import the plugin into a new NativeScript application
Answered By - Ezra Steinmetz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.