[android-developers] Re: NFC P2P pattern: Receive first, via NPP, and respond after also via NPP
hi Cruz: I've successfully established a LLCP connection between a SCL3711 desktop reader (using nfcpy) and a Nexus S. I've also implemented NPP client and server support so I can send NDEF messages from the desktop and receive them on the Android, and vice-versa. Now i'm trying the same work like yours.I want to communication between my desktop reader and my Nexus S via the p2p.So could you help me some documents or some codes about the nfcpy. But I am struggling with the Android NFC API to accomplish something as simple as receiving a NPP message first, and then sending a response also via NPP. This is because the enableForegroundNdefPush() call has to be executed on the onResume() method and the NdefPushClient only sends the message if it is available as soon as the LLCP channel is established. In my use case the phone would be put next to my reader, which would trigger the establishment of a LLCP channel, and the reader would push an NDEF message. My application is launched, it is the only one that catches that specific intent, and produce a NDEF response based on the NDEF received and would push it to the reader via enableForegroundNdefPush(). But by now the LLCP channel is established, so the message does not get sent, and my application is processing the onNewIntent() method so I can't use enableForegroundNdefPush(). Am I doing something wrong? Surely this simple use case must be possible to implement. Thanks, André In your user case,Your Nexus S phone tap the desktop reader,the desktop reader send a NDEF message to the phone via the p2p,am i think right?In my activity,i have add a ndef filter,after i got the action of NfcAdapter.ACTION_NDEF_DISCOVERED,then Parcelable[] msgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); My code like this ,it can be possible to implement? Thanks for any help. tommy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC P2P pattern: Receive first, via NPP, and respond after also via NPP
Nevermind… I just needed an agent on the Debian side to perform the SSP JustWorks pairing. Thanks, André On 14 Jun, 21:38, André Cruz andrefc...@gmail.com wrote: Bluetooth with createInsecureRfcommSocketToServiceRecord() or listenUsingInsecureRfcommWithServiceRecord() would be an option, so that pairing is not needed, but I've yet to successfully establish a RFCOMM channel this way with devices other than Androids. In my case I'm trying to establish a connection with a Debian system and I can't seem to configure the Bluez framework there to create these insecure channels, it always requires pairing… Best regards,André On 9 Jun, 13:20, Nick Pelly npe...@google.com wrote: The current NPP API's do not encourage the use of NPP for challenge/response. However you can use NPP to exchange enough information to switch to Bluetooth, for which we have public API's for an RFCOMM channel. Cheers, Nick On Mon, May 30, 2011 at 1:02 PM,AndréCruz andrefc...@gmail.com wrote: Hello. I've successfully established a LLCP connection between a SCL3711 desktop reader (using nfcpy) and a Nexus S. I've also implemented NPP client and server support so I can send NDEF messages from the desktop and receive them on the Android, and vice-versa. But I am struggling with the AndroidNFCAPI to accomplish something as simple as receiving a NPP message first, and then sending a response also via NPP. This is because the enableForegroundNdefPush() call has to be executed on the onResume() method and the NdefPushClient only sends the message if it is available as soon as the LLCP channel is established. In my use case the phone would be put next to my reader, which would trigger the establishment of a LLCP channel, and the reader would push an NDEF message. My application is launched, it is the only one that catches that specific intent, and produce a NDEF response based on the NDEF received and would push it to the reader via enableForegroundNdefPush(). But by now the LLCP channel is established, so the message does not get sent, and my application is processing the onNewIntent() method so I can't use enableForegroundNdefPush(). Am I doing something wrong? Surely this simple use case must be possible to implement. Thanks, André -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC P2P pattern: Receive first, via NPP, and respond after also via NPP
Ultimate Collection of Paid Android Apps and Games{2010-2011} collection of best android applications , games , softwares ,live wallpaper around (2.5GB) folder size. In this collection more then 1000s applications (must download) http://www.click2sell.eu/buy?aakash19ult -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NFC P2P pattern: Receive first, via NPP, and respond after also via NPP
Bluetooth with createInsecureRfcommSocketToServiceRecord() or listenUsingInsecureRfcommWithServiceRecord() would be an option, so that pairing is not needed, but I've yet to successfully establish a RFCOMM channel this way with devices other than Androids. In my case I'm trying to establish a connection with a Debian system and I can't seem to configure the Bluez framework there to create these insecure channels, it always requires pairing… Best regards, André On 9 Jun, 13:20, Nick Pelly npe...@google.com wrote: The current NPP API's do not encourage the use of NPP for challenge/response. However you can use NPP to exchange enough information to switch to Bluetooth, for which we have public API's for an RFCOMM channel. Cheers, Nick On Mon, May 30, 2011 at 1:02 PM, André Cruz andrefc...@gmail.com wrote: Hello. I've successfully established a LLCP connection between a SCL3711 desktop reader (using nfcpy) and a Nexus S. I've also implemented NPP client and server support so I can send NDEF messages from the desktop and receive them on the Android, and vice-versa. But I am struggling with the Android NFC API to accomplish something as simple as receiving a NPP message first, and then sending a response also via NPP. This is because the enableForegroundNdefPush() call has to be executed on the onResume() method and the NdefPushClient only sends the message if it is available as soon as the LLCP channel is established. In my use case the phone would be put next to my reader, which would trigger the establishment of a LLCP channel, and the reader would push an NDEF message. My application is launched, it is the only one that catches that specific intent, and produce a NDEF response based on the NDEF received and would push it to the reader via enableForegroundNdefPush(). But by now the LLCP channel is established, so the message does not get sent, and my application is processing the onNewIntent() method so I can't use enableForegroundNdefPush(). Am I doing something wrong? Surely this simple use case must be possible to implement. Thanks, André -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en