element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Blog RIoTboard: Developing for Android with Python (Kivy) and Java
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RIoTboard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 25 Mar 2014 6:12 AM Date Created
  • Views 1683 views
  • Likes 0 likes
  • Comments 0 comments
  • android
  • python
  • Ubuntu
  • programming
  • riotboard
  • development
  • linux
  • java
Related
Recommended

RIoTboard: Developing for Android with Python (Kivy) and Java

Former Member
Former Member
25 Mar 2014

I recently got my hands on a new RIoTboard and wanted to start developing on it as soon as I could. The first thing I did was check if any guides existed, and sure enough there was this guide from element14. However, it uses Windows and I am primarily a Linux guy. What the following guide will do is do the same process for Linux users, as well as introduce the primary application that I will be programming android apps in: Kivy, which uses Python as its primary language.

 

Getting Your RIoTBoard Running

What you need:

  • The RIoTboardThe RIoTboard
  • A 5V 1mA M-tip (2.1/5.5mm) Barrel Connector Power SupplyA 5V 1mA M-tip (2.1/5.5mm) Barrel Connector Power Supply
  • A standard Male to Male HDMI Cable connected to HDMI MonitorA standard Male to Male HDMI Cable connected to HDMI Monitor
  • USB Mini Cable connected to Linux ComputerUSB Mini Cable connected to Linux Computer
  • USB MouseUSB Mouse
  • USB KeyboardUSB Keyboard (optional)

K9g3dwj.jpg

 

in your power supply and HDMI Cable you should see this after a few seconds:

2R6HoHJ.jpg

 

This means your RIoTboard is up and running! Just plug in a mouse and drag the lock symbol somewhere to open your Android Menu.

 

Creating Apps using Java

The first goal of this post is to simply replicate the Windows guide for Linux Users. It should be noted that I am running Ubuntu 12.04. This guide should work with all versions of Ubuntu though.

 

First you need to install Java. Go to a terminal and type:

sudo apt-get install default-jdk

 

While that is installing, download the Android Development Kit (ADK). Resist the big blue button and instead click on "Download for Other Platforms"

bdjHEqG.jpg

 

You're going to need to find whether you are running 32 bit or 64 bit linux. Open a terminal and type:

uname -m

 

The output of which will be either:

x86_64 (This is 64 bit)

i686 = (This is 32 bit)

 

(Note: I am running 64 bit linux. If anyone is running 32 bit linux and part of this guide is wrong, please let me know!)

 

Select the ADT Bundle for your version (Linux XX-bit) and download it. When it is finished downloading, unpack it to wherever on your computer you want it. It should unpack as something like "adt-bundle-linux-x86_64-20131030".

 

Open the folder, then go to the "eclipse" folder. Double click the "eclipse" file. If it prompts you, tell it to execute. You should get a nice ADT Splash Screen.

FMJnjhN.png

Next it will prompt you to choose a workspace. Give it whatever folder you prefer.

 

You are almost done! Just follow the rest of his part II guide, with these minor differences:

  • In part II in the SDK Manager go to Tools -> Options and click the "Force https..." checkbox. Only do this if you can't get it to behave (it needs to show all the different Android versions)
  • I had to unplug/plug the RioTboard a few times to get it to show up in the devices list, but it eventually did! Try changing which USB port you plug it in too. Also, mine came up with the full name:

qtUFUlH.png

 

Awesome! You are now doing Android Development on Linux! If your particular distro has any other issues, please let me know and I will update them here.

 

Running Python Programs on your Android -- Using Kivy!

Kivy is a pretty cool development platform for Android that uses the super popular (and super easy) Python programming language. Since I am a python guy myself, this is how I would like to develop. One of the great things about Kivy is that it runs in pretty much every environment that Python runs -- this means that the develop / test / package cycle can be significantly reduced because Kivy can run right in your Linux (or Windows) box.

 

The first thing you need to do is install kivy and its associated packages. This is explained here, but to sum it up:

sudo add-apt-repository ppa:kivy-team/kivy

sudo apt-get update

sudo apt-get install python-kivy python-kivy-examples

sudo apt-get install pkg-config python-setuptools python-pygame python-opengl \

  python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev \

  build-essential libgl1-mesa-dev libgles2-mesa-dev cython

 

If everything works, you should be able to run their pong example right out of the box. This is one of the things that makes Kivy so cool: it is truly cross platform, making general development extremely easy.

 

Your computer should have installed examples at "/usr/share/kivy-examples", or you can download them at the bottom of the page. The project we are using is in tutorials/pong. Just run main.py (Open terminal and type "python main.py"). You should get a pong game

 

6GXDalo.png

 

Play with the paddles to make sure everything is running correctly. The next step is to compile the python code into an android app and run it on our phones. We will leave that for part II of this installment. Stay tuned!

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube