EditText fld=(EditText)findViewById(R.id.field);. public void onCheckedChanged(CompoundButton buttonView,. RadioGroup orientation;. . Figure 17-7. Editing a text preference. • #RRGGBB. The exception is if theBroadcastReceiver is implemented on some longer-lived component, such as an activity or service— in that case, the intent receiver lives as long as its “host” does (e.g., until the activity is frozen). However, in this case, you cannot declare the intent receiver viaAndroidManifest.xml. Instead, you need to callregisterReceiver() on yourActivity’sonResume() callback to declare interest in an intent, then callunregisterReceiver() from yourActivity’sonPause() when you no longer need those intents.. Upon being clicked, the button creates theACTION_PICK on the user-supplied collectionUri and starts the sub-activity. When that sub-activity completes withRESULT_OK, theACTION_VIEW is invoked on the resulting contentUri.. 2. Create aNotification object with our icon (red ball), a message to flash on the status bar as the notification is raised, and the time associated with this event.. Android, not surprisingly, integrates Google Maps. There is a mapping activity available to users straight off the main Android launcher. More relevant to you, as a developer, areMapView andMapActivity, which allow you to integrate maps into your own applications. Not only can you display maps, control the zoom level, and allow people to pan around, but you can tie in Android’s location-based services to show where the device is and where it is going.. • Determine if the phone is in use viagetCallState(), with return values ofCALL_STATE_IDLE (phone not in use),CALL_STATE_RINGING (call requested but still being connected), andCALL_STATE_OFFHOOK (call in progress).