Index of the Moto Mods Developer project:
Believe me, developing on the Moto Mod platform is not for the faint of heart. Be sure to see Part 1 of the Moto Mod Developer series, click this link. A wrong move means bigtime headaches. Follow it exactly. Then come on back here.
Install JDK and Android Studio
This tutorial will show you how to Install JDK, Android Studio, and the Moto Mods SDK on Ubuntu 16.04
Android Studio requires the Java Development Kit (JDK) so we will install that first. In terminal, type “sudo apt-add-repository ppa:webupd8team/java”. Follow the terminal commands shown
Once the installer is done, type “javac -version” and “java -version” to check if the JDK was installed.
Now that JDK is installed, we can now install Android Studio in Ubuntu VM, open firefox and download Android Studio
Save the file and extract it
Create a folder called Apps in the /home/<username> directory. Move the extracted folder in the /home/<username>/Apps, using right click->Move To...
In terminal, navigate to the directory and execute “./studio.sh”. Shown above. If you get a permissions error then, Navigate to Android Studio’s directory bin folder, give yourself permission for the .sh file and execute it
This is a new copy, Select the second option
Android Studio will launch
The Android Studio Welcome will show, click Next
Choose Standard Installation
Android Studio is now installed
Setup Moto Mods Project in Android Studio
Start a new Android Studio Project and configure your application name
Set Android API version to 6.0 (API level 23), Moto Mods only supports API level 23+ (Android 6.0+). It does not support earlier versions of Android.
It will install API23: Android 6.0 SDK
Create an empty activity
For beginning Moto Mods Development we will start with a Blinky application
Finally, the Android Studio Blinky application is setup, ready for development.
Install Moto Mods SDK
Now that Android Studio is installed and a project is created we need to add the Moto Mods SDK to the newly created project so that we can make API calls to the Reference Moto Mod
Download the Mod Mods SDK Library. Provided at: https://developer.motorola.com/build/tools/setup-environment
Save the ZIP file.
In your downloads folder, Right click on the “ModLib-01.00.000.zip” and hit “Extract Here”
Once the ZIP is extracted, Right click and “Move To….”
Navigate to ‘/home/<username>’ and hit select
Once moved, open the “ModLib-01.00.000” folder and Move or Copy To…
Now we will put the SDK into our Android Studio Project. Move the .jar file into the /libs folder of our created project. ‘/home/<username>/AndroidStudioProjects/MotoModsDevelopment-Blinky/app/libs’
In the /res folder of /ModLib-01.00.000 there is a version.xml file that we need to move as well. Hit Move or Copy To...
Move or Copy “version.xml” to ‘/home/<username>/AndroidStudioProjects/MotoModsDevelopment-Blinky/app/src/main/res/values’
Shown below is how the “modlib-01.00.000.jar” and “version.xml” should look in the project explorer tree.
The SDK is now added to the project and we can start using it to develop.