Skip to content Skip to sidebar Skip to footer

Making Nfc Activity Private Without Android:exported=false

I have an NFC activity which specifies an intent filter and data. This is something like

Solution 1:

If you need to get notified about tags, you need the intent filter. The tag dispatcher uses this to find interested activities to consider when a tag is scanned. If you make your activity private, there will be no way of notifying it, as you have seen. What 'malicious attacks' are you concerned about? Your activity is as safe as you code it to be: if you only handle NFC intents, you will be 'safe' (unless of course the NFC payload triggers a device-wiping code or something...)


Post a Comment for "Making Nfc Activity Private Without Android:exported=false"