如何干净的实现Android/Java Socket 长连接通信

\u5982\u4f55\u5e72\u51c0\u7684\u5b9e\u73b0Android/Java Socket \u957f\u8fde\u63a5\u901a\u4fe1

socket\u6a21\u62df\u7f51\u9875\u7684\u62a5\u6587\u8fde\u63a5\u67d0\u4e2a\u7f51\u7ad9\uff0c\u521b\u5efatcp\u7684socket\u540e\uff0c\u5f53\u6211socket.connect\u540e\uff0c\u5982\u679c\u57285\u52307\u79d2\u949f\u4e0dsocket.send\uff0c\u90a3\u4e48\u8fd9\u4e2a\u94fe\u63a5\u5c31\u5931\u6548\u4e86\u3002 \u8bf7\u95ee\u5982\u4f55\u957f\u65f6\u95f4\u7684\u4fdd\u6301\u8fd9\u4e2a\u94fe\u63a5
\u8fd9\u662f\u5728\u670d\u52a1\u5668\u7aef\u7684\u8bbe\u7f6e\u7684\uff0c\u5ba2\u6237\u7aef\u6ca1\u6cd5\u8bbe\u7f6e,\u53ef\u4ee5\u53d1\u9001\u5fc3\u8df3\u5305\u3002
socket.connect\u540e\uff0c\u6bcf3-4\u79d2\u7528socket.send\u53d1\u9001\u4e00\u5b57\u8282\u6570\u636e\uff08\u5185\u5bb9\u968f\u4fbf\uff09\uff0c\u7136\u540e\u89c2\u67e5\u8fd9\u4e2a\u8fde\u63a5\u662f\u5426\u4fdd\u6301\u3002

lientSocket=serverSocket.accept();
OutputStream os = clientSocket.getOutputStream();
ObjectOutputStream oos=new ObjectOutputStream(os);
oos.writeObject(al);
oos.flush();
oos.close()//socket\u4f1a\u5173\u95ed

\u5b9e\u73b0\uff1a
\u957f\u8fde\u63a5\u7684\u7ef4\u6301\uff0c\u662f\u8981\u5ba2\u6237\u7aef\u7a0b\u5e8f\uff0c\u5b9a\u65f6\u5411\u670d\u52a1\u7aef\u7a0b\u5e8f\uff0c\u53d1\u9001\u4e00\u4e2a\u7ef4\u6301\u8fde\u63a5\u5305\u7684\u3002
\u5982\u679c\uff0c\u957f\u65f6\u95f4\u672a\u53d1\u9001\u7ef4\u6301\u8fde\u63a5\u5305\uff0c\u670d\u52a1\u7aef\u7a0b\u5e8f\u5c06\u65ad\u5f00\u8fde\u63a5\u3002

\u5ba2\u6237\u7aef\uff1a
\u901a\u8fc7\u6301\u6709Client\u5bf9\u8c61\uff0c\u53ef\u4ee5\u968f\u65f6\uff08\u4f7f\u7528sendObject\u65b9\u6cd5\uff09\u53d1\u9001Object\u7ed9\u670d\u52a1\u7aef\u3002
\u5982\u679ckeepAliveDelay\u6beb\u79d2\uff08\u7a0b\u5e8f\u4e2d\u662f2\u79d2\uff09\u5185\u672a\u53d1\u9001\u4efb\u4f55\u6570\u636e\uff0c\u5219\uff0c\u81ea\u52a8\u53d1\u9001\u4e00\u4e2aKeepAlive\u5bf9\u8c61\u7ed9\u670d\u52a1\u7aef\uff0c
\u7528\u4e8e\u7ef4\u6301\u8fde\u63a5\u3002
\u7531\u4e8e\uff0c\u6211\u4eec\u5411\u670d\u52a1\u7aef\uff0c\u53ef\u4ee5\u53d1\u9001\u5f88\u591a\u4e0d\u540c\u7684\u5bf9\u8c61\uff0c\u670d\u52a1\u7aef\u4e5f\u53ef\u4ee5\u8fd4\u56de\u4e0d\u540c\u7684\u5bf9\u8c61\u3002
\u6240\u4ee5\uff0c\u5bf9\u4e8e\u8fd4\u56de\u5bf9\u8c61\u7684\u5904\u7406\uff0c\u8981\u7f16\u5199\u5177\u4f53\u7684ObjectAction\u5b9e\u73b0\u7c7b\u8fdb\u884c\u5904\u7406\u3002
\u901a\u8fc7Client.addActionMap\u65b9\u6cd5\u8fdb\u884c\u6dfb\u52a0\u3002\u8fd9\u6837\uff0c\u7a0b\u5e8f\u4f1a\u56de\u8c03\u5904\u7406\u3002

