Many times it is necessary to determine the current user's network before proceeding with some of the processing logic. But the network type gets this piece, I am using my own mobile phone to debug some problems, here to record.
A mobile phone generation, mobile 4G network, get the subtype type value of 17, I checked the Android 5.1 source code, its maximum value is 16.
I take the Phantom's mobile 4G test results are as follows:
Millet 4, tel
1. First connect your Android device with USB, then run the command at the terminal, it can start the device's 5555 port so that it can connect on the network.55552. Disconnect the USB connection now and make sure the device and your computer are connected to the same wireless network.Go to Device View IP address: Set-wifi-WIFI-IP address you are connected toand
The data cable is lost and I don't want to spend any money to buy it. I checked it online. The Android mobile phone can debug the program through WiFi. That's great. I did it myself. Although the data on the Internet is very detailed, but there are still some problems. Record them and refer to them next time.
1. First, let the Android phone listen to the specifi
This article describes the Android programming implementation to get the currently connected WiFi name method. Share to everyone for your reference, specific as follows:
Wifimanager wifimgr = (wifimanager) mactivity.getsystemservice (Context.wifi_service);
int wifistate = Wifimgr.getwifistate ();
Wifiinfo info = Wifimgr.getconnectioninfo (); String wifiid = info!= null?
INFO.GETSSID (): null;
publi
1. Test apk can usually be set up via WiFi proxy, thus using Charles Crawl HTTP request2. Release version of the APK via code control, HTTP request no longer go WiFi proxy1 if(Type = =Connectivitymanager.type_wifi) {2 if(globalvariable.is_release)3 {4Httphost proxy =NewHttphost (connrouteparams.no_host);5 client.getparams (). Setparameter (Connroutepnames.default_p
Linux shares wifi with Android phones and wifiandroid
The test is feasible. The test system is Deepin2014 and Ubuntu. The procedure is very simple.
1. Uninstall hostapd, sudo apt-get remove hostapd (if it has been installed, uninstall it because some versions do not support it)
2. Install the specified version of hostapd at http://pan.baidu.com/s/1kt0xwmn. download and install it later.
3. Notify sudo
Sharing wifi in Linux to Android phones
The test is feasible. The test system is Deepin2014 and Ubuntu. The procedure is very simple.
1. Uninstall hostapd, sudo apt-get remove hostapd (if it has been installed, uninstall it because some versions do not support it)
2. Install the specified version of hostapd at http://pan.baidu.com/s/1kt0xwmn. download and install it later.
3. Notify sudo apt-get install
I have written a Java implementation of the most basic socket network communication, this is similar to the previous one, just porting the client code to the phone, and then get the native IP method slightly different.Let's take a look at the use of Android studio in this article.3 basic steps to develop Android using Android Studio:(1) New project(2) Define the
[Transfer from]http://blog.csdn.net/kuanxu/article/details/7444874Recently, because you want to debug your code on another Android device, check its log on your native PC. Two machines away from the relatively far, can not be directly connected with the USB, so find a lot of information on the Internet, the most find using the ADB Connect method to solve the problem. The resolution process is as follows:1, verify that the native PC does not have any A
If the data cable is lost and you don't want to spend any money to buy it, you can check it online. Android phones can actually use wifi.ProgramDebugging, too good. I did it myself. Although I wrote a lot of details on the Internet, there are still some problems. I will record them and refer to them next time.
1. First, let the Android phone listen to the specified port:This step requires the use of shell,
WiFi-based Android LAN Instant Messaging Software, wifiandroid
The WiFi-based Android LAN Instant Messaging Software communicates with other mobile devices through self-built Wi-Fi hotspots, enabling text chat, voice messaging, file transfer, and other functions, meets basic daily needs.
:Http://www.dwz.cn/BzUh0
Run:
Android wifi connection can receive data, gprs cannot, androidwifi
Android can obtain files on the network in WiFi, but not GPRS.
Cause:Static IP addresses must be used for access.
Example:When downloading files stored in Alibaba Cloud direct-line cloud acceleration, ip addresses are dynamically allocated, and data
Hello, everyone, recently in the Android program due to mobile phone interface problems, debugging programs are always poor and can not be normal debugging, so feel quite distressed, so on the internet to find wireless debugging methods of Android. After studying and experimenting with the wireless debug program that is now successful, the method is shared as follows:1. Whether the mobile phone has the cond
Pro-test is feasible, test system: Deepin2014,ubuntu is the same. The steps are very simple.1. Uninstall Hostapd,sudo apt-get Remove HOSTAPD (uninstall if previously loaded, because some versions are not supported)2. Install the specified version of HOSTAPD,HTTP://PAN.BAIDU.COM/S/1KT0XWMN and install it after download3. Installation Information Notice sudo apt-get install Libnotify-bin4. Installing Ap-hotspot$sudo add-apt-repository Ppa:nilarimogard/webupd8$ sudo apt-get update$ sudo apt-get ins
Wifi is ready to work, and most of the features required in Android wifisetting are also implemented. However, there are two other problems to record here:
1. softap unavailable
2. There is a probability that WPS will fail.
For softap, when WiFi tethering is selected in setting, softapcontroller sends a private command to the driver. However, before sending a pri
Requirement: count the number of Wi-Fi/2G/3G/4G traffic
Issue:
1. How to Determine 2G/3G/4G
The system source code TelephonyManager class provides methods, but only hidden, so you can refer to the source code
Ii. How to make statistics
The TrafficStats class is provided after Android 2.2 for traffic statistics. For more information, see the manual.
Here I used
Static long getTotalRxBytes () // obtain the total number of accepted bytes, including Mob
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.