summaryrefslogtreecommitdiffstats
path: root/src/nfc/android
diff options
context:
space:
mode:
authorAndrew O'Doherty <andrew.odoherty@qt.io>2018-03-07 11:14:24 +0100
committerAndrew O'Doherty <andrew.odoherty@qt.io>2018-03-15 11:34:28 +0000
commit8cdd3ed68bacfccfdbe719ef03f9f57ff3aa48eb (patch)
treed0a6ccdb00f46adb1c4b6c9344253876f5b6fdcc /src/nfc/android
parent51d20c548e65b8020ba9c5834ea84d1df57b6cf9 (diff)
Add NFC API method isSupported
Add API method isSupported to allow to check if the device supports NFC Task-number: QTBUG-62169 Change-Id: I4ff7f06348ecc902e66ee79bdd8abde672578904 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/nfc/android')
-rw-r--r--src/nfc/android/androidjninfc.cpp5
-rw-r--r--src/nfc/android/androidjninfc_p.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/nfc/android/androidjninfc.cpp b/src/nfc/android/androidjninfc.cpp
index f21d3b08..9a1c5227 100644
--- a/src/nfc/android/androidjninfc.cpp
+++ b/src/nfc/android/androidjninfc.cpp
@@ -63,6 +63,11 @@ bool isAvailable()
return QAndroidJniObject::callStaticMethod<jboolean>(nfcClassName,"isAvailable");
}
+bool isSupported()
+{
+ return QAndroidJniObject::callStaticMethod<jboolean>(nfcClassName,"isSupported");
+}
+
bool stopDiscovery()
{
return QAndroidJniObject::callStaticMethod<jboolean>(nfcClassName,"stop");
diff --git a/src/nfc/android/androidjninfc_p.h b/src/nfc/android/androidjninfc_p.h
index 746a93ee..60e9a107 100644
--- a/src/nfc/android/androidjninfc_p.h
+++ b/src/nfc/android/androidjninfc_p.h
@@ -71,6 +71,7 @@ bool startDiscovery();
bool stopDiscovery();
QAndroidJniObject getStartIntent();
bool isAvailable();
+bool isSupported();
bool registerListener(AndroidNfcListenerInterface *listener);
bool unregisterListener(AndroidNfcListenerInterface *listener);
QAndroidJniObject getTag(const QAndroidJniObject &intent);