\u670d\u52a1\u7aef\uff1a
\u7531\u4e8e\u5ba2\u6237\u7aef\u4f1a\u5b9a\u65f6\uff08keepAliveDelay\u6beb\u79d2\uff09\u53d1\u9001\u7ef4\u6301\u8fde\u63a5\u7684\u4fe1\u606f\u8fc7\u6765\uff0c\u6240\u4ee5\uff0c\u670d\u52a1\u7aef\u8981\u6709\u4e00\u4e2a\u68c0\u6d4b\u673a\u5236\u3002
\u5373\u5f53\u670d\u52a1\u7aefreceiveTimeDelay\u6beb\u79d2\uff08\u7a0b\u5e8f\u4e2d\u662f3\u79d2\uff09\u5185\u672a\u63a5\u6536\u4efb\u4f55\u6570\u636e\uff0c\u5219\uff0c\u81ea\u52a8\u65ad\u5f00\u4e0e\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u3002
ActionMapping\u7684\u539f\u7406\u4e0e\u5ba2\u6237\u7aef\u76f8\u4f3c\uff08\u76f8\u540c\uff09\u3002
\u901a\u8fc7\u6dfb\u52a0\u76f8\u5e94\u7684ObjectAction\u5b9e\u73b0\u7c7b\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4e0d\u540c\u5bf9\u8c61\u7684\u54cd\u5e94\u3001\u5e94\u7b54\u8fc7\u7a0b\u3002

