summaryrefslogtreecommitdiffstats
path: root/src/android/nfc/src/org/qtproject/qt5/android/nfc/QtNfc.java
Commit message (Collapse)AuthorAgeFilesLines
* Add NFC API method isSupportedAndrew O'Doherty2018-03-151-0/+5
| | | | | | | | 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>
* Fix detecting simple NFC tagsOleg Evseev2017-03-311-6/+9
| | | | | | | | | Before this patch Qt NFC detects only NDEF tags and signals targetDetected/targetLost are never fired for simple tags Task-number: QTBUG-59455 Change-Id: Ic868b6d66f35f790f6aba0ec30afc96fa32a5b6a Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
* Allow using nfc when running as a serviceLars Schmertmann2017-01-271-11/+15
| | | | | | | | | | | | | With this change it will be possible to use a tag injected from outside when running as a service. Intent newIntent = new Intent(); newIntent.putExtra(NfcAdapter.EXTRA_TAG, tag); QtNative.onNewIntent(newIntent); Task-number: QTBUG-57646 Change-Id: I628d4357f023a0926e7d61914b39278342ac7161 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Avoid app crash on android when using nfc within a serviceLars Schmertmann2017-01-261-0/+2
| | | | | Change-Id: I28a165c7b7503b1c8159dd0c46f3f7450e599c74 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Prepare QtNfc for Android Service supportAlex Blasche2016-08-311-3/+8
| | | | | | | | | It cannot really be fixed sind Android's NFC API requires Activity objects. We merely ensure that the service case is discovered early, reported accordingly and documented properly. Change-Id: If75856eea3da5c6283a3cb988daffd7a36cc02a7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add the feature to get the nfc intent that startet the appPeter Rustler2015-03-181-0/+14
| | | | | | | | | | | | To support this one have to add a AndroidManifest.xml file to the project. In that file an intent filter should be added to get nfc intents while in backround.. The corkboard example was extended to have an example for this new feature. Change-Id: I108afd88f9e5a548d62245591ebef11de8eb0d81 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Catch the exception for disableForegroundDispatch for AndroidPeter Rustler2015-03-181-2/+7
| | | | | | | | | | | In Android Nfc disableForegroundDispatch must be called while the activity is still in foreground. We catch the thrown exception if we do call disableForegroundDispatch while we are in background. Change-Id: I396ee3fcb7c7ea835d7d5ed2cb31bf0a8cabb0a8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Adapt to the new "onResumePause" APIPeter Rustler2015-03-181-4/+6
| | | | | | | | | | | | | | | | | In Anroid the foreground activity get an onResume/onPause by implemmenting callbacks. This callback will be called from android when your activity go into foreground or background. In Nfc we need to know if we are the activity in foreground for calling enableForegroundDispatch. In Android this is mandatory. To support this callback an API was added in qtbase. This patch implement an listener of this API to get that events and use some logic to enable and disable foreground dispatch of nfc tags. Change-Id: Ibceed51c5d5905a28f01081027fdf5e0e8b4ef12 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove the throwing code in Nfc enableForegroundDispatch for AndroidPeter Rustler2015-03-041-2/+3
| | | | | | | | | | | | | | In Android Nfc enableForegroundDispatch must not be called while the activity is not in foreground. We have no API in current Qt to know if we are in foreground. For that we would need to be informed when a onPause/onResume in the activity was called. Then we should enable the dispatch when in foreground and disable while we are not. This Patch removes the code that throw if we do it anyway. Change-Id: I3bff7ba3f23b5ef2665f4c7f164a0bacd3e1c2d2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update Digia headers to QtCompany headersAlex Blasche2015-03-021-22/+14
| | | | | Change-Id: Iacb162fd7254b8dee28a01dcb8fbdad257289ad3 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Removed the listening for other tags than ndefPeter Rustler2015-02-021-1/+17
| | | | | | | | | | | The current implementation of nfc for Android does not support other nfc tags than ndef. This patch removes the listening for other tag technologies. Change-Id: Id8303e50bd52d641b6de8d382e485ba7417e8c09 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add exception handling to enableForegroundDispatchPeter Rustler2015-02-021-1/+5
| | | | | | | | | | If the activity is not in foreground the call to enableForegroundDispatch can throw an exception. Exception handling is added in this patch. Change-Id: Id9adbf25de4840679f0c4754c136f6195527c0f3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Adapt to the new "onNewIntent" APIPeter Rustler2015-02-021-7/+0
| | | | | | | | | | | | | In Anroid the foreground activity get an intent by implemmenting onNewIntent callback. This callback will be called from android when a nfc tag is in range. To support this callback an API was added in qtbase. This patch implement an listener of this API to get nfc events. Change-Id: I9ecadf6db53fe1269cb9e66f0062e9ce1ec5a95e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Cleanup of directory structure and pro files for NFC for AndroidPeter Rustler2015-02-021-0/+139
After squashing the nfc related build files were in folder jar. This should be named nfc. Additionally the files in that folder became a cleanup and missing values in pro/pri/xml files were added. Change-Id: I2da12c516b3cce6c4f7a7c35b37316ed343a5782 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>