Hello, Roman. I am also developing an application that requires "to exchange some custom information between devices within requestPeers() step." I came to the same conclusion, send this data via WifiP2pDevice.secondaryDeviceType, but I have not found how to do this. How have you solved? Could you please help me?
PS: The sample that Akash Roy posted here as answer does not use this attribute secondaryDeviceType, neither other solution to this problem, so it does not help. Thanks. On Monday, 28 May 2012 05:40:26 UTC-3, Roman Tikhonov wrote: > > Hello, > > I am developing WiFi Direct application. Currently I am trying to > exchange some custom info between devices within requestPeers() step. > I know that I can call connect(), open socket and send whatever I > want, but this requires user confirmation from the second device. What > I am trying to do is to exchange some information in background! > > So: > 1. Application calls requestPeers() > 2. What the system offers as a result of requestPeers() is a > List<WifiP2pDevice>. > 3. For every discovered device we received WifiP2pDevice object that > contains some fields like name, mac etc. This is the only info we have > at this step. > > What I am interested in is a possibility to configure that > WifiP2pDevice object somehow for my device. Then other devices would > receive preconfigured WifiP2pDevice object from my device on > requestPeers() and read needed information from it. There is a field > WifiP2pDevice.secondaryDeviceType with the description "Secondary > device type is an optional attribute that can be provided by a device > in addition to the primary device type". Could I configure this field > for the device my application is running on? > > Thanks. -- 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

