Mobile application development: part 1: Andriod Vs IOS

813 views
639 views

Published on

Andriod Mobile Application development and comparison with IOS.
Part 1 basics: Activity, Intent , process lifecycle, activity Lifecycle.
More details: (blog: http://sandyclassic.wordpress.com ,
linkedin: ie.linkedin.com/in/sandepsharma/)

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
813
On SlideShare
0
From Embeds
0
Number of Embeds
234
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • All Mime types: http://www.webmaster-toolkit.com/mime-types.shtml http://www.freeformatter.com/mime-types-list.html
  • All Mime types: http://www.webmaster-toolkit.com/mime-types.shtml http://www.freeformatter.com/mime-types-list.html
  • Mobile application development: part 1: Andriod Vs IOS

    1. 1. Mobile Application Development Focus on Andriod Application development and compare it with IOS.
    2. 2. Basic Topics covered Session 1 Fragments : slide 3 Activity Lifecycle : slide 4 Configuration Changes : slide 5 Starting activity and getting results: slide 6,7 Saving persistent State: Slide 7 Permissions: Slide 8 Process Lifecycle: Slide 9.
    3. 3. Fragments • With Version Honeycomb Fragement class is optional for Activity Class for modularization. • Scale application between small and large screen. • public class ArticleFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.article_view, container, false); } }
    4. 4. Activity Class • Activity- Any single focused thing User Does. • Create window using setContentView(View). • Full screen or Floating Window using theme WindowIsFloating(). • Can be Grouped using class ActivityGroup • Initialized using onCreate(Bundle) which call setContentView() with layout resource defined to create UI. • findViewById(int) :retireve widget in that UI. • onPause() deal with user leaving your activity & changes commits ContentProvider holding data.
    5. 5. Visible Lifetime Foreground Lifetime Entire Lifetime
    6. 6. Configuration Changes • Resource.configuration Class allow UI undisturbed in case of changes in Configuration. • Even foreground activity visible to user killed once onDestroy() called and new activity created To allow Configuration driven resource handling of files etc. • Special case usin bypass using andriod:configChanges
    7. 7. Starting Activity & getting result • startActivity(Intent): used to start Activity. Placed in activity stack and intent describe activity to be executed. • Activity Exits must return RESULT_CANCELED, RESULT_OK or any custom value. •
    8. 8. Saving Persistent State • Actvity deals with two major States: • Shared document like data( on SQLite database using contentprovider) • Internal State: like user preferences. • While creating a new document a database entry is created. • When onPause() called the state content provider files of user is saved
    9. 9. Process Lifecycle • Application can have four states based on Activity Lifecycle. (As shown in diagram in slide2) If memory Not Available then All kinds of processes can be forced closed. • Foreground Activity: User interacts with user and process has least priority to be killed. • Visible Activity: Visible not in foreground killed only when conflict with foreground. • Background Activity: not visible or paused not critical can be safely killed restarted with onCreate() with savedInstanceState.(start from where left) • Empty process: hosting no activity killed highest priority
    10. 10. Intent • Abstract description of operation to be performed. startActivity: launch Activity BroadCastIntent(): send to Receiver startService(Intent): bindService(Intent, ServiceConnection,int): Bind to service • Structure: – Action: To be performed – Data: data to be operate on. – Category: addition info for execution like launch as top level or as alternative application – Type: Explicit typing of data intent (Normally MIME type). – Component: Component class for intent otherwise(Action,Data/Type, Category) is matched. – Extras: Bundle Additional data Like subject, Body with email.
    11. 11. Example Operations spec as Intent • Launch Home screen: ACTION_MAIN & CATEGORY_HOME • Display people phone Number, browse & pick: ACTION_GET_CONTENT & MIME TYPE (vnd.andriod.cursor.item/phone. • ACTION_GET_CONTENT with mime type Any (*/*) and Category CATEGORY_OPENABLE. ContentResolver.opemInputStream() pick & attach data return URI to caller. Mime Type list : http://www.freeformatter.com/mime-types- list.html
    12. 12. More Details: Cont. Next 4 more slides • Visit http://sandyclassic.wordpress.com • Java Architect : http://javaarchitectview.wordpress.com/ Enterprise Architect: http://enterprisearchitectview.wordpress.com • Cloud perspective : http://thecloudview.wordpress.com/ • Product Management: http://productmanagementview.wordpress.co m

    ×