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.

Rajab Davudov - Androidlaşdırdıqlarımızdansınızmı ?


Published on

Rajab Davudov
Androidlaşdırdıqlarımızdansınızmı ?

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Rajab Davudov - Androidlaşdırdıqlarımızdansınızmı ?

  1. 1. Rajab Davudov
  2. 2. Agenda• Eclipse, ADT and Android SDK• APK file• Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent• Hello World• Fake Login App• Play-Back Service
  3. 3. Eclipse + ADT + Android SDK• Download Eclipse IDE for Java Developers from• Menu [Help/Install New Software] add ADT site• Download SDK – Tools – Android Platforms 4.0, 3.2, … ,2.3.3,2.2, … – Extras
  4. 4. APK File• AndroidManifest.xml – Activity, Service etc. list – Permissions and Features• classes.dex – Dalvik bytecodes• resources.arsc – Information about resources• res/ – Resource Files
  5. 5. Activity• An Activity is an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map• Each time a new activity starts, the previous activity is stopped, but the system preserves the activity in a stack (the "back stack").• There are several callback methods that an activity might receive, due to a change in its state—whether the system is creating it, stopping it, resuming it, or destroying it• You must declare your activity in the manifest file in order for it to be accessible to the system.• You can start another activity by calling startActivity(), passing it an Intent that describes the activity you want to start.
  6. 6. Service• A Service is an application component that can perform long-running operations in the background and does not provide a user interface.• Once started, a service can run in the background indefinitely, even if the component that started it is destroyed.• A bound service offers a client-server interface that allows components to interact with the service, send requests, get results, and even do so across processes with interprocess communication (IPC).• onStartCommand() and onBind()• Like activities (and other components), you must declare all services in your applications manifest file.
  7. 7. Content Provider• Content providers store and retrieve data and make it accessible to all applications. Theyre the only way to share data across applications; theres no common storage area that all Android packages can access.• How a content provider actually stores its data under the covers is up to its designer. But all content providers implement a common interface for querying the provider and returning results — as well as for adding, altering, and deleting data.• Each content provider exposes a public URI (wrapped as a Uri object) that uniquely identifies its data set. android.provider.Contacts.Phones.CONTENT_URI• Abstract methods – query() – insert() – update() – delete() – getType() – onCreate()
  8. 8. Broadcast Receiver• A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured.• Although broadcast receivers dont display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs.
  9. 9. Intent• Three of the core components of an application — activities, services, and broadcast receivers — are activated through messages, called intents.• The intent itself, an Intent object, is a passive data structure holding an abstract description of an operation to be performed.• Contains – Component Name – Action – Data – Extras – Category – Flags
  10. 10. Practice Apps• Hello World• Fake Login App• Play-Back Service
  11. 11. Ready, Steady, Code !!!
  12. 12. Rajab Davudov Senior Developer at Azerfon radjab@gmail.com Market QR Code