Reputation: 4688
Is there a way to set the used Channel for the Android Hotspot?
I know there is no official API for this but are there some way using reflection?
Edit: I found some hints at stackoverflow that i meay be possible:
Field wcAdhocFreq = WifiConfiguration.class.getField("frequency");
Taken from here, but i couldn't find that field in the sources..
Upvotes: 2
Views: 3498
Reputation: 11
You can use the channel field:
Field wcFreq = WifiConfiguration.class.getField("channel");
wcFreq.setInt(wifiConf, 1);
This will change the hotspot to channel 1.
Upvotes: 0
Reputation: 2770
Probably not
Everything that application can configure is contained in a parcelable WifiConfiguration and it doesn't include the channel.
Upvotes: 1