I have created one simple application to send NDeF Record and display it in other device. Now i have deleted my P2P reader application from my device and download other TAG rader application. Now if i do tap that Tag Reader Application display my complete data which i don't want to allow.
P.S I have created the ndef record like
NdefRecord newNdefRecord = new NdefRecord(NdefRecord.TNF_EXTERNAL_TYPE,
"com.yash.test:yash".getBytes(), new byte[0], data);
Is it possible?
Not too clear what you want to do, but you generally cannot modify how the system handles NFC tags. If there are apps that have registered to handle the particular tag or NDEF format, the user will be given the option to select one of them. All you can do is use foreground dispatch to make sure your app handles the tag if it is in the foreground. If you want to hide your data, you can try encrypting it so that other apps cannot recover it. The key will need to be embedded in your app for this to work, so it is not terribly secure.