I want to beam the content of my currient screen. Basically I have three tabs with long lists, I want to beam the actual tab and its position.
My goal is if the app is installed:
Beam some id, the tab and position
If the app is not installed:
I want to offer a weblink like this http://example.com/viewer/42?tab=2
I'm playing with this code here:
adapter.setNdefPushMessageCallback(new CreateNdefMessageCallback() {
@Override
public NdefMessage createNdefMessage(NfcEvent event) {
return new NdefMessage(new NdefRecord[] {
NdefRecord.createExternal("com.example.android", "viewer", getData()),
NdefRecord.createUri(VIEWER_URL + id + "?tab=" + tab),
NdefRecord.createApplicationRecord("com.example.android"),
NdefRecord.createApplicationRecord("com.android.browser"),
});
}
}, this);
I would be happy if someone could explain me how that works and if this is not possible to explain me why this is impossible.