I Have a AAR file , in Mobile First Project I have to do a call which should open the activity from AAR file . How to do that? I have a Eclipse with MFP 7.0 .
-
@Idan Adar, can you please suggest me with something? – BalajiG Mar 14 '16 at 06:17
-
Are you building a native, hybrid, or Cordova application? You might find this helpful: http://dominoc925.blogspot.co.uk/2015/09/how-to-create-and-use-android-archive.html – Andrew Ferrier Mar 14 '16 at 08:33
-
hybrid application using Mobile First – BalajiG Mar 14 '16 at 09:29
-
1In that case you may need to be prepared to write some native glue code (e.g. a Cordova plugin). AFAIK, AARs are only for native Android code. – Andrew Ferrier Mar 14 '16 at 11:33
1 Answers
As suggested by Andrew in the comments, there is nothing specifically in the MobileFirst framework that will help you here. You will need to write native code in order to use whatever is inside the AAR file.
Create a Cordova plug-in as described in the following tutorial in order to access the AAR file and use its provided functionality: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/adding-native-functionality/android-adding-native-functionality-hybrid-application-apache-cordova-plugin/
However I believe this may also require handling it via Gradle: cordova plugin add external .aar file (not .jar)
Another suggestion that comes up is to extract the .jar file that is inside the AAR file and then that's much easier to handle...
-
One thing is i have a existing worklight hybrid project , how to add gradle to this project – BalajiG Mar 15 '16 at 07:12