Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions trazador/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
22 changes: 22 additions & 0 deletions trazador/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions trazador/.idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions trazador/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions trazador/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions trazador/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions trazador/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions trazador/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions trazador/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions trazador/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Trazador

![](http://s.pictub.club/2016/11/29/NcrRi.png)

## Generar el APK

Correr el comando

```
gradle assemble
```

Esto generará el APK en el folder /build/apk/

## Características del app


1. Grabar una ruta con puntos y paradas
2. Descartas o finalizar un ruta
3. Agregar metadatos a la ruta


## Por hacer


1. Prevenir problemas de pérdida de datos de ubicación debido a una pérdida de coneccion con el servidor.
2. Separar el SDK para conectarse al servidor del App para poder utilizarlo en otros proyectos.
3. Refactorizar codigo para adaptarlo a estándares adecuados.
6. Dibujar al trazado de ruta sobre el mapa


1 change: 1 addition & 0 deletions trazador/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
54 changes: 54 additions & 0 deletions trazador/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.xavi.trazador_v10"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'

compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.jakewharton.threetenabp:threetenabp:1.0.4'

compile 'com.android.support:appcompat-v7:24.2.0'

compile 'com.android.support:design:24.2.0'

compile 'org.osmdroid:osmdroid-android:5.5:release@aar'

compile 'com.github.MKergall:osmbonuspack:6.0'

compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-beta.4@aar'){
transitive=true
}



}







17 changes: 17 additions & 0 deletions trazador/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/xavi/Android/Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.xavi.trazador_v10;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
47 changes: 47 additions & 0 deletions trazador/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.xavi.trazador_v10">

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<uses-feature android:name="android.hardware.location.gps" />

<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService" />


<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<service android:name=".GPS_Service" />

<activity
android:name=".metadata"
android:label="@string/title_activity_metadata"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings" />
<activity
android:name=".Finalize"
android:label="@string/title_activity_finalize"
android:theme="@style/AppTheme.NoActionBar"></activity>
</application>

</manifest>
Binary file added trazador/app/src/main/btn_savemetadata-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trazador/app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package com.example.xavi.trazador_v10;

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Toast;

public class Finalize extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_finalize);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

FloatingActionButton guardar = (FloatingActionButton) findViewById(R.id.btn_guardar);
FloatingActionButton cancelar = (FloatingActionButton) findViewById(R.id.btn_cancelar);



guardar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.state = 0;
Toast.makeText(getBaseContext(), "Fin de ruta", Toast.LENGTH_SHORT).show();
MainActivity.btnInicio.setBackgroundResource(R.drawable.btn_iniciar);

MainActivity.trace.finished();
Intent intent = new Intent();
setResult(RESULT_OK, intent);
clearMapMarks();
finish();

}
});
cancelar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.state = 0;
Toast.makeText(getBaseContext(), "Fin de ruta", Toast.LENGTH_SHORT).show();
MainActivity.btnInicio.setBackgroundResource(R.drawable.btn_iniciar);
clearMapMarks();
MainActivity.trace.discarded();
Intent intent = new Intent();
setResult(RESULT_OK, intent);
finish();

}
});
}

private void clearMapMarks() {
for (int x = 0; x< MainActivity.points.size() ; x++ ){
MainActivity.map.getOverlays().remove(MainActivity.points.get(x));
}
MainActivity.points.clear();
}

}
Loading