Skip to content
Will Cooke edited this page May 16, 2017 · 31 revisions

Build Mythling from GitHub-hosted source, and run this local build on your device.

Contents

IDE Setup
Build and Run
Running on Fire TV

IDE Setup

  1. You can use either Eclipse with the Android ADT Plugin, or Android Studio.

    • Mythling specifies a compilation target SDK of android-21, so to compile you'll need to install at least Android 5.0 (which can be done through the Android SDK Manager).
  2. Get the source code.

    • Copy the Git repository URL for the desired Mythling branch into the clipboard:
      master branch: https://github.com/oakesville/mythling.git
    • Eclipse:
      • Open the Git Repositories view in Eclipse (Window > Show View > Other > Git > Git Repositories).
      • Right-click in Git Repositories view select "Paste Repository Path or URI". On the last page of the wizard, check the box that says "Import all existing projects after clone finishes".
    • Android Studio:
      • From the menu: VCS > Checkout from Version Control > GitHub.

Build and Run

  1. Build the project.

    • LibVLC
      • Mythling uses LibVLC native libraries for the built-in video player, and these are not included with the Git source. To build Mythling so that it can run the LibVLC-based player, you'll need to first compile VLC for Android for your target device CPU.
      • Once built, explode libvlc.aar and copy the appropriate folder from jni into mythling/libs. For example, if you're targetting armeabi-v7a, you'd copy this folder containing the native .so libraries into mythling/libs.
    • Environment Variables:
      • The Mythling Gradle build requires these environment variables:OAKESVILLE_KEYSTORE_FILE, OAKESVILLE_KEYSTORE_PASSWORD OAKESVILLE_KEY_ALIAS, OAKESVILLE_KEY_PASSWORD
        For a non-release build you can set these to any bogus values.
    • Eclipse:
      • To make things easy, we've committed the Eclipse .project and .classpath files. The settings in these files allow the mythling directory on the file system to be imported as as an Eclipse project.
      • If you've got Eclipse autobuild enabled, the project will have already been built; otherwise select Project > Build All from the menu or type ctrl-b. In case Eclipse complains about the res directory being missing, you may need to select Project > Clean before building.
    • Android Studio:
      • The dependencies are defined in build.gradle.
      • From the menu: Build > Make Project, or type ctrl-f9. Build output appears in the Gradle Console.
  2. Run in debug mode on your device.

    • Uninstall Mythling if you've installed it through the Play Store. Note: you'll lose your preference settings and they'll need to be re-entered.
    • Enable USB Debugging through the Android Settings app. This option is located under Developer Options.
    • Connect your device to a USB port on the PC where you're running Eclipse. (Some Samsung devices require their Kies PC software for USB connectivity. Other manufacturers may require their own specialized installations.)
    • Eclipse:
      • Right click on the mythling project in Package Explorer view and select Debug As > Android Application.
    • Android Studio:
      • From the menu: Run > Debug mythling, or type shift-f9.
    • Find and select your device under "Choose a running device".
      (If you don't have a device or want to test a different profile you can create an Android Virtual Device to run through the emulator). Click OK.
    • The IDE will install the Mythling APK on your device and you'll be able to step through the code and evaluate variables. A good place to start with a breakpoint is in MainActivity.refresh().

Running on Fire TV

  1. Connect through ADB to your Fire TV device:

  2. Install through Eclipse:

  3. Mythling EPG:

Clone this wiki locally