1.

Suppose you have wanted to share from one application to another application, how you will share that? And from another application how you will retrieve data from first application?

Answer»

For protecting the PRIVACY of an Android user we are using PERMISSION concept in android. When the application is trying to access user data like contact, Gallery they REQUESTING permission. Depending on the feature, the system might grant the permission automatically or might prompt the user to approve the request

  • UsesPermission: Specifies system permission that the user must grant in order for the app to operate correctly. Permissions are granted by the user when the application is installed.
<uses-permission android:name="string"        android:maxSdkVersion="integer" />
  • Permission: To enforce your own permissions, you must first declare them in your AndroidManifest.xml using one or more <permission> tags..Declares a SECURITY permission that can be used to limit access to specific components or features of this or other applications.
<permission android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY"        android:label="@string/permlab_deadlyActivity"        android:description="@string/permdesc_deadlyActivity"        android:permissionGroup="android.permission-group.COST_MONEY"        android:protectionLevel="DANGEROUS" />


Discussion

No Comment Found

Related InterviewSolutions