登录
首页 » Java » android 远程监控 源码下载 (含服务器端和android端)

android 远程监控 源码下载 (含服务器端和android端)

于 2014-09-11 发布
0 166
下载积分: 1 下载次数: 0

代码说明:

client文件夹下是客户端的工程文件(Android)server文件夹下是服务器端的工程文件(Qt)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 利用MATLAB进行弹道仿真源代码
    不可多得的导弹仿真源程序 非常的经典 绝对不会后悔
    2020-05-25下载
    积分:1
  • AndroidQQ源项目代码 实例下载
    Android开发QQ开源项目代码 实例下载
    2014-09-28下载
    积分:1
  • android 时间轴 实例源码下载
    android 时间轴 实例源码下载
    2014-12-04下载
    积分:1
  • Android tcp通讯学习用
    核心代码:package com.Test;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.util.Log;import android.app.Activity;import android.view.Menu;import android.widget.Button;import android.view.View;import android.view.View.OnClickListener;import java.io.BufferedInputStream;import java.io.InputStream;import java.io.OutputStream;import java.io.IOException;import java.io.UnsupportedEncodingException;import java.io.InputStreamReader;import java.io.BufferedReader;import java.io.PrintWriter;import java.io.Reader;import java.net.Socket;import java.net.ServerSocket;import java.net.UnknownHostException;import android.view.TextureView;import android.widget.EditText;import java.lang.String;import java.lang.Thread;public class MainActivity extends Activity implements OnClickListener{ private Button m_btn; private Button m_sendbtn; private ServerSocket mySerSocket; private Socket clientSocket; private EditText m_edit; private String line; boolean conn = true; private Socket accSocket; private static final String Host = "10.0.2.2"; private static final int Port = 12000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); m_btn = (Button)findViewById(R.id.button1); m_sendbtn = (Button)findViewById(R.id.button2); m_edit = (EditText)findViewById(R.id.editText1); //m_btn.setOnClickListener(this); m_btn.setOnClickListener(new ReceiverListener()); m_sendbtn.setOnClickListener(this); //Socket clientSocket = new Socket(Host, Port); } class ReceiverListener implements OnClickListener { private ReceiveThread mReceiveThread = null; private boolean stop = true; private Handler mHandler = null; public void onClick(View v) { try { if(clientSocket == null) { clientSocket = new Socket(Host, Port); } // InputStream myInputStream = clientSocket.getInputStream();// // //BufferedReader in = new BufferedReader(new InputStreamReader(myInputStream));//// byte [] buffer = new byte[myInputStream.available()]; //int temp = 0; //String strMsg = in.readLine(); // myInputStream.read(buffer);// // // String strMsg = new String(buffer);// // m_edit.setText(strMsg);// while ((temp = myInputStream.read(buffer)) != -1)// {// m_edit.setText(new String(buffer, 0, temp));//// } mReceiveThread = new ReceiveThread(clientSocket); stop = false; mReceiveThread.start(); } catch (IOException e) { e.printStackTrace(); } //消息处理 mHandler = new Handler() { public void handleMessage(Message msg) { m_edit.setText((msg.obj).toString()); } }; } private class ReceiveThread extends Thread { private InputStream inStream = null; private byte[] buf; private String str = null; ReceiveThread(Socket s) { try { this.inStream = s.getInputStream(); } catch(IOException e) { e.printStackTrace(); } } public void run() { while(!stop) { this.buf = new byte[512]; try { this.inStream.read(this.buf); } catch(IOException e) { e.printStackTrace(); } try { this.str = new String(this.buf, "GB2312").trim(); } catch(UnsupportedEncodingException e) { e.printStackTrace(); } Message msg = new Message(); msg.obj = this.str; mHandler.sendMessage(msg); } } } } public void onClick(View v) {// if (v.getId() == R.id.button1)// {// new Thread()// {// public void run()// {// try // {// if(clientSocket == null)// {// clientSocket = new Socket(Host, Port);// } // InputStream myInputStream = clientSocket.getInputStream();// // BufferedReader in = new BufferedReader(new InputStreamReader(myInputStream));//// byte [] buffer = new byte[1024 * 4];//// int temp = 0;// // String strMsg = in.readLine();// // //myInputStream.read(buffer);// // //String strMsg = new String(buffer);// // m_edit.setText(strMsg);////// while ((temp = myInputStream.read(buffer)) != -1)//// {//// m_edit.setText(new String(buffer, 0, temp));//////// }// // }// catch (IOException e)// {// e.printStackTrace();// }// }// }.start();// // } if(v.getId() == R.id.button2) { new Thread() { public void run() { try { if(clientSocket == null) { clientSocket = new Socket(Host, Port); } //inputStream clientInputStream = clientSocket. String msg = "RESET-SHOW"; //InputStream clientInputStream = clientSocket.getInputStream(); //BufferedReader br = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); //BufferedReader br = new BufferedReader(); //line = br.readLine(); OutputStream clientOutputStream = clientSocket.getOutputStream(); byte buffer[]=msg.getBytes(); clientOutputStream.write(buffer); clientOutputStream.flush(); //int temp = 0; // PrintWriter out = new PrintWriter(clientOutputStream);// // out.println("Serer Message: " msg); } catch(IOException e) { e.printStackTrace(); } } }.start(); } }private Reader InputStreamReader() { // TODO Auto-generated method stub return null; }// private Handler handler = new Handler()// {// public void handleMessage(Message msg)// {// super.handleMessage(msg);// //处理UI// m_edit.setText("Finish");// Log.i("PDA", "Finish");// // }// }; @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; }}
    2014-08-18下载
    积分:1
  • Android文件上传例子 含服务器端源码
    Android文件上传 源码
    2013-06-28下载
    积分:1
  • android Toast使用示例详解,含源码下载
    这几种情况都是比较常用的 Toast示例,供大家参考学习
    2014-04-14下载
    积分:1
  • J2E图书管理系统
    J2E图书管理系统
    2017-05-31下载
    积分:1
  • android 可自定义样式的dialog 实例源码
    android 可自定义样式的dialog 实例源码
    2014-08-21下载
    积分:1
  • Android视频传输
    Android端代码和计算机端Java代码,实现了手机视频向计算机端的传输,计算机端可以拍照
    2013-05-02下载
    积分:1
  • 学生成绩管理系统
    【实例简介】基本实现老师登陆和学生登陆两大功能,其中老师登陆实现7种功能,学生只有四种功能
    2021-08-07 00:30:57下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载