Java Socket\u901a\u4fe1\u6709\u5f88\u591a\u7684\u65f6\u5019\u9700\u8981\u6211\u4eec\u4e0d\u65ad\u7684\u5b66\u4e60\u3002\u65b9\u9762\u6548\u7387\u867d\u7136\u4e0d\u53caC\u4e0eC++\u4f46\u5b83\u4ee5\u7075\u6d3b\u8bed\u8a00\u4f18\u52bf\uff0c\u4e3a\u5927\u5bb6\u5e7f\u4e3a\u4f7f\u7528\u3002 \u672c\u6587\u5c31\u5bf9\u5728\u4f7f\u7528java\u505a\u901a\u4fe1\u65b9\u9762\u7a0b\u5e8f\u65f6\u5019\u5e94\u6539\u6ce8\u610f\u95ee\u9898\u505a\u4ee5\u8bf4\u660e\u30021.\u957f\u8fde\u63a5\u3001\u77ed\u94fe\u63a5\u53ea\u662f\u9488\u5bf9\u5ba2\u6237\u7aef\u800c\u8a00\uff0c\u670d\u52a1\u5668\u65e0\u6240\u8c13\u957f\u3001\u77ed\uff1b2.\u65e0\u8bba\u540c\u6b65\u6216\u8005\u5f02\u6b65\u901a\u4fe1\uff0c\u53d1\u9001\u4e4b\u540e\u52a1\u5fc5\u8981\u53c8\u54cd\u5e94\u56de\u590d\uff0c\u786e\u8ba4\u6536\u5230\uff0c\u8d1f\u8d23\u8fdb\u884c\u4e00\u5b9a\u8303\u56f4\u5185\u91cd\u53d1\uff0c\u4f8b\u5982\u91cd\u53d1\u4e09\u6b21\uff1b3.\u957f\u8fde\u63a5\u670d\u52a1\u5668\u4e0e\u5ba2\u6237\u7aef\u4e4b\u95f4\u52a1\u5fc5\u9700\u8981\u5fc3\u8df3\u63a2\u6d4b\uff0c\u7531\u5ba2\u6237\u7aef\u4e3b\u52a8\u53d1\u8d77\uff1b4.\u77ed\u8fde\u63a5\u670d\u52a1\u5668\u901a\u7528\u4ee3\u7801\uff1a
package com.biesan.sms.gate.unioncom.communication; import com.biesan.commons.Constants; import com.biesan.commons.util.CodeUtil; import com.biesan.sms.gate.unioncom.data.*; import com.biesan.sms.gate.unioncom.util.GateInfo; import java.net.*; import java.io.*; import java.util.*; import org.apache.log4j.*; import spApi.*; public class UnioncomDeliver extends Thread { // stop flag private boolean unInterrupt = true; private boolean unErr = true; //private boolean closeSocketFlag = false; // server socket private ServerSocket serverSo = null; // current socket private Socket so = null private OutputStream output = null; private InputStream input = null; // gate command private SGIP_Command tmpCmd = null; private SGIP_Command cmd = null; private Bind bind = null; private BindResp bindResp = null; //private Unbind unBind = null; private UnbindResp unBindResp = null; private boolean unAcceptErrorFlag = true; Logger unioncomLog = Logger.getLogger(Unioncom Deliver.class.getName()); public UnioncomDeliver() { } public void run() { unioncomLog.info("Start..."); while (unInterrupt) { this.initServer(); this.startServices(); while (this.unAcceptErrorFlag) { try { //\u63a5\u53d7\u8fde\u63a5\u8bf7\u6c42 unioncomLog.info("before accept connection!....... FreeMemroy :" + Runtime.getRuntime().freeMemory()); this.acceptConnection(); unioncomLog.info("after accept connection!....... FreeMemroy :" + Runtime.getRuntime().freeMemory()); while (unErr) { cmd = new Command(); unioncomLog.info("before read command from stream ........... FreeMemroy: " + Runtime.getRuntime(). freeMemory()); tmpCmd = cmd.read(input); unioncomLog.info("after read command from stream " + getCommandString(cmd.getCommandID()) + " FreeMemroy: " + Runtime.getRuntime().freeMemory()); if (tmpCmd == null) { unErr = false; break; } switch (cmd.getCommandID()) { // biad ready communication case SGIP_Command.ID_SGIP_BIND: { this.dealBind(); break; }// exit bind case SGIP_Command.ID_SGIP_UNBIND: { this.dealUnBind(); unioncomLog.info("after unbind connection!....... FreeMemroy :" + Runtime.getRuntime().freeMemory()); break; }// deliver .... default : //\u9519\u8bef\u7684\u547d\u4ee4\u5b57 break; }// switch }// while(unErr) } catch (Exception e) { unioncomLog.error("Unioncom Recv Service Error" + e.getMessage()); } finally { if (this.so != null) { this.closeSocket(); } this.unErr = true; } }// while (this.unAcceptErrorFlag) try { this.closeServerSocket(); sleep(200);// sleep } catch (InterruptedException ie) { } }// while(unInterrupt) } private String getCommandString(int cmd){ switch (cmd) { // biad ready communication case SGIP_Command.ID_SGIP_BIND: { return " BIND COMMAND "; }// exit bind case SGIP_Command.ID_SGIP_UNBIND: { return " UNBIND COMMAND "; }// deliver case ... default: return " UNKNOWN COMMAND"; } } private void dealBind() { try { bind = new Bind(tmpCmd); if (bind.readbody() != 0) { unioncomLog.warn("Read Bind error"); this.unErr = false; } bindResp = new BindResp(tmpCmd.getMsgHead()); bindResp.SetResult(0); bindResp.write(output); unioncomLog.debug("Bind success!"); } catch (Exception e) { unioncomLog.error("Dela Union Recv Bind Error!" + e.getMessage()); this.unErr = false; } } private void dealUnBind() { try { //unBind = (Unbind) tmpCmd; unBindResp = new UnbindResp(tmpCmd.getMsgHead()); unBindResp.write(output); unioncomLog.debug("UnBind success!"); } catch (Exception e) { unioncomLog.warn("Unbind error!" + e.getMessage()); } this.unErr = false; } private void startServices() { boolean unStartServices = true; while (unStartServices) { try { serverSo = new ServerSocket(ugInfo.getLocalServerPort(), 5, InetAddress.getByName(ugInfo.getLocalIpAdd())); //serverSo.setSoTimeout(60000); unStartServices = false; unioncomLog.info("Create union recv socket Ok!"); } catch (IOException e) { unioncomLog.warn("Create union recv socket error!" + e.getMessage()); unStartServices = true; UnioncomSubmit.thrSlp(3000); } } } private void acceptConnection() { // Accept \u5931\u8d25 try { so = serverSo.accept(); so.setSoTimeout(10000); } catch (Exception e) { unioncomLog.warn("Accept Error!" + e.getMessage()); this.closeServerSocket(); this.unAcceptErrorFlag = false; this.unErr=false; } // Accept\u6210\u529f try { input = so.getInputStream(); output = so.getOutputStream(); } catch (IOException e) { unioncomLog.warn("Get I/O stream Error!" + e.getMessage()); this.closeService(); this.unAcceptErrorFlag = false; this.unErr=false; } } private void closeSocket() { try { so.close(); unioncomLog.info("Socket Close Success!!!"); } catch (Exception e) { unioncomLog.error("Socket Close Failure!!!" + e.getMessage()); } } private void closeServerSocket() { try { serverSo.close(); unioncomLog.info("ServerSocket Close Success!!!"); } catch (Exception e) { unioncomLog .error("ServerSocket Close Failure!!!" + e.getMessage()); } } private void closeService() { this.closeSocket(); this.closeServerSocket(); } private void initServer() { this.bind = null; this.bindResp = null; //this.unBind = null; this.unBindResp = null; this.tmpCmd = null; this.cmd = null; this.serverSo = null; this.so = null; this.output = null; this.input = null; this.unErr = true; //this.closeSocketFlag = false; unioncomLog.info("Memory***===" + java.lang.Runtime.getRuntime().freeMemory()); } public synchronized void requireStop() { this.unInterrupt = false; unioncomLog.info("Requre interrupt!!!"); } public String convertMsgContentCoding (int msgCoding, byte[] msgContent) { String deliverContent = null; try { if (msgContent != null) { if (msgCoding == 8) { // \u5904\u7406ucs32\u7f16\u7801 deliverContent = new String(msgContent, "UnicodeBigUnmarked"); } else if (msgCoding == 0) { // \u5904\u7406ASCII\u7f16\u7801 deliverContent = new String(msgContent, "ASCII"); } else if (msgCoding == 4) { // \u5904\u7406binary\u7f16\u7801 deliverContent = new String(msgContent); } else if (msgCoding == 15) { // \u5904\u7406GBK\u7f16\u7801 deliverContent = new String(msgContent, "GBK"); // \u5904\u7406DELIVER\u6570\u636e\u5305\u7684\u77ed\u4fe1\u606fID } else { unioncomLog.error("\u7f16\u7801\u683c\u5f0f\u9519\u8bef!"); return ""; } } else return ""; return deliverContent; } catch (UnsupportedEncodingException ex) { unioncomLog.error("deal content error!" + ex.getMessage()); return ""; } } }

Java Socket通信有很多的时候需要我们不断的学习。方面效率虽然不及C与C++但它以灵活语言优势,为大家广为使用。 本文就对在使用java做通信方面程序时候应改注意问题做以说明。1.长连接、短链接只是针对客户端而言,服务器无所谓长、短;2.无论同步或者异步通信,发送之后务必要又响应回复,确认收到,负责进行一定范围内重发,例如重发三次;3.长连接服务器与客户端之间务必需要心跳探测,由客户端主动发起;4.短连接服务器通用代码:
package com.biesan.sms.gate.unioncom.communication;
import com.biesan.commons.Constants;
import com.biesan.commons.util.CodeUtil;
import com.biesan.sms.gate.unioncom.data.*;
import com.biesan.sms.gate.unioncom.util.GateInfo;
import java.net.*;
import java.io.*;
import java.util.*;
import org.apache.log4j.*;
import spApi.*;
public class UnioncomDeliver extends Thread {
// stop flag
private boolean unInterrupt = true;
private boolean unErr = true;
//private boolean closeSocketFlag = false;
// server socket
private ServerSocket serverSo = null;
// current socket
private Socket so = null
private OutputStream output = null;
private InputStream input = null;
// gate command
private SGIP_Command tmpCmd = null;
private SGIP_Command cmd = null;
private Bind bind = null;
private BindResp bindResp = null;
//private Unbind unBind = null;
private UnbindResp unBindResp = null;
private boolean unAcceptErrorFlag = true;
Logger unioncomLog = Logger.getLogger(Unioncom
Deliver.class.getName());
public UnioncomDeliver() {
}
public void run() {
unioncomLog.info("Start...");
while (unInterrupt) {
this.initServer();
this.startServices();
while (this.unAcceptErrorFlag) {
try {
//接受连接请求
unioncomLog.info("before accept connection!.......
FreeMemroy :" + Runtime.getRuntime().freeMemory());
this.acceptConnection();
unioncomLog.info("after accept connection!.......
FreeMemroy :" + Runtime.getRuntime().freeMemory());
while (unErr) {
cmd = new Command();
unioncomLog.info("before read command from stream
........... FreeMemroy: " + Runtime.getRuntime().
freeMemory());
tmpCmd = cmd.read(input);
unioncomLog.info("after read command from stream " +
getCommandString(cmd.getCommandID()) + " FreeMemroy: " +
Runtime.getRuntime().freeMemory());
if (tmpCmd == null) {
unErr = false;
break;
}
switch (cmd.getCommandID()) {
// biad ready communication
case SGIP_Command.ID_SGIP_BIND: {
this.dealBind();
break;
}// exit bind
case SGIP_Command.ID_SGIP_UNBIND: {
this.dealUnBind();
unioncomLog.info("after unbind connection!.......
FreeMemroy :" + Runtime.getRuntime().freeMemory());
break;
}// deliver
....
default : //错误的命令字
break;
}// switch
}// while(unErr)
} catch (Exception e) {
unioncomLog.error("Unioncom Recv Service Error"
+ e.getMessage());
} finally {
if (this.so != null) {
this.closeSocket();
}
this.unErr = true;
}
}// while (this.unAcceptErrorFlag)
try {
this.closeServerSocket();
sleep(200);// sleep
} catch (InterruptedException ie) {
}
}// while(unInterrupt)
}
private String getCommandString(int cmd){
switch (cmd) {
// biad ready communication
case SGIP_Command.ID_SGIP_BIND: {
return " BIND COMMAND ";
}// exit bind
case SGIP_Command.ID_SGIP_UNBIND: {
return " UNBIND COMMAND ";
}// deliver
case ...
default:
return " UNKNOWN COMMAND";
}
}
private void dealBind() {
try {
bind = new Bind(tmpCmd);
if (bind.readbody() != 0) {
unioncomLog.warn("Read Bind error");
this.unErr = false;
}
bindResp = new BindResp(tmpCmd.getMsgHead());
bindResp.SetResult(0);
bindResp.write(output);
unioncomLog.debug("Bind success!");
} catch (Exception e) {
unioncomLog.error("Dela Union Recv Bind Error!" +
e.getMessage());
this.unErr = false;
}
}
private void dealUnBind() {
try {
//unBind = (Unbind) tmpCmd;
unBindResp = new UnbindResp(tmpCmd.getMsgHead());
unBindResp.write(output);
unioncomLog.debug("UnBind success!");
} catch (Exception e) {
unioncomLog.warn("Unbind error!" + e.getMessage());
}
this.unErr = false;
}
private void startServices() {
boolean unStartServices = true;
while (unStartServices) {
try {
serverSo = new ServerSocket(ugInfo.getLocalServerPort(), 5,
InetAddress.getByName(ugInfo.getLocalIpAdd()));
//serverSo.setSoTimeout(60000);
unStartServices = false;
unioncomLog.info("Create union recv socket Ok!");
} catch (IOException e) {
unioncomLog.warn("Create union recv socket error!"
+ e.getMessage());
unStartServices = true;
UnioncomSubmit.thrSlp(3000);
}
}
}
private void acceptConnection() {
// Accept 失败
try {
so = serverSo.accept();
so.setSoTimeout(10000);
} catch (Exception e) {
unioncomLog.warn("Accept Error!" + e.getMessage());
this.closeServerSocket();
this.unAcceptErrorFlag = false;
this.unErr=false;
}
// Accept成功
try {
input = so.getInputStream();
output = so.getOutputStream();
} catch (IOException e) {
unioncomLog.warn("Get I/O stream Error!" + e.getMessage());
this.closeService();
this.unAcceptErrorFlag = false;
this.unErr=false;
}
}
private void closeSocket() {
try {
so.close();
unioncomLog.info("Socket Close Success!!!");
} catch (Exception e) {
unioncomLog.error("Socket Close Failure!!!" + e.getMessage());
}
}
private void closeServerSocket() {
try {
serverSo.close();
unioncomLog.info("ServerSocket Close Success!!!");
} catch (Exception e) {
unioncomLog
.error("ServerSocket Close Failure!!!" + e.getMessage());
}
}
private void closeService() {
this.closeSocket();
this.closeServerSocket();
}
private void initServer() {
this.bind = null;
this.bindResp = null;
//this.unBind = null;
this.unBindResp = null;
this.tmpCmd = null;
this.cmd = null;
this.serverSo = null;
this.so = null;
this.output = null;
this.input = null;
this.unErr = true;
//this.closeSocketFlag = false;
unioncomLog.info("Memory***==="
+ java.lang.Runtime.getRuntime().freeMemory());
}
public synchronized void requireStop() {
this.unInterrupt = false;
unioncomLog.info("Requre interrupt!!!");
}
public String convertMsgContentCoding
(int msgCoding, byte[] msgContent) {
String deliverContent = null;
try {
if (msgContent != null) {
if (msgCoding == 8) { // 处理ucs32编码
deliverContent = new String(msgContent,
"UnicodeBigUnmarked");
} else if (msgCoding == 0) { // 处理ASCII编码
deliverContent = new String(msgContent, "ASCII");
} else if (msgCoding == 4) { // 处理binary编码
deliverContent = new String(msgContent);
} else if (msgCoding == 15) { // 处理GBK编码
deliverContent = new String(msgContent, "GBK");
// 处理DELIVER数据包的短信息ID
} else {
unioncomLog.error("编码格式错误!");
return "";
}
} else
return "";
return deliverContent;
} catch (UnsupportedEncodingException ex) {
unioncomLog.error("deal content error!" +
ex.getMessage());
return "";
}
}
}

  • 鍦Android 涓濡備綍鍏抽棴搴旂敤浠ュ強鎵鏈夌殑 Activity
    绛旓細绯荤粺浼氬皢锛岃鍖呬笅鐨 锛屾墍鏈夎繘绋嬶紝鏈嶅姟锛屽叏閮ㄦ潃鎺夛紝灏卞彲浠ユ潃骞插噣浜嗭紝瑕佹敞鎰忓姞涓 <uses-permission android:name=\"android.permission.RESTART_PACKAGES\"></uses-permission> 3. 鏍规嵁Activity鐨勫0鏄庡懆鏈 3. 鎴戜滑鐭ラ亾Android鐨勭獥鍙g被鎻愪緵浜嗗巻鍙叉爤锛屾垜浠彲浠ラ氳繃stack鐨勫師鐞嗘潵宸у鐨勫疄鐜锛岃繖閲屾垜浠湪A绐楀彛...
  • 鐢ㄨ繃鍝簺濂界敤鐨Android寮婧愰」鐩憿?
    绛旓細鍙﹀Fresco杩欎釜搴撴湰韬鍖卻ize澧炲姞澶浜嗐傚鏋滀笉鏄湁鍚勭gif鍔ㄧ敾鎾斁鎴栬呮捣閲忛珮娓呭浘鐗囧睍绀虹殑璇濓紝鎰熻鐢ㄤ笉鍒般3.鏁版嵁搴 鐩墠鐪嬭繃鏁堢巼鏈楂樼殑鏄疓reenDao锛屼笉姣旂洿鎺ヤ娇鐢╯ql璇彞鎵ц鎱紝鑰屼笖鎺ュ彛璁捐涔熷緢骞插噣銆傜爺绌惰繃GreenDao鐨勬簮鐮侊紝娣辨劅鎴戣嚜宸卞啓涔熷啓涓嶅嚭鏇村揩鐨勫疄鐜浜嗐備綔鑰咃細Van Bruce ...
  • 濡備綍鍏呭垎鍒╃敤闂茬疆鐨凙ndroid鎵嬫満,璁╁叾鍙戞尌浣欑儹?
    绛旓細鎴戜滑鍙互鍦ㄦ墜鏈轰笂瀹夎涓绘祦鐨勫鑸湴鍥惧簲鐢,骞朵笖涓嬭浇绂荤嚎鍦板浘,杩欐牱鍗充究鎵嬫満涓嶅畨瑁匰IM鍗′篃鑳藉瀹炵幇鍑嗙‘瀵艰埅銆傚綋鐒,鏇存柊鍦板浘涔熷緢鏂逛究,浣犲彲浠ラ殢鏃舵妸瀹冩嬁鍥炲杩炴帴WIFI缃戠粶銆佺敋鑷虫槸浣跨敤鐜版湁鎵嬫満鐨勬暟鎹綉缁滀綔涓烘棤绾跨儹鐐广 3銆 浣滀负鐢佃剳鎽勫儚澶存垨涓撶敤瑙嗛鑱婂ぉ宸ュ叿銆傞氳繃瀹夎PC鎽勫儚澶寸被搴旂敤,鎴戜滑杩樺彲浠ユ妸Android鎵嬫満鍙樻垚鐢佃剳鐨勮棰戣亰澶...
  • 鎬庝箞娓呴櫎Android绯荤粺?
    绛旓細褰撶劧鏈夈傞偅灏辨槸鍒╃敤shell鍛戒护銆傚綋鐒躲傞鍏堣瀹夎褰撳墠鎵嬫満鐨勯┍鍔ㄧ▼搴忥紝鍚﹀垯鏃犳硶杩涜璋冭瘯銆傚湪鎬庢牱鍒犻櫎Android绯荤粺涓殑鍐呯疆搴旂敤涓鏂囦腑浣滆呬篃浠嬬粛浜嗗埄鐢ㄥ懡浠よ鍒犻櫎绯荤粺搴旂敤鐨勬柟娉曪紝鍙槸涓汉鎰熻澶夯鐑︿簡锛屼簨瀹炰笂鏈夋洿绠鍗曠殑鏂规硶锛屼粎浠呰涓夋灏卞彲浠ワ細adb remount-->adb shell-->cd system/app-->ls -a銆傜劧鍚...
  • 濡備綍鍦ㄧ數鑴戜腑瑁瀹夊崜鍜寃in8鍙岀郴缁
    绛旓細涓嬮潰绗旇呭氨鍛婅瘔澶у濡備綍灏Android x86瀹夎鍒拌嚜宸辩數鑴戠殑纭洏閲岄潰 8銆佲柌鍒涘缓涓涓笓涓哄瓨鏀続ndroid绯荤粺鐨勫垎鍖烘槸绗竴姝 褰撶劧锛屼綘鐨勭數鑴戣偗瀹氫笉鏄偅涔堢殑鈥骞插噣鈥濅綘鍙互鑷繁閫夋嫨浣犺鐨勫垎鍖虹劧鍚庤嚜琛岄夋嫨 娉ㄦ剰锛氬緢澶氭儏鍐典笅GPT纾佺洏浠栦笉鑳藉啀鍒嗗尯锛屽彧鑳戒娇鐢ㄤ綘鐨勫垎鍖 绗旇呰繖閲屼粛鐒惰鏁欏ぇ瀹跺浣曞垱寤轰竴涓嫭绔嬬殑鍒嗗尯銆傚湪涓婂浘...
  • Android 鏄惁鏈変竴浜涘喎闂ㄤ絾鍗撮嗗ぉ鐨 APP
    绛旓細Xposed鐔熶範Android鐨勫皬鎼。浠兘鐭ラ亾锛孉ndroid鏈澶х殑濂藉鍦ㄤ簬寮婧愩傚紑婧愭剰鍛崇潃鍙畾鍒跺寲绋嬪害楂橈紝瑕佹槸寮杈熻呭Android鍐呮牳鍜岃繍琛屽師鐞嗙殑鏄庣櫧鍏呰冻楂橈紝姣斿rovo89锛屼粬涔冭嚦鍙互鍒涢犲嚭Xposed濡傝鐨勫叏鑳芥鏋躲備綘鍙互閫氳繃瀹夌疆Xposed妯″潡鏉瀹炵幇绉嶇鐧捐埇鐨勬垚鏋溿傛洿澶氬叧浜嶺Posed鐨勬枃绔狅細鍋剁劧闂达紝浣犲拰鎴戝畨缃殑搴旂敤鍗歌浇鍚庡苟涓嶄細...
  • 濡備綍灏Android Studio鍗歌浇骞插噣?
    绛旓細鍒犻櫎灏卞ソ浜嗭紝缁胯壊杞欢
  • Root寮哄姏鍗歌浇澶у笀:濡備綍瀹屽叏鍗歌浇鎵嬫満搴旂敤
    绛旓細Root寮哄姏鍗歌浇澶у笀閫傜敤浜庡凡缁廟OOT杩囩殑Android鎵嬫満銆傚鏋滆繕娌℃湁ROOT杩囨墜鏈猴紝鍙互閫氳繃涓浜汻OOT宸ュ叿杩涜ROOT銆傚湪鍗歌浇搴旂敤绋嬪簭鏃讹紝Root寮哄姏鍗歌浇澶у笀鍙互鍗歌浇缁濆ぇ閮ㄥ垎搴旂敤绋嬪簭锛屽寘鎷郴缁熷簲鐢ㄧ▼搴忋備絾鏈変竴浜涘簲鐢ㄧ▼搴忔槸鏃犳硶鍗歌浇鐨勶紝渚嬪涓浜涢瑁呯殑绯荤粺搴旂敤绋嬪簭锛岃繖浜涘簲鐢ㄧ▼搴忓彲浠ョ鐢紝浣嗕笉鑳藉嵏杞姐備簲銆佹荤粨 閫氳繃浠ヤ笂浠嬬粛锛...
  • 鎬庢牱闄ゅ幓鎵嬫満搴旂敤绋嬪簭涓殑骞垮憡
    绛旓細閲嶆柊鎵撳寘dex鏂囦欢锛堝弻鍑烩渞edex.bat鈥濆嵆鍙紝鐒跺悗浼氱敓浜т竴涓渙ut.dex鈥濓紝鎶婂畠鏀瑰悕涓衡渃lasses.dex鈥濇浛鎹㈠埌鍘焌pk鍖呬腑鍗冲彲锛夛紝鐒跺悗涓烘敼鍔ㄨ繃鐨刟pk杞欢绛惧悕锛岃繖鏍蜂究寰楀埌浜嗕竴涓棤骞垮憡鐨勫簲鐢ㄣ備互涓婂氨鏄疉ndroid鏅鸿兘鎵嬫満娓呴櫎杞欢骞垮憡鐨勪笁绉嶆柟娉曪紝甯屾湜鑳藉府鍔╁ぇ瀹舵嫢鏈変竴涓骞插噣Android鎵嬫満浣跨敤鐜銆
  • 鎵嬫満娓呯悊杞欢娓呯悊鐨勬渶骞插噣浠嬬粛
    绛旓細閲岄潰鏈変釜娣卞害娓呯悊鍨冨溇鐨勫姛鑳芥墦寮鑵捐鎵嬫満绠″锛屽嚭鐜颁簡涓閿紭鍖栫殑鍔熻兘鐩存帴鐐瑰嚮灏卞彲浠ユ竻鐞嗗瀮鍦句簡灏变細鎶婃墜鏈洪噷闈㈢殑鍨冨溇娓呯悊骞插噣锛屾竻鐞嗙殑娲佸噣濡傛柊娣卞害娓呯悊鍔熻兘锛屽彲浠ユ竻鐞嗗瀮鍦炬枃浠剁紦瀛樻枃浠惰蒋浠剁殑娈嬩綑鍜屽浣欑殑瀹夎鍖咃紱浼楁墍鍛ㄧ煡锛瀹夊崜鎵嬫満涓鏃︿娇鐢ㄦ椂闂翠箙浜嗗氨浼氬彉寰楀緢鍗★紝寰堢紦鎱紝鍥犳锛岃浣跨敤鎵嬫満鍨冨溇娓呯悊杞欢鏉ヨ繘琛屽瀮鍦...
  • 扩展阅读:android官方正版下载 ... android苹果版下载 ... 苹果android怎么设置 ... androidstudio手机版下载 ... android下载安装app ... sysmac studio卸载干净 ... 苹果android在哪里找 ... android开发入门教程 ... oppo手机出现android ...

    本站交流只代表网友个人观点,与本站立场无关
    欢迎反馈与建议,请联系电邮
    2024© 车视网