Beruflich Dokumente
Kultur Dokumente
This is done as following Starting the activity by the method startActivityForResult(Intent, int) The result will come back through your onActivityResult(int, int, Intent) method
Handling results
In order to successfully handle the result, you must understand what the format of the result Intent will be.
Intent Filters
Intent Filters
For your application to serve an intent request ( may be a broadcast message) , it has to define an intent filter to tell the system that I can handle this request For example: Making your Phone Dialer app. To do this: Add an intent filter entry in the manifest file with the intent information your application can handle.
IntentFilter can match against actions, categories, and data (either via its type, scheme, and/or path) in an Intent.
Remember the sending mail example ?
Intent Filters
In order define the intents your activity can handle, your intent filter should fulfills the criteria of the Intent object : Action , Data and Category (discussed next)
Broadcast Receiver
Broadcast Receiver
System (or application) sends broadcast messages Only interested Receivers will be fired and an intent with the broadcast message info is sent to them. Receiver must have an intent filter that matches the intent action, category and type to be notified. The broadcast receiver extends BroadcastReceiver and should be registered as a receiver in an Android Application via the AndroidManifest.xml ( or dynamically via registerReciver() method)
OnReceive Method
Menus
Menu Types
Option Menu Appears when you click the menu button in your device Context Menu
Option Menu
Menu in XML
{
MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.game_menu, menu); return true; }
Context Menu
Context Menu
Menu Tutorial
http://developer.android.com/guide/topics/ui/menus.html