2

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..

Community
  • 1
  • 1
Nick Russler
  • 4,608
  • 6
  • 51
  • 88
  • It's clearly written in the post you provided, that "frequency" can be set only in CM (CyanogenMod) Android ROM – Mixaz Feb 21 '14 at 15:09

2 Answers2

1

Probably not

Everything that application can configure is contained in a parcelable WifiConfiguration and it doesn't include the channel.

msh
  • 2,700
  • 1
  • 17
  • 23
0

You can use the channel field:

Field wcFreq = WifiConfiguration.class.getField("channel");
wcFreq.setInt(wifiConf, 1);

This will change the hotspot to channel 1.