From b33940abca9d43891575f58a1107c8ec247afed1 Mon Sep 17 00:00:00 2001 From: Doug Kramer Date: Tue, 2 Jun 2009 12:17:49 -0700 Subject: AI 149494: Minor improvements to wording in design tips for missing activity and notifications See latest document at: http://doog:9000/guide/practices/ui_guidelines/activity_task_design.html Automated import of CL 149494 --- .../ui_guidelines/activity_task_design.jd | 97 +++++++++++++--------- 1 file changed, 56 insertions(+), 41 deletions(-) diff --git a/docs/html/guide/practices/ui_guidelines/activity_task_design.jd b/docs/html/guide/practices/ui_guidelines/activity_task_design.jd index bec0e436a7a5..e2fc89c6ddba 100644 --- a/docs/html/guide/practices/ui_guidelines/activity_task_design.jd +++ b/docs/html/guide/practices/ui_guidelines/activity_task_design.jd @@ -34,11 +34,11 @@ page.title=Activity and Task Design Guidelines
  • Design Tips
    1. Don't specify intent filters in an activity that won't be re-used
    2. -
    3. Don't define your own URI schemes
    4. -
    5. Handle where a re-used activity is missing
    6. + +
    7. Handle case where no activity matches
    8. Consider how to launch your activities
    9. Allow activities to add to current task
    10. -
    11. Notifications should be easy to return from
    12. +
    13. Notifications should let user easily get back
    14. Use the notification system
    15. Don't take over BACK key unless you absolutely need to
    @@ -49,7 +49,6 @@ page.title=Activity and Task Design Guidelines
    1. Application Fundamentals
    2. -
    3. Activities and Tasks blog post
    @@ -630,12 +629,12 @@ page.title=Activity and Task Design Guidelines

    When the user takes an action on some data, such as touching a mailto:info@example.com link, they are actually initiating an Intent - object which then gets resolved to a particular component (we will - consider only activity components here). So, the result of a user - touching a mailto: link is an Intent object that the system tries to - match to an activity. If that Intent object was written explicitly - naming an activity (an explicit intent), then the system - immediately launches that activity in response to the user + object, or just an intent, which then gets resolved to a + particular component (we consider only activity components here). + So, the result of a user touching a mailto: link is an Intent object + that the system tries to match to an activity. If that Intent object was + written explicitly naming an activity (an explicit intent), + then the system immediately launches that activity in response to the user action. However, if that Intent object was written without naming an activity (an implicit intent), the system compares the Intent object to the intent filters of available activities. If more @@ -872,12 +871,29 @@ page.title=Activity and Task Design Guidelines

    Your applications can re-use activities made available from other - applications. In doing so, you cannot presume that external activity - will always be present — you must handle the case that the - external activity is not installed. Do this in the way you find most - appropriate, such as dimming the user control that accesses it (such - as a button or menu item), or displaying a message to the user that - sends them to the location to download it, such as the Market. + applications. In doing so, you cannot presume your intent will always + be resolved to a matching external activity — you must handle the case + where no application installed on the device can handle the intent. +

    + +

    + You can either test that an activity matches the intent, which you can do + before starting the activity, or catch an exception if starting the + activity fails. Both approaches are descibed in the blog posting + Can + I use this Intent?. +

    + +

    + To test whether an intent can be resolved, your code can query the package manager. + The blog post provides an example in the isIntentAvailable() helper method. + You can perform this test when initializing the user interface. + For instance, you could disable the user control that initiates + the Intent object, or display a message to the user that lets them go + to a location, such as the Market, to download its application. + In this way, your code can start the activity (using either startActivity() + or startActivityForResult()) only if the intent has tested to resolve + to an activity that is actually present.

    Consider how you want your activities to be launched or used by other applications

    @@ -1054,15 +1070,14 @@ page.title=Activity and Task Design Guidelines

    -

    Notifications should be easy for the user to return from

    - -

    - Applications that are in the background or haven't been run can - send out notifications to the user letting them know about events - of interest. For example, Calendar can send out notifications of - upcoming events, and Email can send out notifications when new - messages arrive. One of the user interface rules is that when the - user is in activity A and gets a notification for activity B and +

    Notifications should let the user easily get back to the previous activity

    +

    + Applications that are in the background or not running can have + services that send out notifications to the user letting them know about + events of interest. Two examples are Calendar, which can send out notifications of + upcoming events, and Email, which can send out notifications when new + messages arrive. One of the user interface guidelines is that when the + user is in activity A, gets a notification for activity B and picks that notification, when they press the BACK key, they should go back to activity A. 

    @@ -1108,11 +1123,11 @@ Notifications generally happen primarily in one of two ways:

    There are other ways to handle notifications, such as bringing the - activity to the foreground set to display specific data, such as the - ongoing text message thread of a particular person. + activity to the foreground, set to display specific data, such as + displaying the text message thread for the person who just sent a + new text message.

    -- cgit v1.2.3-59-g8ed1b