You can set android:exported="false"
for the activity in your manifest:
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.