1.

What is the difference between these two syntaxes: android:uses-permission and uses-permission?

Answer»

An Intent object carries information that the Android system uses to determine which component to start. The Intent object contains information which is used either from the components that receive that intent or the Android system itself.

We are defining the Intent Filter in Manifest File. We can set the type of intents to accept perform some ACTION using these elements:

  • <action>:  Action defines the name of an intent action to be accepted and it must be a literal string value of an action, not the class constant. For example: Check BatteryLow, Boot
  • <category>: Category defines the name of an intent category to be accepted and the same action which is a literal string value, not the class constant.
  • <data>: Data defines the type of data to be accepted and by using one or more attributes we can specify various ASPECTS of the data URI (scheme, host, port, path) and MIME type.
<intent-filter>       <action android:name="android.intent.action.SEND" />       <category android:name="android.intent.category.DEFAULT" />       <data android:mimeType="text/plain" />     </intent-filter>


Discussion

No Comment Found

Related InterviewSolutions