Skip to content

Most visited

Recently visited

navigation

LowpanScanner

LowpanScanner

public class LowpanScanner
extends Object

java.lang.Object
   ↳ com.google.android.things.lowpan.LowpanScanner


Class for performing active and passive scans.

See also:

Summary

Nested classes

class LowpanScanner.Callback

Callback base class for LowpanScanner

Public methods

int getTxPower()

Gets the maximum transmit power (in dBm) used for active scanning.

void setCallback(LowpanScanner.Callback cb, Handler handler)

Sets an instance of LowpanScanner.Callback to receive events.

void setCallback(LowpanScanner.Callback cb)

Sets an instance of LowpanScanner.Callback to receive events.

void setTxPower(int txPower)

Sets the maximum transmit power (in dBm) to be used for active scanning.

void startEnergyScan()

Start an energy scan.

void startNetScan()

Start a network scan.

void stopEnergyScan()

Stop an energy scan currently in progress.

void stopNetScan()

Stop a network scan currently in progress.

Inherited methods

From class java.lang.Object

Public methods

getTxPower

int getTxPower ()

Gets the maximum transmit power (in dBm) used for active scanning.

Returns
int

See also:

setCallback

void setCallback (LowpanScanner.Callback cb, 
                Handler handler)

Sets an instance of LowpanScanner.Callback to receive events.

Parameters
cb LowpanScanner.Callback
handler Handler

setCallback

void setCallback (LowpanScanner.Callback cb)

Sets an instance of LowpanScanner.Callback to receive events.

Parameters
cb LowpanScanner.Callback

setTxPower

void setTxPower (int txPower)

Sets the maximum transmit power (in dBm) to be used for active scanning.

The actual transmit power used is the lesser of this value and the currently configured maximum transmit power for the interface.

Parameters
txPower int

See also:

startEnergyScan

void startEnergyScan ()

Start an energy scan.

This method will return once the scan has started.

Throws
LowpanException

See also:

startNetScan

void startNetScan ()

Start a network scan.

This method will return once the scan has started.

Because performing a network scan will return the hardware addresses of nearby devices, the use of this method requires the permission @{link android.Manifest.permission.ACCESS_COARSE_LOCATION}.

Throws
LowpanException

See also:

stopEnergyScan

void stopEnergyScan ()

Stop an energy scan currently in progress.

See also:

stopNetScan

void stopNetScan ()

Stop a network scan currently in progress.

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)