How to detect network type(2G/3G) in J2ME?

孤者浪人 提交于 2019-12-11 12:45:29

问题


In my J2ME application i want to detect network type whether it is 2G or 3G. According to network type, i need to take some different actions. How can it be done by code?


回答1:


For Network type following syntax is used

String value = System.getProperty("com.nokia.network.access");

You can check this artical.

The return values can be as follows,

  • pd - Packet data in GSM network

  • pd.EDGE - Packet data in EDGE network

  • pd.3G - Packet data in 3G network

  • pd.HSDPA - High speed downlink packet access for 3G networks

  • csd - Circuit switched data, for example GSM CSD/HSCSD data call

  • bt_pan - Bluetooth PAN network

  • wlan - Wireless network, for example 802.11b, 802.11G or WiMaX

  • na - Not applicable, the implementation can’t determine the type

So based on return value, you can get the Network Type.



来源:https://stackoverflow.com/questions/9747613/how-to-detect-network-type2g-3g-in-j2me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!