-2

i know how to add permissions for application like internet permission and read-write external directory permissions

but i'm asking how to add permissions for each activity in order to avoid bypassing of activities.

how can we provide security in android app.

Jayanth
  • 5,954
  • 3
  • 21
  • 38

1 Answers1

1

i'm asking how to add permissions for each activity in order to avoid bypassing of activities

There is nothing in the Android permission system that has anything to do with "avoid bypassing of activities".

Hence, I am going to interpret your question and follow-up comments on your question as:

I have seen where some apps allow users to bypass certain activities in other apps, effectively "deep linking" into them. In my case, this will skip past an authentication activity that I want to show. How can I stop this?

The only activities that third-party apps can send users to are ones that are exported in your app. An activity is exported if either:

  • You have android:exported="true" on its <activity> element, which is unusual, or

  • You have an <intent-filter> on the <activity>, which is more common

Only have <intent-filter> elements on activities that you specifically want third-party apps to link to. Remove any <intent-filter> elements from any other activities. This will prevent "bypassing of activities", except for those activities where you want direct external access.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491