Posts

Showing posts from October, 2015

Android - Intents and Filters

Image
An Android  Intent  is an abstract description of an operation to be performed. It can be used with  startActivity  to launch an Activity,  broadcastIntent  to send it to any interested BroadcastReceiver components, and  startService(Intent) or  bindService(Intent, ServiceConnection, int)  to communicate with a background Service. The intent itself, an Intent object, is a passive data structure holding an abstract description of an operation to be performed. For example, let's assume that you have an Activity that needs to launch an email client and sends an email using your Android device. For this purpose, your Activity would send an ACTION_SEND along with appropriate  chooser , to the Android Intent Resolver. The specified chooser gives the proper interface for the user to pick how to send your email data. Intent email = new Intent ( Intent . ACTION_SEND , Uri . parse ( "mailto:" )); email . putExtra ( Intent . EXTRA_EMAIL , recipients ); email . putExtra