1 / 14

Rajab Davudov

Android laşdırdıqlarımızdansınızmı ?. Rajab Davudov. Agenda. Eclipse, ADT and Android SDK APK file Fundamentals Activity Service Content Provider Broadcast Receiver Intent Hello World Fake Login App Play-Back Service. Eclipse + ADT + Android SDK.

Télécharger la présentation

Rajab Davudov

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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. Eclipse + ADT + Android SDK • Download Eclipse IDE for Java Developers from http://eclipse.org/downloads/ • Menu [Help/Install New Software] add ADT site https://dl-ssl.google.com/android/eclipse/ • Download SDK • Tools • Android Platforms 4.0, 3.2, … ,2.3.3,2.2, … • Extras

  4. APK File • AndroidManifest.xml • Activity, Service etc. list • Permissions and Features • classes.dex • Dalvikbytecodes • resources.arsc • Information about resources • res/ • Resource Files

  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. 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 application's manifest file.

  7. Content Provider • Content providers store and retrieve data and make it accessible to all applications. They're the only way to share data across applications; there's 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. 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 don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs.

  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. Practice Apps • Hello World • Fake Login App • Play-Back Service

  11. Think, Design, Code !!!

  12. Rajab Davudov Senior Developer at Azerfon radjab@gmail.com https://market.android.com/developer?pub=RADJAB http://gplus.to/radjab http://www.fb.me/rajab.davudov http://www.linkedin.com/in/radjab Market QR Code

More Related