1 / 23

Особенности разработки под мобильную платформу

Особенности разработки под мобильную платформу. Almaty GTUG, 2011 Ермек Жумагулов yermek.zhumagulov@gmail.com. "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." .

branxton
Download Presentation

Особенности разработки под мобильную платформу

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. Особенности разработки под мобильную платформу Almaty GTUG, 2011 Ермек Жумагулов yermek.zhumagulov@gmail.com

  2. "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone."  -- Bjarne Stroustrup

  3. Few reasons to go Mobile Application Development: Smart Phones Internet access anywhere Social networking Millions of mobile users Open standards Android market growing faster than App Store Just for fun 

  4. Android Runtime • Dalvik VM • Dex files • Compact and efficient than class files • Limited memory and battery power • Core Libraries • Java 5 Std edition • Collections, I/O etc…

  5. Application Building Blocks • Activities • Services • Content providers • Broadcast receivers • AndroidManifest.xml • Notifications

  6. Activities • An activity represents a single screen with a user interface; • An activity is implemented as a subclass of android.app.Activity;

  7. Services • Runs in the background to perform long-running operations or to perform work for remote processes; • Does not provide a user interface; • A service is implemented as a subclass of android.app.Service;

  8. Content providers • Manages a shared set of application data; • Useful for reading and writing data; • Implemented as a subclass of android.content.ContentProvider;

  9. Broadcast receivers • Component that responds to system-wide broadcast announcements; • Way to respond to external notification or alarms; • Apps can invent and broadcast their own Intent;

  10. Intents • is a simple message object that represents an “intention” to do something; • is an abstract description of an operation to be performed; • For activities and services, an intent defines the action to perform (for example, to "view" or "send" something); • For broadcast receivers, the intent simply defines the announcement being broadcast (for example, a broadcast to indicate the device battery is low includes only a known action string that indicates "battery is low").

  11. AndroidManifest.xml • Application level configuration file; • It describes the components of the application; • It declares which permissions the application must have;

  12. AndroidManifest.xml

  13. AndroidManifest.xml

  14. AndroidManifest.xml

  15. There is a common file structure for applications code Autogenerated resource list files images UI layouts constants

  16. UI layouts are in Java and XML setContentView(R.layout.hello_activity); //will load the XML UI file

  17. Performance

  18. Cloud To Device Computing • Android Cloud to Device Messaging (C2DM) makes it easier for mobile applications to sync data with servers. Many of the Google applications on Android already use push to keep their data fresh, for example Gmail, Contacts, Calendar. Starting with Android 2.2, C2DM allows third-party developers to use the same service.

  19. Chrome to Phone comprises a Chrome Extension, an Android Application, and a Google AppEngine server. All of the code is open sourced and serves as a nice example of how to use C2DM.

  20. ACTION_NEW_OUTGOING_CALL broadcast is sent whenever the user tries to initiate a phone call. There are several reasons that one would want to be notified about this, but we will focus on only 2: • To be able to reject an outgoing call; • To be able to rewrite the number before it is dialed. In the first case, an app may want to control what numbers can be dialed or what time of the day numbers can be dialed. Note that you should associate this receiver with the ACTION_NEW_OUTGOING_CALL broadcast in the manifest file for your application.

  21. Associatereceiver CallReceiver.java with the ACTION_NEW_OUTGOING_CALL broadcast in the AndroidManifest.xml • Autorun reciever and custom broadcast

  22. Android resources • Developers guide • Android developers blog • Stack Overflow

  23. Спонсоры Неизменным спонсором GTUG является Казахстанско-Британский Технический Университет, поддерживающий наши инициативы и предоставляющий замечательные аудитории для проведения встреч. Финансовым спонсором мероприятий GTUG является компания  Bee Software - молодая и успешная компания, разрабатывающая программное обеспечение для корпоративных заказчиков.

More Related