Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mobile Development

540 views

Published on

Android Development

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Mobile Development

  1. 1. Mobile Development<br />
  2. 2. Name: Saurabh<br />Software Developer<br />
  3. 3. Location<br />
  4. 4.
  5. 5.
  6. 6. It’s yours, its personal, it’s never shared, even with..<br />It’s always on, until the battery runs out...<br />It’s always with you, until you loose it...<br />It is at the point of consumption, unless you forget it...<br />Providing personalisation, location, attention...<br />
  7. 7. Developer ?<br />
  8. 8. Platforms ?<br />
  9. 9. Who Owns/ maintains it ?<br />Development Language<br />MOBILE<br />PLATFORM<br />Distribution Channel<br />Development Tools<br />
  10. 10.
  11. 11.
  12. 12. OS Architecture<br />
  13. 13. Browser<br />Telephony<br />Maps<br />Accelerometer<br />Wifi & Bluetooth<br />3G/Edge/GPRS<br />Compass<br />Camera<br />Multi Touch<br />Audio Support<br />GPS<br />SQLLite<br />Opengl<br />
  14. 14. Activity<br />(Screen)<br />Service<br />(Background)<br />Broadcast<br />Receiver<br />(respond to events)<br />Content Provider<br />(Database/Directory)<br />Data Store(Playlist)<br />Alarm Manager<br />Notification Manager<br />Alarm Manager<br />http://developer.android.com/guide/topics/fundamentals.html<br />
  15. 15. Creating a Twitter app<br />
  16. 16. http://twitter.com<br />One time Authentication<br />(OAuth)<br />Splash Screen<br />Post Twit<br />Activity<br />I love Android…<br />Post<br />Twitter Feed<br />Settings<br />List Activity<br />Remove Account<br />
  17. 17. Twitt TWIT !!!<br />
  18. 18. Hello !<br />
  19. 19. Button,Textbox, List,Image, …<br />Linear Layout, Relative Layout,Table Layout, …<br />
  20. 20. onCreate<br />onStart<br />onResume<br />Foreground<br />LifeCycle<br />Complete LifeCycle<br />Visible LifeCycle<br />onPause<br />onStop<br />onDestroy<br />
  21. 21. How to display a list in android?<br />
  22. 22. Lifecycle and ANR<br />
  23. 23. AsyncTask<br />UI Thread<br />onPreExecute()<br />Activity<br />onCreate()<br />AsyncTask<br />onStart()<br />doInBackground()<br />onResume()<br />onPause()<br />onStop()<br />onPostExecute()<br />onDestroy()<br />UI Thread<br />
  24. 24. Relative Layout<br />Profile Name is aligned to the top and right of the image<br />TechNext<br />iPhone and Android event on 11 June, register for free and enjoy the ride…<br />Twit is aligned to the bottom and right of the image<br />
  25. 25. Service<br />Activity<br />Activity<br />Service<br />Activity<br />Activity<br />
  26. 26. startService(Intent)<br />Activity<br />bindService(Intent, ServiceConnection, …)<br />Service<br />socialService = <br />ISocialService.Stub.asInterface(service);<br />onStart()<br />socialService.getFeed()<br />ISocialService.aidl<br />
  27. 27. Working in background?<br />
  28. 28. Service<br />void onCreate(){<br />}<br />//called every startService()<br />void onStartCommand(intent ){<br /> if(intent == xyz){<br />doxyz();<br /> }<br />}<br />void onDestroy(){<br />}<br />Intent<br />Activity<br />Action = xyz<br />Data = 123<br />startService<br />
  29. 29. void onCreate(){<br />}<br />//called every startService()<br />void onStartCommand(intent ){<br /> if(intent == xyz){<br />doxyz();<br /> }<br />}<br />void onDestroy(){<br />}<br />bind<br />Activity<br /><<ISocialService>><br />InstanceofISocialService<br />List<Twit> getSocialFeed();<br />Interact with api calls<br />
  30. 30.
  31. 31. Has my application broadcasted some event?<br />Network is Wifior Network is 3G?<br />Keeping yourself<br />Am I on Roaming ?<br />Is my battery dying?<br />Am I low on disk space?<br />
  32. 32. Activity<br />registerReceiver(BroadcastReceiver)<br />Intent<br />Data: level-50<br />BoadcastReceiver<br />50%<br />onReceive(Intent)<br />Battery Indicator<br />
  33. 33. Scheduling actions<br />
  34. 34. AlarmManager<br />5000 milliseconds<br />Pending Intent<br />Repeating Task<br />setRepeating<br />Trigger after 5 seconds<br />
  35. 35. “I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone.” <br />-BjarneStroustrup<br />
  36. 36. Twitter code and all code shown here is available HERE<br />https://code.google.com/p/droidtwit/<br />

×