Log in or register to post comments

NFC with Vuforia and Unity 3D

January 29, 2013 - 5:10am #1

Hi,

I try to make a NFC application with Vuforia unity. To make this i first read these three documents :

- http://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc.html
- http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html
- https://developer.vuforia.com/forum/faq/unity-how-can-i-extend-unitys-android-activity

So, I wrote a java plugin for unity3d and extends the QCARNativeActivityPlayer to catch nfc events. It works, i can read NFC tag with augmented reality.

But when I flash a tag, the camera turn off for one second. I feel the QCAR activity is put to background while the intent catch nfc event and returns to foreground after.

I would like to get QCAR activity always on top when receive nfc event and don't have blackscreen while the intent manages nfc. But i don't know how to do this.

Can you help me ?

thanks you in advance

 

 

NFC with Vuforia and Unity 3D

July 21, 2019 - 7:55pm #9

do you have answer?

NFC with Vuforia and Unity 3D

February 25, 2013 - 5:13am #8

For now we are stuck on this problem. We choose to get along with the black screen (as a feature ;-)  

if we solve this problem, be sure we will post the solution.

 

NFC with Vuforia and Unity 3D

February 5, 2013 - 1:14am #7

Any update?

NFC with Vuforia and Unity 3D

January 29, 2013 - 8:40am #6

Interesting... if you make any progress on this, feel free to share here, I presume other developer might be interested in this topic.

NFC with Vuforia and Unity 3D

January 29, 2013 - 8:30am #5

ok, thanks for information, i look that.

I found this topic which say that impossible to handle nfc in background. 

http://stackoverflow.com/questions/9485819/android-nfc-read-tags-issue-activity-starts-each-time-on-data-received/9490726#9490726

I continue my research.

NFC with Vuforia and Unity 3D

January 29, 2013 - 7:41am #4

I see. Actually NFC is a very specific feature of Android and I'm not expert of this particular feature, but if you can't use AsyncTask, perhaps you might check whether it is possible to use IntentService (i.e. which is an intent to start a sort of asynchronous service running in background).

 

NFC with Vuforia and Unity 3D

January 29, 2013 - 7:08am #3

Thank for your response but NFC event is handle by Android Application Record and we can't catch it with AsyncTask. On the documentation of android they recommande to use PendingIntent and Intent to achieve this task.

But i'm not familiar with android development, so i maybe wrong.

NFC with Vuforia and Unity 3D

January 29, 2013 - 6:46am #2

Have you considered using an AsyncTask isntead of an Intent ?

http://developer.android.com/reference/android/os/AsyncTask.html

 

Log in or register to post comments