APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : SEMESTER 6

Year : 2018

Term : MARCH

Scheme : 2015 Full Time

Course Code : EC 312

Page:21





PDF Text (Beta):

android: label="@string/app_name"
android: theme="@style/AppTheme" >












8a. Intents and Intent Filters

An Intent is a messaging object you can use to request an action from another app component.
Although intents facilitate communication between components in several ways, there are three
fundamental use cases:

Starting an activity

An Activity represents a single screen in an app. You can start a new instance of an Activity by
passing an Intent to startActivity(). The Intent describes the activity to start and carries any necessary
data.

If you want to receive a result from the activity when it finishes, call startActivityForResult(). Your
activity receives the result as a separate Intent object in your activity's onActivityResult() callback.
For more information, see the Activities guide.

Starting a service

A Service is a component that performs operations in the background without a user interface. With
Android 5.0 (API level 21) and later, you can start a service with JobScheduler. For more information
about JobScheduler, see its API-reference documentation.

For versions earlier than Android 5.0 (API level 21), you can start a service by using methods of the
Service class. You can start a service to perform a one-time operation (such as downloading a file) by
passing an Intent to startService(). The Intent describes the service to start and carries any necessary
data. If the service is designed with a client-server interface, you can bind to the service from another
component by passing an Intent to bindService(). For more information, see the Services guide.

Delivering a broadcast

Similar Question Papers