Open main menu

DAVE Developer's Wiki β

Changes

Step by step guide to your first android app (DACU)

235 bytes added, 10:53, 10 March 2015
m
Deploy the application on the target
=== Introduction ===
This tutorial shows you how to develop your first Android application and run it on the DACU platform. You can watch the full procedure on the [] video.
=== Boot the system ===
Let's assume the system is configured to boot loading the kernel and root file system from the internal flash.
Start the system as described in the [[DacuIndustrial_Tablet#.22Normal.22_mode | Running Android in "normal mode"]] section. {{ImportantMessage|text='''The default IP address is 192.168.0.122'''}} 
==== Change the default ip address ====
[[File:Dacu-serial-console-cable.jpg|thumb|none|border|350px|Dacu serial cable]]
and start your preferred terminal emulator, as described in the [[DacuIndustrial_Tablet#.22Full_control.22_mode | Running Android in "full control mode"]] section.
On the u-boot console, please enter the following command to check the default ip address:
==== Check the Android Debug Bridge (ADB) and connect to the target ====
Start a connection through the Android Debug Bridge as described in the [[DacuIndustrial_Tablet#Running_the_Android_Debug_Bridge_.28ADB.29 Running_the_Android_Debug_Bridge | Running ADB]] section. Please note that setting the correct IP address on the target and is mandatory to make ADB work.
=== Develop your first application with Eclipse ===
# close the running emulator
# check that [[DacuIndustrial_Tablet#Running_the_Android_Debug_Bridge_.28ADB.29 Running_the_Android_Debug_Bridge | ADB is running]]
# open a shell and move to the workspace directory containing the project files (example: /home/user/workspace/MyFirstApp)
# enter the bin sub-directory. If you list the content of this directory, you should see the application .apk file
</pre>
Now you can access the device, go to the applications screen and touch the "MainActivity" icon to run the application.
Please refer to the following picturesand watch the [http://www.youtube.com/watch?v=RKkFoX3nEZw Running "Hello, world!" app on DACU] video:
<gallery widths=400px perrow=3 caption="Deploying the application">
=== Useful links ===
[Videohttp://www.youtube.com/watch?v=RKkFoX3nEZw Running "Hello, world!" app on DACU]
[http://developer.android.com/index.html Android Developer Website]
[https://developer.android.com/training/index.html First project tutorial]