I know that setting android:exported="false" will restrict other applications from using/accessing my application components.
Does setting this attribute will restrict the system as well from using/accessing my components? i doubt.
for example, i have the following receiver:
<receiver
android:name="ConnectivityManager"
android:label="NetworkConnection"
android:exported = "false" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
The receiver is still receiving broadcasts from the system once the connection state changes (on/of).
Does this mean that the system calls/access can never be stopped? Please illustrate.
Google‘s online document does not describe this clearly.
From the real result, the receiver can still be triggered by system broadcast even if set exported="false".
Yes, if exported="false", it will still respond to system broadcasts such as connectivity changes. This is easy to test by using your above broadcast-receiver and toggling airplane mode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With