I came to know that, we can open one application from other application in android. So I am using android:exported="false" in order to restrict that. But when I put same tag for Launcher, then I am not able to open the application.
<activity
android:name="SplashScreen"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
(Because my application should be able to open any file, I am applying 2 intent filters)
android:exported
Whether or not the activity can be launched by components of other applications — "true" if it can be, and "false" if not. If "false", the activity can be launched only by components of the same application or applications with the same user ID.The default value depends on whether the activity contains intent filters. The absence of any filters means that the activity can be invoked only by specifying its exact class name. This implies that the activity is intended only for application-internal use (since others would not know the class name).So in this case, the default value is "false". On the other hand, the presence of at least one filter implies that the activity is intended for external use, so the default value is "true".This attribute is not the only way to limit an activity's exposure to other applications. You can also use a permission to limit the external entities that can invoke the activity (see the permission attribute).
As you are using
intent-filterwhateveractivitythat satisfies yourintent-filtercan open up youractivity.To Fully restrict your activity to use by another application
1.
Don't include any intent-filter2.
Add android:exported="false" inside your <activity> tag