Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ANE Android override Activity onNewIntent()

New Here ,
Jan 22, 2013 Jan 22, 2013

Hi,

I'm trying to create an NFC extension to be informed when a Tag is detected by the NFC sensor.

I guess i have more or less everything i need, expect that onNewIntent override.

In the JAVA samples i saw, as soon as we call enableForegroundDispatch on the NfcAdapter, the onNewIntent() method of the activity specified on the enableForegroundDispatch is called.

We have access to the Activity via the FREContext.getActivity() so i can specify the activity that will get the onNewIntent called, but as i can't really extend the FREContext class, i can't override this method to catch the intent.

Is there any way to achieve this?

Have a nice day !

TOPICS
ActionScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 24, 2013 Jan 24, 2013
LATEST

I found this solution that almost satisfies me :

http://forums.adobe.com/message/4491738?tstart=0#4491738

It's basically based on the fact that passing a tag in front on the NFC chips fires an InvokeEvent to the AIR's NativeApplication.

I'm just searching why i get only one of two tag IDs.

Even if i manually grab the last intent tag ID with the ANE i don't have the new tag but the previous one, until i pass the new tag a second time.

With a pure Java project overriding the onNewIntent as i wanted to do i have no problem. The onNewIntent() is called everytime a new tag is detected.

And for now, i have no idea what could be the source of my problem but i still search.

If anyone has an idea, i'll be glad to read it

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines