NFC API for Android NDK

I am working on a multi-platform project that needs NFC support. The project is written in C ++, so it would be nice to have access to the C ++ Android NFC API.

Is there a way to interact with NFC using the NDK?

I know that you can call Java SDK methods from the NDK. In this case, I could create a Java class to handle NFC interactions, and then call these methods from C ++.

Do you think it is possible to develop such a mechanism?

+4
source share
1 answer

For this you need to use JNI.

Create a Java class that will access the Android NFC API and provide you with data in a format that suits your needs. Then access your methods from your C ++ code through JNI calls.

0
source

Source: https://habr.com/ru/post/1499594/


All Articles