01 07 -android programming basics (cont)

Download 01  07 -android programming basics (cont)

Post on 15-Jan-2015




3 download

Embed Size (px)




<ul><li> 1. Hello World Sample </li></ul> <p> 2. Agenda Hello World !!! Interacting with Buttons Screen Navigation start Activity For Result Intents Activity Services Broadcast Receivers 3. Hello World !!! 1. Create a new Android Project Select File &gt; New &gt; Android Project 2. Fill out the project details Enter HelloWorld for Project Name Select Create new project in workspace Enter HelloWorld in App name. Enter com.enlume.HelloWorld in Package Name Enter HelloWorld in Activity name (and yes we want to create an Activity) 4. 5 5. 6 6. 7 7. 8 8. Interacting with Button 9 9. Interacting with Buttons 10 10. 11 11. Screen Navigation 12 12. 13 13. 14 14. 15 15. 16 16. 17 17. 18 18. Start Activity For Result 19. 20 20. 21 21. 22 22. 23 23. 24 24. Run hello world Select the root of the project. Click in the green play icon. Pick Android Project That will get the emulator going 25. The Android Manifest lists application details 26. The Android Manifest File This file must declare all activities, services, broadcast receivers and content provider of the application. It must also contain the required permissions for the application. For example if the application requires network access it must be specified here It can be thought as the deployment descriptor for an Android application. The "package" attribute defines the base package for the following Java elements "android:versionName" and "android:versionCode" specify the version of your application. intent filter registered defines that this activity is started once the application starts (action android:name="android.intent.action.MAIN"). The category definition (category android:name="android.intent.category.LAUNCHER" ) defines that this application is added to the application directory on the Android device. The "uses-sdk" part defines the minimal SDK version your application is valid for. 27. Questions? </p>