Wi-Fi Aware allows neighboring 8.0 Android phones to connect

Wi-Fi Aware allows neighboring 8.0 Android phones to connect
Wi-Fi Aware activation. Credit: Google Developers

Google's new Wi-Fi Aware functionality, also known as Neighbor Awareness Networking (NAN), allows devices running on Android 8.0 (API level 26) and higher to detect and directly connect to each other without any secondary connectivity, such as Bluetooth.

Wi-Fi Aware connects devices by grouping together existing devices in a given location or by establishing a new group for devices that are first to enter a location. The Wi-Fi Aware system service manages this function, while apps themselves have no control over grouping behavior. Instead, applications use the Wi-Fi Aware APIs to communicate with the Wi-Fi Aware system service, which manages the 's Wi-Fi Aware hardware.

The Wi-Fi Aware APIs enable apps to discover other devices as well as establish the necessary to those devices. The discovery process begins when a publishes at least one discoverable service. At that point, once another device subscribes to the first device and enters the publisher's Wi-Fi range, the subscriber receives an update that a matching publisher has been discovered. Once a subscriber identifies a publisher, the subscriber can either send a brief message or initiate a network connection with the discovered device. For coverage purposes, devices can be both publishers and subscribers.

Then, as soon as two devices recognize one another, they can generate a bi-directional Wi-Fi Aware network connection without an . Wi-Fi Aware connections offer the advantage of better connection across longer distances than those of Bluetooth. Therefore, this connection is ideal for applications that share large amounts of data among users, such as photo-sharing apps.

In order to access Wi-Fi Aware discovery and networking, users can request the following permissions in their apps' manifest: Access WiFi State, Change WiFi State, Access Fine Location, Change Network State, Internet. Next, they can confirm whether their device supports Wi-Fi Aware with the PackManager API. Thirdly, users may check if Wi-Fi Aware is currently available. After all, while Wi-Fi Aware might exist on a device, the device cannot access the functionality if Location or Wi-Fi is disabled.

That said, some devices may not support Wi-Fi Aware depending on their firmware and hardware settings, if Wi-Fi Direct, SoftAP or tethering is active. To that end, users should be aware that Wi-Fi Aware availability can change at any time. An application should register BroadcastReceiver to receive Action Wi-Fi Aware State Changed and notify of any availability changes. Once an app receives this notification, all existing sessions should be discarded.


Explore further

Android 11 update offers tweaks and enhancements

More information: "Wi-Fi Aware Overview: Android Developers." Android Developers, Google, 22 Mar. 2021, developer.android.com/guide/to … nectivity/wifi-aware

WifiNanScan App: play.google.com/store/apps/det … tion.rtt.wifinanscan

© 2021 Science X Network

Citation: Wi-Fi Aware allows neighboring 8.0 Android phones to connect (2021, March 22) retrieved 20 October 2021 from https://techxplore.com/news/2021-03-wi-fi-aware-neighboring-android.html
This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no part may be reproduced without the written permission. The content is provided for information purposes only.
91 shares

Feedback to editors