Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
Android Documentation
WiFiSocketFactory

Class WiFiSocketFactory

Hierarchy

java.lang.Object

Package
com.smartdevicelink.transport.utl

Quick Jump

Constructors
Methods

Constructors

WiFiSocketFactory()

public WiFiSocketFactory()

Methods

createSocket( Context context )

Try to create a TCP socket which is bound to Wi-Fi network (for Android 5+)

On Android 5 and later, this method tries to create a Socket instance which is bound to a Wi-Fi network. If the phone is not connected to a Wi-Fi network, or the app lacks required permission (ACCESS_NETWORK_STATE), then this method simply creates a Socket instance with "new Socket();".

public static java.net.Socket createSocket(Context context)

Method Parameters

context

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section