views:

195

answers:

3

Are the physical buttons that Android phones come with standard? Specifically the back, menu, home, and search button? In my applications I assume everyone has a back button so I don't bother putting in a "soft" button to go back to a previous screen.

For some reason I can't find any official documentation on this.

Looking at http://www.androphones.com/2010-android-phones.php it appears that all of the phones have at least the back, menu and home button.

Should I just assume all phones have a back button or do I have to always code one in my apps?

+1  A: 

If you are developing specifically for the android the back button is standard. The only other thing you could do is within the menu add a 'back' option, but it is redundant at best.

JonH
Thanks for a workaround/redundant solution!
Cameron
+2  A: 

I haven't been able to find any definitive answer one way or another. However, the documentation assumes there will always be a Back key that the OS responds to:

As the user moves from activity to activity, across applications, the Android system keeps a linear navigation history of activities the user has visited. This is the activity stack, also known as the back stack. In general, when a user starts a new activity, it is added to the activity stack, so that pressing BACK displays the previous activity on the stack. However, the user cannot use the BACK key to go back further than the last visit to Home. The adding of an activity to the current stack happens whether or not that activity begins a new task (as long as that task was started without going Home), so going back can let the user go back to activities in previous tasks. The user can get to tasks earlier than the most recent Home by selecting its root activity from the application launcher, a shortcut, or the "Recent tasks" screen.

Activities are the only things that can be added to the activity stack — views, windows, menus, and dialogs cannot. That is, when designing the navigation, if you have screen A and you want the user to be able go to a subsequent screen B and then use the BACK key to go back to screen A, then the screen A needs to be implemented as an activity. The one exception to this rule is if your application takes control of the BACK key and manages the navigation itself.

From http://developer.android.com/guide/practices/ui_guidelines/activity_task_design.html

Based on that, I would say it is safe to assume that there will always be a physical Back key.

Chris Thompson
Thanks for your answer!
Cameron
+2  A: 

The CDD describes what is required to be compatible:

http://source.android.com/compatibility/index.html

(See "Current CDD" on the left)

In this case:

8.7. Navigation keys

The Home, Menu and Back functions are essential to the Android navigation paradigm. Device implementations MUST make these functions available to the user at all times, regardless of application state. These functions SHOULD be implemented via dedicated buttons. They MAY be implemented using software, gestures, touch panel, etc., but if so they MUST be always accessible and not obscure or interfere with the available application display area. Device implementers SHOULD also provide a dedicated search key. Device implementers MAY also provide send and end keys for phone calls.

hackbod
Ahh I new it would be mentioned somewhere, I guess I overlooked it. Thanks!
Cameron