Getting started Android
→
Return to Overview
The following is a brief guide on starting development with
metaio Mobile SDK on
Android. Although previous experience on
Android development is not required, but it is recommended that you are familiar with basic
Android development. Furthermore, the information on this page is subject to change with the introduction of new
Android SDK and
tools.
Prerequisites
If you are Android beginner, we recommend
NVIDIA Tegra Development Pack. It is available for
Microsoft Windows,
MacOS,
Linux and has everything included to get started right away.
or, if you prefer can also start with official
Android SDK. The official instructions are given
here.
Additionally you need an Android device with following minimum features:
- Android 2.2 (Froyo)
- ARMv7 (Cortex) processor
- OpenGLES 2.0 support
- Camera
- GPS (Location), Accelerometer and Magnetic sensors for GPS/Compass based tracking
You can find out if your device meet above requirements by using free
Android System Info from
Android Market.
Building and Running the Tutorials
The following is a brief guide on how to build and run metaio Mobile SDK
Tutorials.
Import Tutorials Project
The first step is to import Tutorials project into your Eclipse workspace. The tutorials can be found here:
- On Windows: <install directory>\metaio\metaio Mobile SDK - 3.0.0\SDK_Android\Example
- On MacOS :
It is recommended that you make a copy of the
Example folder in a directory that do not contain spaces,e.g. c:\Example.
Important: Make sure that entire contents of the Example directory are not readonly.
Next, open
Eclipse with your preferred workspace. Go to
File→Import:
Select
Existing Projects into Workspace and click
Next
Browse for
Example folder and click
Finish.
You will see
MobileSDK3.0Examples project in the
Package Explorer on the left:
Building the application
Build the project by clicking
Project→Build menu.
Possible Build Errors
There could be following possible build errors if your development environment is not properly configured.
Missing gen source folder
The setup project of MobileSDK can sometimes fail to create empty gen folder in Example directory. This will yield following error in Eclipse while building.
To fix this error, perfom a clean on the project by choosing
Project → Clean... from the menu and selecting the 'Example' project in the up popping dialog.
If that doesn't work, make sure that you have the permission to write in the projects directory and that it is not locked or write protected.
Important: Eclipse sometimes does not refreshes properly. If you still see this error in the
Problems panel, you can do the following:
Create an empty directory in Example folder and name is
gen. Then refresh your workspace by going to
File→Refresh.
Click on the error in the
Problems pan and delete it by pressing the
DEL button. Then build the project again.
If the error persists, please restart your Eclipse.
Running the application
Before running the application, connect your Android device to your development environment through USB or Network. For more details on please see
ADB.
Run the application by clicking
Run→Run, or pressing the green play button on the tool bar.
When the application is run for the first time, it will ask for the
Run Configuration:
Select
Android Application and click
OK.
It will upload and install the APK to your Android device and launch the menu screen:
The explanation for each example is given
here.