diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2015-01-06 19:31:33 +0100 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2015-01-06 19:31:33 +0100 |
commit | c9297eaf02dc58ef6faaed3b5d0cfdd048d16973 (patch) | |
tree | a2b25bfa64a9f9b9fb54d38e498f6ca5f82ef1c6 /main | |
parent | 59ff36ccb9a400f8626edbaba54ede1efeb0d0c4 (diff) | |
parent | 525d94c31353d81760b73cf79682dd1988fa407e (diff) | |
download | cgeo-c9297eaf02dc58ef6faaed3b5d0cfdd048d16973.zip cgeo-c9297eaf02dc58ef6faaed3b5d0cfdd048d16973.tar.gz cgeo-c9297eaf02dc58ef6faaed3b5d0cfdd048d16973.tar.bz2 |
Merge branch 'issue-4590' into upstream
Diffstat (limited to 'main')
-rw-r--r-- | main/src/cgeo/geocaching/activity/AbstractActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/activity/AbstractActivity.java b/main/src/cgeo/geocaching/activity/AbstractActivity.java index ba11958..4cddfe6 100644 --- a/main/src/cgeo/geocaching/activity/AbstractActivity.java +++ b/main/src/cgeo/geocaching/activity/AbstractActivity.java @@ -231,7 +231,14 @@ public abstract class AbstractActivity extends ActionBarActivity implements IAbs @Override public NdefMessage createNdefMessage(final NfcEvent event) { final String uri = sharingInterface.getAndroidBeamUri(); - return uri != null ? new NdefMessage(new NdefRecord[]{NdefRecord.createUri(uri)}) : null; + if (uri == null) { + return null; + } + final NdefRecord[] records = { + NdefRecord.createUri(uri), + NdefRecord.createApplicationRecord(CgeoApplication.getInstance().getPackageName()) + }; + return new NdefMessage(records); } }, this); |