История изменений
Исправление kazufukurou, (текущая версия) :
try {
final WifiManagar wifi = (WifiManager) getActivity().getApplicationContext().getSystemService(Context.WIFI_SERVICE);
final DhcpInfo di = wifi.getDhcpInfo();
final int gateway = IntToStr(di.gateway);
gateway_label.post(new Runnable() {
@Override
public void run() {
gateway_label.setText("wtf.ok[" + gateway + "]");
}
});
} catch (Exception e) {
gateway_label.post(new Runnable() {
@Override
public void run() {
gateway_label.setText("wtf.fail[" + e.getMessage() + "]");
}
});
}
что лейбл так покажет? (мб не скомпилится)
Исходная версия kazufukurou, :
try {
final WifiManagar wifi = (WifiManager) getActivity().getApplicationContext().getSystemService(Context.WIFI_SERVICE);
final DhcpInfo = di = wifi.getDhcpInfo();
final int gateway = IntToStr(di.gateway);
gateway_label.post(new Runnable() {
@Override
public void run() {
gateway_label.setText("wtf.ok[" + gateway + "]");
}
});
} catch (Exception e) {
gateway_label.post(new Runnable() {
@Override
public void run() {
gateway_label.setText("wtf.fail[" + e.getMessage() + "]");
}
});
}
что лейбл так покажет? (мб не скомпилится)