Can I emulate a wi-fi connection to test Wi-fi Direct? - android

In API 14 or higher (ICS), ad-hoc wi-fi networks are possible. I currently possess the following, and I'm trying to figure out how I might test the wi-fi direct functionality, or if I need to get another device with Android 4.0.
Computer, connected via a wired network to a wi-fi router.
A Galaxy Nexus, fully update.

The problem is that from a User Experience prospective, Wi-Fi Direct functionality in Android is quite crappy. Yes, it does have an API for negotiating and controlling Wi-Fi Direct connections, but "vanilla" Android doesn't have any user applications for negotiation this connection if user need it.
If yo are software developer and developing multi player game Android game, you have everything you need:
API to enable Wi-Fi Direct
to receive list of all devices nearby with enabled Wi-Fi Direct
to send connect request to another device
to accept this request and establish connection
But if you are just a user who has two devices and multi player games which can't negotiate about establishing Wi-Fi Direct connection, and and just want to connect two devices without Access Point, we are sorry.
So, if you just want to test Wi-Fi Direct functionality on your device, there are two ways to do this:
Buy / borrow device which has appropriate software "from the box", like Sony Xperia T, Samsung Galaxy SII or Samsung Galaxy SIII.
Install third party application from Android Market, like WiFi Shoot!, WiFi Direct, etc.
Hope I answered your question.

Related

Google Nearby blocks Android application accessing to Internet - it switches to Wifi Direct automatically

I am having a problem with Google Nearby and WiFi Direct.I am developing an Android application which will run on two Android devices simultaneously.
These devices are connected via Google Nearby and in the same time both Android devices need to be connected to Internet for some API calls.
But sometimes,Google Nearby enables Wifi Direct automatically and in that case the devices are unable to access the Internet for API calls,hence the requests are failing.
I am unable find a way to prevent Nearby API from using WiFi Direct as connection medium in Lenovo Tab 7 Essentials devices.
How to programmatically control Nearby connection like "not to use" WiFi Direct?
Kind regards..
Use P2P_CLUSTER; P2P_STAR is inherently disruptive.
P2P_CLUSTER will use Bluetooth and LAN to connect your devices, so expect slower speeds if you're not both connected to the same router.
P2P_STAR will use Bluetooth, LAN, and Hotspots to connect your devices, so it gets higher bandwidth but it can cause devices to disconnect from their Wifi network.

Not able to connect to Bluetooth server and WiFi at same time

I have a Bluetooth device through which user can take photos. After taking the photos Bluetooth device hosts all the images on its own HTTP server (10.0.0.1), so that other devices can connect to server using Bluetooth and access photos from server using REST APIs which are exposed by server.
Steps to connect to Bluetooth device (Server)
Go to Setting, enable Bluetooth
Select Bluetooth device
Bluetooth device setting ("Paired Bluetooth device")
Select check box for Internet access.
Through this i am able to access Bluetooth server but my WiFi automatically gets disabled and I am not able to access internet.
If i uncheck "Internet access" check box in "Paired Bluetooth device setting" then I am able to connect to WiFi for internet access.
Is it possible to have both WiFi internet as well as Bluetooth internet at the same time? So that my app can connect to Bluetooth device to get the data (images) using REST APIs and post to remote server using WiFi.
I am using Nexus 7 tab for development which is running on Android 4.4.4.
1. ...so that other devices can connect to server using Bluetooth and access photos from server using REST APIs which are exposed by server
If the photos are on the server, devices can connect to it using wifi/internet also..right? To access the APIs and get the photos..
Why do you want other devices to connect to server using bluetooth to access photos from server using REST APIs
2. Is it possible to have both WiFi internet as well as Bluetooth internet at the same time?
Leave aside Bluetooth internet, there have been some issues related to Bluetooth and Wifi, even more with Bluetooth Low Energy and Wifi, many have been device specific.
Regarding what you are facing, there are issues on Android Open Source Project - Issue Tracker and other blogs also;
Issue 39995
Issue 41631
Nexus 5, Nexus 4 and Nexus 7 (2013) Android 4.4 Bluetooth Issues
[Although i haven't faced that issue in Nexus 5]
I have seen the same in MotoG also, turning on Bluetooth weakens the Wifi functionality.
In your case, considering nothing can be done with the device and its hardware,
you can check with the connections whether it happens intermittently, try to connect or send the request to server a couple of times.
3. ...app can connect to Bluetooth device to get the data (images) using REST APIs
If it can "connect" to the Bluetooth device, i suggest you try and get the images on the established connection rather than REST APIs. Simultaneous internet access through two different sources doesn't happen, even with the 3G and wifi :)
Just out of curiosity, when you are connected to the Bluetooth device, why do you want to add the necessity of internet to get the data?
Another approach, gets ugly but would work: Can you get the data that you need and ask the user to switch off the bluetooth so you can send the data..which you might need only on certain devices, if you separately get the data from the established bluetooth connection only

wifi direct android app creation

I need to develop an android app for communicating tablet wireless. After some google search i found Wifi direct (Wifi P2P) is the solution for that. I have some doubt about this. I found wifi direct option in some Samsung device only.
Is every android device after ICS support Wifi direct? If possible how can i enable wifi direct service in those devices.
If not, Which are the wifi direct service available devices?
Can i create one to many network using wifi direct ?
WiFi direct is supported by most devices with Android 4.0 and above, and you can create one-to-many network with it.

Are any android devices capable of connecting to an AP and another device simultaneously?

Since I don't have an Android 4.0 device I haven't been able to test this myself. Also I wonder if connecting device A (a smartphone) to device B (a wifi direct capable device) using Wifi direct would mean that device A would assume it is provided with internet from device B (tethering?). I am trying to make an application for device A that would communicate with a device B that does NOT provide internet, thus it would be interesting to know if such a scenario would lead to device A losing internet connectivity for the duration of the connection. Is the situation different depending on if device A is connected to internet through an AP or through 3G/4G?
Perhaps using Bluetooth would be a solution, but in my case security is an issue, and it seems to me that Wifi direct provides stronger security (WPA2).
Any info would be helpful!
/S
On Android, Wi-Fi Direct doesn't interfere with your connection to the Internet (Wi-Fi or 3G/4G). A problem may be that once your turn on the Wi-Fi (to enable Wi-Fi Direct, your phone will try to connect to one of the saved available networks and will disable your 3G connection. That is because Android (by default) doesn't support dual connection (via both Wi-Fi and 3G/4G), but there is some applications around that claim that they can provide such functionality.

ad-hoc wifi on Android

Is it possible to connect two android phones (rooted) with wifi programatically and exchange data?
I know it is possible to do tethering using wifi-android-tether. But i need to establish the connection, and exchange the data, all through my android application. User intervention like switching on the android tether app manually is not allowed.
SO basically its like, if i run my app on two droid phones, they should do the following,
Detect that they have wifi.
DEtect that the other phone has its wifi on.
Establish a connection ( similar to a PAN in bluetooth ).
Exchange some data.
Use WiFi Direct. The sample codes in the SDK package will do for testing Peer-Peer connectivity.

Categories

Resources