For those who are not yet familiar, Intent
's enable information to be transmitted from one screen to another as the user navigates the application.
An intent is an abstract description of an operation to be performed.
According to the documentation , below is the current values of type EXTRA_[...]
that can be used as extra data via putExtra (String, Bundle)
using the Intent
class. Remember that it is not only these that can be passed via Intent
. See:
- EXTRA_ALARM_COUNT
- EXTRA_BCC
- EXTRA_CC
- EXTRA_CHANGED_COMPONENT_NAME
- EXTRA_DATA_REMOVED
- EXTRA_DOCK_STATE
- EXTRA_DOCK_STATE_HE_DESK
- EXTRA_DOCK_STATE_LE_DESK
- EXTRA_DOCK_STATE_CAR
- EXTRA_DOCK_STATE_DESK
- EXTRA_DOCK_STATE_UNDOCKED
- EXTRA_DONT_KILL_APP
- EXTRA_EMAIL
- EXTRA_INITIAL_INTENTS
- EXTRA_INTENT
- EXTRA_KEY_EVENT
- EXTRA_ORIGINATING_URI
- EXTRA_PHONE_NUMBER
- EXTRA_REFERRER
- EXTRA_REMOTE_INTENT_TOKEN
- EXTRA_REPLACING
- EXTRA_SHORTCUT_ICON
- EXTRA_SHORTCUT_ICON_RESOURCE
- EXTRA_SHORTCUT_INTENT
- EXTRA_STREAM
- EXTRA_SHORTCUT_NAME
- EXTRA_SUBJECT
- EXTRA_TEMPLATE
- EXTRA_TEXT
- EXTRA_TITLE
- EXTRA_UID
To redeem all values saved in Intent
you can foreach
by traversing bundle
using keySet()
. See below:
if (bundle != null) {
for (String chave : bundle.keySet()) {
Object value = bundle.get(chave);
Log.d(TAG, String.format("%s %s (%s)", chave,
value.toString(), value.getClass().getName()));
}
}