AwareResources
class AwareResources : Parcelable
kotlin.Any | |
↳ | android.net.wifi.aware.AwareResources |
The resources of the Aware service.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
AwareResources(availableDataPathsCount: Int, availablePublishSessionsCount: Int, availableSubscribeSessionsCount: Int) Construct a |
Public methods | |
---|---|
Int | |
Int |
Return the number of Aware data-paths (also known as NDPs - NAN Data Paths) which an app could create. |
Int |
Return the number of Aware publish sessions which an app could create. |
Int |
Return the number of Aware subscribe sessions which an app could create. |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<AwareResources!> |
Public constructors
AwareResources
AwareResources(
availableDataPathsCount: Int,
availablePublishSessionsCount: Int,
availableSubscribeSessionsCount: Int)
Construct a AwareResources
object, which represents the currently available Aware resources.
Parameters | |
---|---|
availableDataPathsCount |
Int: Number of available Aware data-path. Value is 0 or greater |
availablePublishSessionsCount |
Int: Number of available Aware publish sessions. Value is 0 or greater |
availableSubscribeSessionsCount |
Int: Number of available Aware subscribe sessions. Value is 0 or greater |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getAvailableDataPathsCount
fun getAvailableDataPathsCount(): Int
Return the number of Aware data-paths (also known as NDPs - NAN Data Paths) which an app could create. Please refer to the WifiAwareNetworkSpecifier
to create a Network Specifier and request a data-path.
Note that these resources aren't reserved - other apps could use them by the time you attempt to create a data-path.
Return | |
---|---|
Int |
A Non-negative integer, number of data-paths that could be created. Value is 0 or greater |
getAvailablePublishSessionsCount
fun getAvailablePublishSessionsCount(): Int
Return the number of Aware publish sessions which an app could create. Please refer to the WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback, Handler)
to create a publish session.
Note that these resources aren't reserved - other apps could use them by the time you attempt to create a publish session.
Return | |
---|---|
Int |
A Non-negative integer, number of publish sessions that could be created. Value is 0 or greater |
getAvailableSubscribeSessionsCount
fun getAvailableSubscribeSessionsCount(): Int
Return the number of Aware subscribe sessions which an app could create. Please refer to the WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback, Handler)
to create a subscribe session.
Note that these resources aren't reserved - other apps could use them by the time you attempt to create a subscribe session.
Return | |
---|---|
Int |
A Non-negative integer, number of subscribe sessions that could be created. Value is 0 or greater |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel: This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |