I use [email protected] and I wanna know how can I add a .java file in my nativescript project.
I use nativescript@4.+
At this very moment, a viable option is to create an Android library from your java file.
The possibility to directly use java files in NativeScript is logged as a feature here
I found the solution !
Just adding your java files in "your_project\app\App_Resources\Android\src\main\java"
then call the class in your js or ts file and Nativescript will take care to send you back your object.
nativescript is the simplest, just understand the logic.
Nativescript is the best
@Fabiyo-90 can you post an example app? This does not seem to work for me. Thanks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I found the solution !
Just adding your java files in "your_project\app\App_Resources\Android\src\main\java"
then call the class in your js or ts file and Nativescript will take care to send you back your object.
nativescript is the simplest, just understand the logic.
Nativescript is the best