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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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 Part 1: Build an Android app on RIoTBoard
  • 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: bluescreen
  • Date Created: 24 Jan 2014 10:07 PM Date Created
  • Views 2716 views
  • Likes 3 likes
  • Comments 9 comments
Related
Recommended

Part 1: Build an Android app on RIoTBoard

bluescreen
bluescreen
24 Jan 2014

(For Part 2, click here.)

 

I recently got my hands on a new RIoTBoard, and thought it would be a fun opportunity to try writing a simple Android app to run on it. Like a lot of our members, I learned how to code a long time ago using languages like C, Pascal, and (gulp) Fortran. Every couple of years, I learn a current programming language just to keep my chops up. Most recently, I've had a lot of fun learning how to write Python scripts to unlock the capabilities of our single-board computers.

 

image

 

Android apps are different-- at least for me. First, a lot of app development for Android is done in Java. While you can write apps for Android using other languages, the Android developer's kit uses Java by default. Java is a serious programming language that is not nearly as easy to learn as, say, Python or Perl, which are more forgiving of formatting inconsistencies. And then there is the Android SDK, itself. Many of the developers I speak with recall the same war stories to me about how much time they spent learning their way around the SDK, and, in particular, getting Android software emulators to work without bogging down the rest of their system. As I'll explain shortly, the RIoTBoard lets you completely bypass software emulators by testing your apps in an actual, dedicated Android environment.

 

Android is by far the dominant OS for smartphones globally, and I prefer to work with open-source environments when possible. The app I created is not going to win any awards, but it should demonstrate the basics of getting started with Android app development.

 

 

I. Behold the RIoTBoard

 

The RIoTBoard boasts a number of cool features-- an ARM Cortex A9 core running at 1GHz, onboard Ethernet, HDMI, audio in/out, 5 USB ports (4 USB A-type + 1 USB mini-b), GPIO, and SD card interface. Here's the top of the board:

 

image

The SD card is underneath:

 

image

 

Sorry-- I have to say it again: 4 USB-A ports!

image

 

RIoTBoard does not ship with a DC power supply, so you might need to do what I did and make a pilgrimage to your local parts supplier. Here are the specs for the power supply:

 

  • 5V
  • 1A (minimum)
  • "M" Tip barrel connector

 

Connecting the RIoTBoard was pretty simple. I connected my monitor's HDMI to the RIoTBoard's HDMI port, my USB keyboard and mouse to two of its ports, and, finally, the power supply:

 

image

(There's two USB connections on the bottom.)

 

Within about two seconds, the Android logo appeared on my monitor:

 

image

 

And within about 20 seconds, I was looking at my Android start screen:

 

image

 

To see your home screen, just click and drag the lock symbol in any direction just like you would on an Android phone:

 

image

image

 

Not much happening here. Click the small button on the bottom of this page and it will take you to your applications view:

 

image

 

image

 

From left to right, starting at the top:

 

Browser

Cactus Player

Calculator

Calendar

Clock

Downloads

Email

Gallery

Messaging

Movie Studio

Music

People

Search

Settings

Sound Recording

 

RIoTBoard runs Jelly Bean, Android 4.3. It came out in July 2013. More Android phones are currently running Jelly Bean distros than any other versions of Android. This is great, because it means you will be working with a super-current version of Android as you start building apps.

 

 

II. Setting up ADT

 

The first thing you'll need to do to make your first Android app is download the Android Developer Tools (ADT) to a different computer (I'm going to call it our devbox). We're going to make the RIoTBoard into an Android test platform where we will install the apps we build before 'porting them over to an Android phone or tablet. Why is this useful? Because the RIoTBoard is able to show us all kinds of detail on a large monitor so we can really optimize our app before releasing it into the wild. Also, it lets us completely ignore Android software emulators-- programs that run on devbox which mimic an Android phone or tablet. I hate-- hate -- Android emulators. Maybe it's because my devbox has a few years on it, but I find they bog my system down to the point of being unusable. Because we have a shiny new RIoTBoard, we'll just use that as our testing environment! Once we like the way the app looks and performs on the RIoTBoard, we'll send it to an Android phone. But we're going to build the app on devbox. Devbox can be any computer you have within reach-- Windows, Mac OS, or Linux. (Just check the minimum requirements shown at the bottom of this page to make sure your computer is up to the job.). You'll need to install the ADT to devbox by downloading it from here. The ADT is sometimes referred to as the SDK, or ADT Bundle. We're looking for the package that includes the Eclipse IDE, ADT plugin, and SDK Tools. I'm running Windows 7, so here's what I see:

 

image

 

If you're running on Mac or Linux, you'll see something similar for your OS. Be sure to check out the system requirements at the bottom of the page to make sure you have a powerful enough box. Just click on the big blue button and make yourself comfortable-- the package is 480 MB, so it's going to take a while.

 

