Android

Android devices originally used four hardware buttons (see Figure 2.4) to support the user’s use of the device. These buttons were the Home button, the Menu button, the Search button, and the Back button. The user could press any of these buttons at any time during use of your app, which would impact the functioning of your app. The Home and Back buttons worked independently of your code, whereas the Menu and Search buttons provided functionality only if your app was specifically coded to use these buttons.

Image

Figure 2.4 Android hardware buttons.

However, more recent Android devices (running Android 3.0, API 11 and greater) have replaced ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.