How to Create an FFI:
FFI: Foreign Function Interface
An FFI can be - library(.jar or .aar) or File(.class / .java)
Eg:
In case of Android: .jar / .aar
In Case of iOS: .zip
Constituents of FFI - Android:
a) FFItoKony Interface file: Java file invoking the FFI code. This is the class that should be mapped to KonyVisualizer's Javascript function. This JS function will be used in the Viz project.
b) FFI code scattered across multiple files: Code invoking Android native functions and classes etc
Constituents of FFI - iOS:
How to Build .JAR file:
1. Kony Visualizer -> Open Perspective -> Java
2. Create a new Java Project
3. Create a class which will be the FFItoKony-Interface. Call/Invoke the other FFI class code in one or more functions
4. Write the business logic inside the other FFI class files. This code can have all the native calls and libraries
5. Build the project. Include the following steps while building
-> Add KonyWidget.jar(found in build folder of the project) as external library
-> Add necessary dependent native(android) libraries while building if required)
6. Export the source(not the dependent libs) as .JAR
How to Integrate and build in KonyViz: Refer to Kony Viz docs for more information
1. Edit-> Integrate Thirdparty Lib->
2. Map the FFItoKony-Interface.Class(Built at step 3 above) file to a JS file
3. Build the project.
FFI: Foreign Function Interface
An FFI can be - library(.jar or .aar) or File(.class / .java)
Eg:
In case of Android: .jar / .aar
In Case of iOS: .zip
Constituents of FFI - Android:
a) FFItoKony Interface file: Java file invoking the FFI code. This is the class that should be mapped to KonyVisualizer's Javascript function. This JS function will be used in the Viz project.
b) FFI code scattered across multiple files: Code invoking Android native functions and classes etc
Constituents of FFI - iOS:
How to Build .JAR file:
1. Kony Visualizer -> Open Perspective -> Java
2. Create a new Java Project
3. Create a class which will be the FFItoKony-Interface. Call/Invoke the other FFI class code in one or more functions
4. Write the business logic inside the other FFI class files. This code can have all the native calls and libraries
5. Build the project. Include the following steps while building
-> Add KonyWidget.jar(found in build folder of the project) as external library
-> Add necessary dependent native(android) libraries while building if required)
6. Export the source(not the dependent libs) as .JAR
How to Integrate and build in KonyViz: Refer to Kony Viz docs for more information
1. Edit-> Integrate Thirdparty Lib->
2. Map the FFItoKony-Interface.Class(Built at step 3 above) file to a JS file
3. Build the project.
No comments:
Post a Comment