Alibabacloud.com offers a wide variety of articles about android wifi network analyzer, easily find your android wifi network analyzer information here online.
Http://delxu.wordpress.com/2011/03/13/wifi-analyzer-android%E6%89%8B%E6%9C%BA%E7%89%88/WiFi analyzer (# Android # mobile phone version) posted on 2011/03/13 by delxu
Original delxu document. For more information, see the source. T
Http://www.mobiletuts.me Get Network Connection Status With the promotion of 3G and WiFi, more and more Android applications need to call network resources and detect the network connection status becomes the necessary function of networ
Normally, when 3G and WiFi are on, Android uses Wi-Fi by default, but it is not possible to have WiFi everywhere in the real world, so the phone will often automatically switch networks.Sometimes, when the phone starts using WiFi, it will automatically switch from WiFi to 3G
need for permissionsandroid.permission.ACCESS_FINE_LOCATIONLet's look at how to get the current device to open the positioning mode, the passive mode is automatically opened, mixed mode is the network mode and GPS mode are open, the advantages of this mode is: Short positioning time, high precision. Cons: Fee Electricity//0 means passive Mode 1 means network Mode 2 means GPS mode 3 means mixed mode Pub
Wi-Fi peer-to-peer (peer-to peers), which agrees with the corresponding hardware of the Android 4.0 (API level 14) or a higher version of the device can directly communicate via WiFi without the need for other intermediate transit nodes (Android Wi-Fi peer framework complies with the Wi-Fi affiliate Wi-Fi direct authentication logo). Use these APIs. You can searc
(Transferred from: http://wenku.baidu.com/view/af39b3164431b90d6c85c72f.html)Nine, Android Learning day eighth-broadcasting mechanism and WiFi network operationToday you are familiar with some basic operations of the broadcast mechanism and WiFi network in
1. Concepts
2. WiFi Nic status
Wifi_state_disabled: WiFi Nic unavailable (1)
Wifi_state_disabling: WiFi is being disabled (0)
Wifi_state_enabled: WiFi Nic available (3)
Wifi_state_enabling: the WiFi Nic is on (2)
Wifi_state_unknown: Unknown Nic status
3.
Tagged with: Android Wi-Fi peer networkWi-Fi peer-to-peer (peer-to-peer network), which allows Android 4.0 with the appropriate hardware (API level 14) or later devices can communicate directly via WiFi without the need for other intermediate transit nodes (Android Wi-Fi pee
);}});Builder.setnegativebutton (R.string.cancel, New Dialoginterface.onclicklistener () { @Overridepublic void OnClick (Dialoginterface dialog, int which) {Dialog.cancel ();}});Builder.create ();Builder.show ();}return flag;}
The results are as follows: Users can click OK to set up the network, such as starting WiFi
-----------------------------------------------------------------------------
Get Network Connection Status
With the spread of 3G and WiFi, more and more Android applications need to invoke network resources, and detection of network connectivity is a necessary feature of network applications.
The
This example describes how Android determines the type of network. Share to everyone for your reference, specific as follows:
To determine whether the network type is WiFi, or 3G, or 2G network, different processing of different networks, now will be judged by the method of
, depending on your settings.5. How to change back to previous status (via USB connection)SetProp service.adb.tcp.port-1 Stop adbd start adbd3. Directly via the ADB after USB connection is set upThis is the simplest method, but the success rate is not high. Let's take a look at how to achieve:ADB tcpip 5555 #让adbd重新启动, and listen port 5555 ADB connect 192.168.0.101:5555Change back to the original state:ADB usbAttentive friends should have found that the command issued through the ADB is user-le
Tinfo.getsubtype ()) {//If 2g type case TELEPHONYMANAGER.NETWORK_TYPE_GPRS://Unicom 2g TELEPHONYMANAGER.NETWORK_TYPE_CD MA://Telecom 2g Case Telephonymanager.network_type_edge://Mobile 2g Case TelephonyManager.NETWORK_TYPE_1xRTT:case Telephonyma Nager. Network_type_ideN:return networn_2g; If it is a 3g type case TELEPHONYMANAGER.NETWORK_TYPE_EVDO_A://Telecom 3g TelephonyManager.NETWORK_TYPE_UMTS:case Telephonyma Nager. Network_type_evdo_0:case TelephonyManager.NETWORK_TYPE_HSDPA:case TelephonyM
This example for you to share the Android decision is WiFi or 4G network code for your reference, the specific content as follows
Package com.chengxinet.bobo.utils;
Import Android.content.Context;
Import Android.net.ConnectivityManager;
Import Android.net.NetworkInfo;
Import Android.telephony.TelephonyManager;
/** * Created by the Administrator on 2016/1
Android phone can be WiFi internet, this is good. But when there is no WiFi, how to go on Ah, 3G---> Limited traffic, watching video is not cost-effective! Here I summarize several methods for your reference.Method One: USB cable, mobile phone wired internet1, connect the phone via USB cable to the computer, check the "settings, wireless and
Info.getsubtype () values is as follows: * NETWORK_TYPE_CDMA network type is CDMA * Network_type_edge network type is EDGE * Network_type_evdo_0 network type is EVDO0 * Network_type_evdo_a network type is EVDOA * Network_type_gprs network type is GPRS * NETWORK_TYPE_HSDPA
Android Development Get network status collation:1 Packagecom.gzcivil.utils;2 3 ImportAndroid.content.Context;4 ImportAndroid.net.ConnectivityManager;5 ImportAndroid.net.NetworkInfo;6 ImportAndroid.telephony.TelephonyManager;7 Importandroid.text.TextUtils;8 9 Public classNetworkutils {Ten One /**No network*/ A Public Static Final intNetworktype_invali
about how Android detects the type of network, the online code is many, but the useful products are not many, some time ago, because do project need to involve specific network type of check, especially distinguish 2G network is for WAP, or net, type, because WAP type, need to configure proxy Internet, based on this, I
Get wifi ip address or mobile network IP address for android development tools
Sometimes we need to get the IP address of WIFI to get the IP address of the mobile phone network. This is a tool class dedicated to solving this problem. Here we need two permissions:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.