Android Open Source - Andriod-PC-GPSApplication Android P C Client Launcher






From Project

Back to project page Andriod-PC-GPSApplication.

License

The source code is released under:

MIT License

If you think the Android project Andriod-PC-GPSApplication listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.dev.appxpress.gps.android_pc;
// w w w.jav  a2s .  c o m
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.LogManager;

import com.dev.appxpress.gps.android_pc.runtime.exec.PortForwarder;

/**
 * Read data stored in an Android device via USB cable.
 * 
 * @author NThusitha
 * @Date 21-August-2014
 * 
 */
public class AndroidPCClientLauncher {

  private static long QUERY_INTERVAL = 30000;

  public static void main(String[] args) throws SecurityException,
      FileNotFoundException, IOException {

    if (args.length > 0) {
      QUERY_INTERVAL = Long.parseLong(args[0]);
    }
    

    /*LogManager logManager = LogManager.getLogManager();
    logManager
        .readConfiguration(new FileInputStream(
            "C:\\sandbox\\ethicalsourcing\\GPSAndoirdPCModule\\android-pc\\src\\main\\resources\\log\\log.config"));*/

    PortForwarder.forwardTCP();
    AndroidDataReader reader = new AndroidDataReader();

    for (;;) {

      reader.doConnect();
      try {
        Thread.sleep(QUERY_INTERVAL);
      } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
  }
}




Java Source Code List

com.dev.appxpress.gps.android_pc.AndroidDataReader.java
com.dev.appxpress.gps.android_pc.AndroidPCClientLauncher.java
com.dev.appxpress.gps.android_pc.data.handler.GPSDataHandler.java
com.dev.appxpress.gps.android_pc.domain.GPSAware.java
com.dev.appxpress.gps.android_pc.domain.GPSWayPoint.java
com.dev.appxpress.gps.android_pc.runtime.exec.PortForwarder.java
com.dev.appxpress.gps.android_pc.util.DateTimeUtil.java
com.dev.appxpress.gps.android_pc.util.PrintManager.java
com.example.appxgpsmodule.Globals.java
com.example.appxgpsmodule.Loaded.java
com.example.appxgpsmodule.Start.java
com.example.appxgpsmodule.storage.ExternalStorageReader.java