How to use Android Library?


#1

I have seen this post before.
But in some case. I still have questions.
For example:

  1. I need to call the library’s method like this.


    How do i pass the listener param into the method?

  2. Registe a broadcast receiver in the AndroidMainfest.xml. How do i write the BroadcastReceiver? I just find the dynamic way to registe the broadcast receiver in the document.


#2

In the documentation there are samples that show how to write Java handlers in TypeScript/JavaScript.
https://docs.nativescript.org/angular/runtimes/android/advanced-topics/execution-flow.html

Also we have a lot of these in the tns-core-modules source code:

After you have created your Receiver just register it in the AndroidManifest.xml which is located under app/App_Resources/Android


#3

I do not know how to create the Receiver yet:sweat_smile: