aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/XmppActivity.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/XmppActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
index 222f32956..536025710 100644
--- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
@@ -38,6 +38,7 @@ import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
+import android.nfc.NfcAdapter;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.IBinder;
@@ -543,6 +544,13 @@ public abstract class XmppActivity extends Activity {
return false;
}
+ protected void registerNdefPushMessageCallback(NfcAdapter.CreateNdefMessageCallback callback) {
+ NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
+ if (nfcAdapter!=null && nfcAdapter.isEnabled()) {
+ nfcAdapter.setNdefPushMessageCallback(callback,this);
+ }
+ }
+
public AvatarService avatarService() {
return xmppConnectionService.getAvatarService();
}