In the meantime, DO NOT EAT THE SILICA GEL.

 

image

 

Actually, there is something else you can do while you're waiting. You need to have JDK 6 on your devbox to use the Android Developer Tools bundle. Setting it up can take a little work-- mainly because Java wants everyone to run the latest version of its developer kit, 7u51. The problem is that Android sometimes doesn't work so well with it. Let's grab and install JDK 6.

 

 

III. Side Quest: Installing Java 6

 

1. Go to Java SE Downloads

2. Click on "Previous Releases":

 

image

3. Scroll down and click on Java SE 6:

 

image

 

4. On the next page, scroll down and click on the link for "Java SE Development Kit 6u45":

image

 

 

5. Read and accept the License Agreement that pops up.

 

6. Download the appropriate version for your OS. Since I'm running a 64-bit version of Windows, I'll choose that. If I were running a 32-bit version of Windows, I would choose the one right above it ("x86"). If I were downloading this to my Mac or Linux box, I would choose those versions. As it is, I'll just download the one I need today:

 

image

7. At this point, Oracle will force you to register for a free account in order to download the JDK. Go ahead and sign up to complete your download.

 

8. Go to your Downloads folder and run the Java 6 SDK installer. Click Yes whenever prompted.

 

 

IV. Back to Installing ADT

 

Hopefully your ADT bundle has finished downloading in the background. Unzip it from your Downloads folder and extract it somewhere that you'll be able to easily find it. Extraction will take a few minutes owing to the size of the download, so now is the perfect time to take a break. (Why not watch the latest episode of The Ben Heck Show while you wait? image)

 

Once ADT has finished unpacking, I recommend creating an alias to the Eclipse application. Browse to the wherever you extracted ADT, go into the Eclipse subdirectory and make a shortcut to the eclipse executable::

 

image

 

Eclipse is a popular IDE which is used by many developers across a wide variety of programming languages. What's cool about this particular version of Eclipse is that it is specifically optimized to help you create Android applications. Before launching it, let's confirm our installation of Java 6 finished successfully. Go to your Start button and launch the Command window by typing "cmd" in the search bar:

 

image

 

Either press Enter or click on the program that appears at the top of this list called cmd.exe

 

In the next window that appears, type: java -version 

 

image

 

You should be rewarded with a confirmation that you are running Java 1.6.0_45. You're now ready to launch Eclipse.

 

Go to the shortcut you made earlier for the Eclipse app and launch it by double-clicking it. Within a couple of seconds, you should see the Eclipse splash screen appear:

 

image

 

If you got this far, congratulations: you're nearly ready to start building Android apps! If nothing happened or if you got an error, review the previous steps and see if you missed something. As I mentioned at the top, one of the hardest parts about building Android apps is just your development environment functioning. In my next post, I'll show you how to set up the SDK Manager and code a simple "Hello, World" app.

 

If you have any questions, post them in the comments below and I'll do my best to answer them.

 

Ready for Part 2? Click here.


image

  • Sign in to reply
  • Former Member
    Former Member over 12 years ago

    Part 2 will be posted shortly....

    I don't want to anticipate, but I can't found the board with "adb devices". So I can't install needed software like gideros play.



    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 12 years ago

    Sorry-- I have to say it again: 4 USB-A ports!

    Yes, but as the iMX6 only has a single usb host controller, these are provided by an on-board 4-port usb hub. Unfortunately that's an important distinction.

     

    There was a thread a couple of months ago where the poster wanted to use multiple USB composite capture devices (sorry, can't find it anymore) on either RPi or BBB and the problem quickly becomes one of bandwidth as they have the same problem of only actually having a single host controller. Having four ports each with their own host controller would have allowed for 4x the bandwidth.

    The BBB saves a couple of $ here by only providing a single physical port and if you want more, then you use your own hub. There's little practical difference, but the BBB ends up a little bit cheaper

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bluescreen
    bluescreen over 12 years ago in reply to Former Member

    Partly, yes. but don't forget about larger-format mobile devices-- mainly Android tablets, which can boast a much higher resolution than your typical smartphone. The way I look at using the highest-res monitor for app building is kind of like listening to a music mix on different sets of speakers in the studio. It's good to switch between great speakers, so-so speakers, and a small set of tinny speakers. You know if your mix sounds amazing on the great speakers (high-res monitor) and pretty good on the tinny speakers (a small, low-res mobile screen), it will probably look good on most devices.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 12 years ago

    Because the RIoTBoard is able to show us all kinds of detail on a large monitor so we can really optimize our app before releasing it into the wild.

     

    I'm not exactly the smartphone type. I see lots of value in a large high resolution screen.  But isn't the point here that you want to optimize your app for a physically tiny screen on a phone ?  Something that works well on a big screen might not on a small one.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
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 © 2026 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