Android Open Source - Geotrackin Open G T S Logger

From Project

Back to project page Geotrackin.


The source code is released under:

GNU General Public License

If you think the Android project Geotrackin 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

*    This file is part of GPSLogger for Android.
*//from  w  w  w . j  av  a2  s  .  c o  m
*    GPSLogger for Android is free software: you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation, either version 2 of the License, or
*    (at your option) any later version.
*    GPSLogger for Android is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    GNU General Public License for more details.
*    You should have received a copy of the GNU General Public License
*    along with GPSLogger for Android.  If not, see <>.

package com.geotrackin.gpslogger.loggers;

import android.location.Location;
import com.geotrackin.gpslogger.common.AppSettings;
import com.geotrackin.gpslogger.common.IActionListener;
import com.geotrackin.gpslogger.common.OpenGTSClient;

 * Send locations directly to an OpenGTS server <br/>
 * @author Francisco Reynoso
public class OpenGTSLogger implements IFileLogger {

    protected final String name = "OpenGTS";

    public OpenGTSLogger() {

    public void Write(Location loc) throws Exception {

        String server = AppSettings.getOpenGTSServer();
        int port = Integer.parseInt(AppSettings.getOpenGTSServerPort());
        String accountName = AppSettings.getOpenGTSAccountName();
        String path = AppSettings.getOpenGTSServerPath();
        String deviceId = AppSettings.getOpenGTSDeviceId();
        String communication = AppSettings.getOpenGTSServerCommunicationMethod();

        IActionListener al = new IActionListener() {
            public void OnComplete() {

            public void OnFailure() {

        OpenGTSClient openGTSClient = new OpenGTSClient(server, port, path, al, null);

            openGTSClient.sendRAW(deviceId, accountName, loc);
            openGTSClient.sendHTTP(deviceId, accountName, loc);


    public void Annotate(String description, Location loc) throws Exception {

    public String getName() {
        return name;


Java Source Code List