我已經給用戶權限帶wifi的效果很好,但它不工作與移動數據connection.it不crashed.but它不沒有迴應。我的Android應用程序並不比WiFi連接等工作清單中</p> <pre><code><uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> </code></pre> <p>應用
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
try {
URL = "http://" + Helper.getip(getApplicationContext(), LoginActivity.ipindex) + "/Android_Service/LoginService.asmx";
URL2= "http://"+Helper.getip(getApplicationContext(),LoginActivity.ipindex)+"/Android_Service/AndroidServices.asmx";
final String imageurl="http://192.168.0.180/hrm/empimages100/" + LoginActivity.EmpNo + ".jpg";
new LoadImage().execute(imageurl);
wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
// mTitle = mDrawerTitle = getTitle();
user = (ImageView) findViewById(R.id.avatar);
TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
Deviceid = tm.getDeviceId();
顯示您的代碼... – FrozenFire