Introduction
This tutorial will explain how to get set up with a new Android project capable of interacting and extending JuiceSSH as a plugin. We will discover the necessary software requirements, how to build a new Android project and then how to include our Plugin Library.
Once you have a JuiceSSH Plugin capable app project, you will then be able to follow one of our example app tutorials or add your own functionality for you to then compile and publish on the Google Play Store. The example app tutorials have been designed to give a good overview of the capability of plugins.
If you're already an experienced Android developer, you may wish to skip straight to Including the JuiceSSH Plugin SDK and then go on to the Example App Tutorials.
Your Development Environment
In this tutorial we will refer to your development environment. By this we mean an easily accessible directory solely used for Android development. ~/dev is a good example which we ourselves often use (which is equivalent to $HOME\dev for Windows users).
Installing Android Development Requirements
Before you can write any Android apps, you must download the appropriate tools such as the Android SDK and Android Studio. The best place to do so is The Android Developer Centre, where you can also find other, very well written, Android Development materials. We'll explain briefly how to get the tools set up, but really the Android Developer Centre will say it much better than we do with far greater detail.
First we need to download and install the Android SDK. Once completely installed, it will include:
- The most recent Android builds
- A device connectivity tool, ADB
- Plenty of debugging tools like DDMS
- Various reference resources such as icons
- Android SDK Platform-tools
- Android SDK Build-tools
- Android Support
- All Android 4.3 libraries
Finally, we're ready to install our IDE: Android Studio.
Creating a New Android Project
Once ADT and Android Studio are installed, you can now create a new project which will become your JuiceSSH Plugin App. Start by opening Android Studio and selecting New Project. Follow the wizard to apply basic naming and appearance options.
Including the JuiceSSH Plugin SDK
maven { url 'https://raw.github.com/Sonelli/maven/master' }
to the repositories section and then
compile 'com.sonelli:juicessh-pluginlibrary:1.0.+@aar'
to the dependencies section.
Test
After hitting the Sync Project with Gradle Files button, you should be able to start referencing classes such as PluginContract from the com.sonelli.juicessh.pluginlibrary package within your code.