Has anyone tried the "Android - Adding native functionality to Hybrid Application using Apache Cordova plug-in" feature in v6.2 ?
I'm trying to use a 3rd party library on the client side and wanted to understand where to put the plug-in java class in the project. The documentation shows a java package (src) structure whereas the best I can find is normal folders in the android native folder.
Thanks.
The reason you see these as "regular" folders is likely because you are look at the Worklight project rather than the generated Android project.
Worklight project\apps\your_app\android\native\ ... will look as folders because they are indeed just folders.
Once you build your Worklight application (containing an Android environment), an Android project will be generated. In it, you will see the folders as packages, etc.
A Worklight project and application structure is explained in earlier training modules:
Creating your first Hybrid Worklight application
Previewing your application on Android
So, you should place your Java Class file in Worklight project\apps\your_app\android\native\src\com\package_name\ ...
Note about Cordova plug-ins in Worklight: depending on the plug-in this may not be possible to use as some plug-ins require using the Cordova plugman, which is not yet supported in Worklight.
Related
IBM provides two ways to generate the App Center Mobile Client. Either using their own MobileFirst Project or Cordova Project.. Among them which is the latest version? What is the latest version of .apk that IBM provides? Whether the .apk is built using native android?
(IBMApplicationCenter.apk file is in the directory ApplicationCenter/installer)
Your Question : IBM provides two ways to generate the App Center Mobile Client. Either using their own MobileFirst Project or Cordova Project
Answer: Pure Cordova based is a new one. So, with this there is no dependency on Worklight studio. You can build the project using android studio.
I am working on hybrid Apps over IBM Mobile First Foundation on eclipse,I want to build an android app of the project, but when i configure the android SDK location and click on apply, nothing happens
Help!
The question is not clear enough... what are you applying? where? are you getting any errors, if yes, what are they?
When using MobileFirst Studio in Eclipse, the Android project can be generated in two ways.
By using the Google ADT tools.
Install the Eclipse plug-in and re-build the project by right-clicking the application folder and selecting Run As > Run on MobileFirst Development Server
By providing the path to Android Studio.
First install Android Studio and then, in Eclipse, navigate to File > Preferences > MobileFirst. Provide the path to the folder containing the executable. For example in Mac OS X that would be /Applications.
Then right-click on the Android environment folder and select Run As > Android Studio project.
Note: be sure not to convert the project to Gradle structure - this is currently not supported.
Environment: Worklight 6.1.0.2
We have created a hybrid app using Worklight 6.1 for android, iOS and windows8 platform. We would like to include license documents and notices files as part of the app. To do this, we would like to know, if including these documents inside the "legal" folder (under application name folder) and installing the app on the device, will also install these license documents on the device ?
I browse through the android app, but didn't found these documents as part of the build.
The legal folder is not part of the generated Android project because it has no value there. The native project will become your .apk - the file that you distribute to your end-users. The license is of no use there; your customer cannot see it.
I am using IBM Worklight 6.0 with December 14th fix.
I am trying to use IBM App Center client for iOS8.
I have seen multiple discussions about this issue:
IBM Worklight Application Center iOS unresponsive to touch events
IBM App center not working for iOS8
I copied the project from my server, where the fix is installed, and built for iOS, but when I inspect the mobile App, I can see that the application is using Dojo 1.9.0.
> dojo.version.toString();
"1.9.0 (29469)"
I can see that the IBM App Center mobile client does not use Dojo Toolkit, but includes a dojo.js file (with a size of 1.2MB).
My question is : What are steps to build IBM App Center for Worklight 6.0, knowing that the fix is installed (Both Worklight studio and server)?
Do I need to manually change dojo.js file with a newer version? if yes, where can I find such file?
The AppCenter installation contains an Application Center Installer application project.
This is a Worklight project with the iPhone environment. The app that is generated from it is the Installer application that you need to install on a device, and from which the user will then install any subsequent applications distributed via Application Center.
Make sure you are using the provided Worklight project; there are no additional changes to be done to to project (other than using your own bundleId, ...).
It could be that you are missing the Dojo library in your workspace?
You can generate it by creating a new Worklight project and application using the Dojo wizard in Studio.
When you received the fix, it contains a new project for IBM app centre.
You need to get this project and import it to your Eclipse Environment and rebuild the IBM app centre (APK and IPA) files.
You have to redeploy these files to IBM app centre console and re-download them on your iOS8 devices.
I believe the iOS8 fix starts from version V6.2, and we have downloaded fix v6.2.0.1.
So, I'm not sure about V6.0.
Please verify with IBM.
After I migrated my project Worklight from version 6.0 to 6.1, the following error is occurring when trying to deploy the application:
[2013-12-19 11:37:02] FWLST1040E: android build failed: Cannot
overwrite template file
'C:\workspaces\worklight\CISSMartTax\apps\CISSMartTax\android\native\native.iml'
Unfortunately this currently works for me.
In Worklight 6.0.0.1 I've created a new Worklight project and application with the Android environment, built and deployed it
I then exported the Worklight project as a .zip file
In Worklight 6.1.0 I've imported the above .zipped project, built and deployed it
Ran the generated Android project in the Android emulator
This was with a blank new app; it's possible yours is more intricate than that.
Suggestions:
Delete the native folder and re-build and deploy.
Make sure to back-up any native Java classes and other artifacts you may have previously added to the native folder.
Provide your Worklight project (the original from 6.0.0.x) in a Dropbox download link for analysis...