| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Method enableForegroundDispatch and disableForegroundDispatch is not
implemented on some WearOS devices and will throw an exception.
Let's check if the NFC feature exists.
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegateMethod(QtApplication.java:157)
at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegate(QtApplication.java:146)
at org.qtproject.qt5.android.bindings.QtActivity.onResume(QtActivity.java:626)
at com.governikus.ausweisapp2.MainActivity.onResume(MainActivity.java:139)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7117)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1638)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.UnsupportedOperationException
at android.nfc.NfcAdapter.enableForegroundDispatch(NfcAdapter.java:1315)
at org.qtproject.qt5.android.nfc.QtNfc$1.run(QtNfc.java:135)
at android.app.Activity.runOnUiThread(Activity.java:6184)
at org.qtproject.qt5.android.nfc.QtNfc.start(QtNfc.java:111)
at org.qtproject.qt5.android.QtNative.updateApplicationState(Native Method)
at org.qtproject.qt5.android.QtNative.setApplicationState(QtNative.java:260)
at org.qtproject.qt5.android.QtActivityDelegate.onResume(QtActivityDelegate.java:1098)
... 16 more
See: https://stackoverflow.com/questions/48437854/huawei-watch-2-nfc-feature-not-available-android-wear-2-0
Change-Id: I0e2cad3dce1c3c0a2ea2545fcc6731e2621cdc38
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
c8e6dae2d9749179327df460755282cf5102e902 introduced this requirement.
Change-Id: If0b20a666d6dad999db05dfe311b0ed75aa333ff
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
To avoid polling of the NFC adapter state
a signal is added to the QNearFieldManager.
Change-Id: If9e1e8025cca2deb1338fa7db255ebe171cab823
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the pre-dexed JAR files activated by the absence of the
bundled_jar_file CONFIG option, as versions of Android >= 5 no longer
support this deployment mechanism.
Now, the "bundled" JARs simply become normal JARs containing class
files, and are neither activated by a bundled_jar_file CONFIG entry nor
do they have a -bundled suffix in the file's base name.
Task-number: QTBUG-62995
Change-Id: Ifc13542ff71844da7e80cefe9ff51e3d7cdfc830
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I28a165c7b7503b1c8159dd0c46f3f7450e599c74
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I4d125bbe7f18cb77dffc3747f33bba2b63b1a87d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Iacb162fd7254b8dee28a01dcb8fbdad257289ad3
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|