connectIfAvailable

open fun connectIfAvailable(    @NonNull context: Context,     @NonNull address: String,     scanPeriod: Int)

Start scan for BleDevices

Parameters

context

Context the application context

address

:String if not null, connect to device when it become available

scanPeriod

Integer the time out of scan It is recommended that the scan period be greather than 10 second