Translations:Android Training/Starting Another Activity/10/en

Aus Android Wiki
Version vom 20. Dezember 2015, 20:22 Uhr von FuzzyBot (Diskussion | Beiträge) (Neue Version von externer Quelle importiert)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

For the next activity to query the extra data, you should define the key for your intent's extra using a public constant. It's generally a good practice to define keys for intent extras using your app's package name as a prefix. This ensures the keys are unique, in case your app interacts with other apps.

  1. In the sendMessage() method, to finish the intent, call the startActivity() method, passing it theIntent object created in step 1.