Develop your Cordova app with MobileFirst for Android using Android Studio.
Before you begin
You must have a Cordova app project set up with Apache Cordova CLI (see Creating a new Cordova app without the MobileFirst template).
- If you have not already done so, from the command line run
This creates the mfpclient.properties file in the assets folder. If this file does not exist, you cannot run your app.
- Open the project in Android Studio.
- From Android Studio select .
- Navigate to the build.gradle file in project name and click OK.
- In the project navigator pane the project looks like this:
- Run your application to view it in the emulator.
- From the Run menu choose Run Android.
- Choose a device from the Device Chooser dialog.
The app is displayed in the emulator.
What to do next
You now have your Cordova project set up in Android Studio. You must register your app before you can start writing your code. See Registering Cordova applications to MobileFirst Server.