Hi, Dianne Hackborn

You mean I need call NfcAdapter.enableForegroundDispatch in every activity
of my app, right?

Thanks
Ding

2011/6/3 Dianne Hackborn <[email protected]>

> You very intentionally can't.  This is for you to handle the events when
> your UI is actually in the foreground with the user, not to steal them all
> the time you happen to be running.  If you want to do this in multiple
> activities, you can organize your code to share that common implementation
> between them but each must enable dispatching while it is in the foreground.
>
> On Fri, Jun 3, 2011 at 12:22 AM, Xiaoliang Ding <[email protected]>wrote:
>
>> hi, I am writing a NFC application. I use the
>> NfcAdapter.enableForegroundDispatch in an activity to make sure a NFC tag
>> detected event routing to this activity direct, not show other applications
>> which has capability to resolve this event. My question is when my
>> application is running, how to make sure the tag detected event routing this
>> activity direct even though this activity is inactive, because the
>> application has three activities.
>>
>>
>> Thanks
>> Ding
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to