Can we use native code as plugin in Rhomobile? - android

I need to run a java code for Android inside Rhomobile app. Is there any way i can call the java code. I have seen some of the plugins to interact with native codes for Android.
I tried searching and i did get to this url http://docs.rhomobile.com/rhoconnect/plugin-intro.
But i guess this is not for Rhomobile if i'm not wrong.
I have a library file for my requirement. Is there any way i can use it ?

Yes you can. Have a look at this http://docs.rhomobile.com/rhodes/extensions#native-extensions
The link you get is for RhoConnect ( basically meant for sync operation). You need to look into the native extension for Android : Rewriting the Generated Native Extension Source Code for Android
If you need some more help and support, you can go over
https://developer.motorolasolutions.com/‎
https://groups.google.com/forum/#!forum/rhomobile
You can also simply post you query here and tag Rhomobile & Rhodes.
Hope this might help you.

Related

How to implement herumi/mcl library into my Android project?

I would like to use herumi/mcl library in my Android project. I posted a question on Author's forum and he replied with these two solutions:
1. https://github.com/herumi/bls-eth-go-binary/ provides a static library for Android, which contains mcl functions. You can use them through gomobile .
2. https://github.com/herumi/mcl/tree/master/ffi/java provides JNI of mcl. If you can build libmcljava.so for Android by cross-compile, then you can use mcl such as https://github.com/herumi/mcl/blob/master/ffi/java/MclTest.java.
I think that great solution for me is the second Option, but i absolutely dont know how. I am using Android NDK to call C code to my app, but thats all i know.
I am looking for some fresh tutorial or something like step-by-step, what would help me to use this library in my Android project. I am working on Windows OS.

openCV with nativescript?

Is there any (easy) way to link to native libraries, specifically OpenCV, using Telerik NativeScript? I suppose since it outputs source I could go into the Android and ios projects after compiling and implement all of the openCV code seperately, but that sort of defeats the purpose of using NativeScript, imo.
Is there any cross-platform way to interface with native code?
Thanks!
If OpenCV supports Android and iOS then you would need to create the communication to the native code to use it. That's how all of NativeScript works, it allows you to use Javascript (TypeScript) and communicate directly to native code without any wrappers.
So essentially everything in NativeScript has a wrapper to the underlying native code/components, that's the difference and the power behind products like NativeScript and React Native as opposed to Cordova based apps (PhoneGap, Ionic, etc.).
Since your question isn't a code specific question, it's kind of hard to answer and there might be a slight misinterpretation on my part of what you are really trying to understand. Hope this helps in some way. :)
here is iOS pack for openCV:
https://sourceforge.net/projects/opencvlibrary/files/opencv-ios/3.4.3/opencv-3.4.3-ios-framework.zip/download
and for android you can download it from here:
https://sourceforge.net/projects/opencvlibrary/files/opencv-android/3.4.3/opencv-3.4.3-android-sdk.zip/download
EDITED:
a solution is to write a plugin and reference the OpenCV framework using cocoapods
here is the link of how to write a plugin in native script by cocoapods
NativeScriptUsingCocoapods

Calling an activity from jquery in cordova

I am new to cordova so wanted to know if it is possible or not.
I have a functionality to implement, which I think I will be more comfortable in android native activity.
So can I call the native android from an html page or through jquery and the vice versa.
You need binding JavaScript code to Android code (bridge)
See official documentation
here is a good tutorial
http://itsmycodeshare.blogspot.in/2016/01/create-custom-cordova-plugins-using.html
and this is basic plugin example which interacts with js from Android java
https://github.com/don/cordova-plugin-hello
add your further activity and other code in <plugin_name>.java in src folder.

How to look at code of some Android class?

I'm developing some Android application, and I need to look at source code of some Android class. I have tried to use Android Source tool (installed as Eclipse extension), but I can't still use "Open Declaration" for Android class, therefore I need to use alternative ways . Please, suggest me, can I open code for some class on-line or download sources? Thank you in advance.
Here is the link, which provides the class code with respect to their versions :
http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/

How to see inbulit classes

I am using android in eclipse . I wanted to see inbuilt classes in android such as 'BaseAdapter' class. Please suggest a method for seeing the content of those classes.
you can download the android source code and link it in eclipse. or the easier way is to use http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/

Categories

Resources