Introduction to Android OS Димитър Н. Димитров Astea Solutions AD
What I’ll try to talk about the mobile environment what is Android tools of the trade
What I’ll probably end up talking about the mobile environment what isn’t Android why iOS is not exactly better Mac + Android SDK = WIN Objective-C vs Java why should you use what Android offers
What you should remember do I like developing in the mobile environment? what can I do with Android? where should I start?
5
The alternatives
What is Android? “Android is a software stack for mobile devices that includes an operating system, middleware and key applications.” Google 3:16
8 Before
9
10 Before
11 Before
12 Before
13 After
14 After
15 After
16 After
So, Android applications? Java vs AJAX (JavaScript) vs Android NDK (C, C++) multiple applications running simultaneously background services “everybody is equal” ecosystem
Android Market $25 registration fee developer receives 70% of each sale (AppStore, much?) remaining amount goes to carriers
19
20 Aaaand... the new stuff Android 3.x –action bar, clipboard, drag & drop... Fragments Loaders Animation Framework Renderscript –Android games are not limited to awful anymore, NDK also got more awesome In-app billing
21
22 Before
23 ______ BroadcastReceiver
Intent “...a simple message object, representing the intention to do something...” usually the “glue”, which binds all the bits & pieces of your application together –they start Activities, Services and BroadcastReceivers used for intra- and inter-application communication and integration (your app as default browser? why not!) can carry metadata information or even objects not meant for general data transfer purposes
Activity usually a single screen in your application usually one Activity is designated as the entry point of your application can also occupy a floating window can also return a value to another Activity
Service one of the most important components, if you want to –perform time- and CPU-consuming operations –provide services for other apps do not run in separate thread by default can operate in their own process (independent from your application lifecycle) can be either remote or bound, depending on their intended purpose can run indefinitely or can be bound for some apps
AndroidManifest.xml
28 UI in Android Android comes with a lot of great components Your UI can generally be declared in two ways: via XML in layout resource files via Java, directly in the code the first approach is preferable, as it’s simpler, shorter and easier to maintain some functionality can be implemented only with the second approach however, this should affect less than 1-5% of your UI 32
Our awesome project draft form make sure to fit in the 2 weeks constraint, as this 10% assignment will have further after-effects on your project follow the recommended format of 5-6 team members in what situation this experience will be helpful? how about in every software-related job available now?
Our awesome project syllabus 1. Introduction to Android OS ✔ 2. Activities & Lifecycle ? 3. Resources & AndroidManifest.xml ? 4. Building UI Components ? 5. User interaction - touch events, keyboard ? 6. Intents & Broadcast receivers ? 7. Working in the Background ? 8. Content providers & Data storage ? 9. Widgets & Fragments ? 10. Graphics, Animation framework & Renderscript ? 11. Android APIs - Maps, NFC, Geolocation, FB/TW ?
Q&A + Feedback feel free to give your feedback no eggs or tomatoes throwing, please what would you like changed in our next lecture?
Recommended resources