How and when to use registerBestMatchingNetworkCallback introduced in Android API 31?

33 views Asked by At

I wanted to connect to wifi from app.

I was looking in to ConnectivityManager docs and came across this method.

public void registerBestMatchingNetworkCallback (NetworkRequest request, 
            ConnectivityManager.NetworkCallback networkCallback, 
            Handler handler)

but i don't know how to use this method correctly, though i have search for it and found nothing. specifically how should I pass the parameters?

0

There are 0 answers