Android judges whether WiFi is 5g or 2.4G
I read this post at the beginning and couldn't find the answer. For later people, I'll reply.
According to WiFi info. Getfrequency(), you can judge whether it is 5g
Four numbers should be returned
2, it is 2.4G; If it starts with 5 words, it's 5g.
It's best to judge with the first number instead of the whole four numbers, because the latter has other meanings.
By the way, the above method is under the source code of 5.1. If you want to be compatible with 4.4, you should do this:
WiFi info has a function to judge whether it is 5g
The above is the Android introduced by Xiaobian to you. Judge whether WiFi is 5g or 2.4G. I hope it will help you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!