摘要:
<uses-permissionandroid:name="android.permission.ACCESS_WIFI_STATE"/>publicStringgetLocalMacAddress(){WifiManagerwifi=(WifiManager)getSystemService(Context.WIFI_SERVICE); WifiInfoinfo=wifi.getConnectionInfo(); returninfo.getMacAddress(); }publicStringgetLocalIpAddress(){ try{ for(Enu 阅读全文
摘要:
txtpwd=(EditText)findViewById(R.id.txtPassword);if (TextUtils.isEmpty(txtpwd.getText().toString())) { new AlertDialog.Builder(this) .setMessage("请输入系统密码!") .setPositiveButton("确定", new DialogInterface.OnClickListener(){ public void onClick(DialogInterface dialoginterface, int i){ 阅读全文
摘要:
从本地私有存储器读取数据public void writeInternalStoragePrivate( String filename, byte[] content) { try { //MODE_PRIVATE creates/replaces a file and makes // it private to your application. Other modes: // MODE_WORLD_WRITEABLE // MODE_WORLD_READABLE // MODE_APPEND FileOutputStream fos = openFileOutput(filename, 阅读全文