Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
308860b
first login and init layout
joaquinolivera Jul 3, 2019
53e3bdb
add some new layouts and dependencies
joaquinolivera Jul 4, 2019
6077598
add more layouts and api controllers
joaquinolivera Jul 8, 2019
811ce74
add login and registration
joaquinolivera Jul 10, 2019
6cfe8d2
add Login and Registry services and receivers, working
joaquinolivera Jul 11, 2019
f27b51b
Navigation menu incorporated
joaquinolivera Jul 11, 2019
afffc3a
added alert and progress dialogs in a way
joaquinolivera Jul 11, 2019
55284c2
add toast, timeout to request, response on not_connection and credent…
joaquinolivera Jul 12, 2019
3d692db
session based loggin done
joaquinolivera Jul 23, 2019
39f832d
start reset and change password for user
joaquinolivera Jul 24, 2019
d421d43
add hamburguer menu
joaquinolivera Jul 25, 2019
4fbc029
init logout function
joaquinolivera Jul 25, 2019
b3e3309
solve some cookies problem
joaquinolivera Jul 26, 2019
d9b0e16
change flag from a start activity, change some margins and datatype b…
joaquinolivera Jul 26, 2019
1319c3c
add change password process
joaquinolivera Jul 28, 2019
43318fe
add ui map consuming osm tile server
joaquinolivera Aug 10, 2019
84fbca5
add mpaview with item and user location marker
joaquinolivera Aug 12, 2019
080404c
add notifications manager in home
joaquinolivera Aug 12, 2019
f0c96d9
halfway proximity Alert
joaquinolivera Aug 12, 2019
396bb9b
add proximity alert services for the UC
joaquinolivera Aug 15, 2019
ebd35a4
notification fixes, with proximity alert as well
joaquinolivera Aug 18, 2019
dad8661
add lot of examples of geofences, with google location services
joaquinolivera Aug 23, 2019
e90e13b
fusedlocation and geofence api services added to app
joaquinolivera Aug 25, 2019
7dc2534
some clean up code and remove useless files
joaquinolivera Aug 25, 2019
3e5954d
some extra cleaning code
joaquinolivera Aug 25, 2019
92b033a
erase somo junk code
Aug 25, 2019
f8482d9
merge ui map and percepcion modules
joaquinolivera Aug 26, 2019
ef6c947
get the lots that are register in the server and add geofences
joaquinolivera Aug 27, 2019
67bd572
add get spots service, and try to draw it
joaquinolivera Aug 27, 2019
e9a0e40
finish the drawing using requests
joaquinolivera Aug 27, 2019
e136c1c
add transition detection
joaquinolivera Aug 29, 2019
c3cfea8
start of the occupation and release of parking spaces
joaquinolivera Aug 30, 2019
9247158
solve some notifications, fragments communications problems
joaquinolivera Aug 31, 2019
23aca87
before taking fragments off for improvement
joaquinolivera Aug 31, 2019
e36679c
first clean up of the lateral menu
joaquinolivera Aug 31, 2019
d219b54
take away fragments and work activity recon
joaquinolivera Sep 1, 2019
4e7e7cf
add transition activity detecter functional, dialogs for park
joaquinolivera Sep 2, 2019
2a03f23
change app icon
joaquinolivera Sep 3, 2019
7c3dcd5
changes for having a token authentication login,register
joaquinolivera Sep 3, 2019
a32a821
add logout, changePass and take off username generator only acceptance
joaquinolivera Sep 4, 2019
931fc1a
change to the new spot/lots sistem with token auth and new interfaces
joaquinolivera Sep 10, 2019
ea8d429
add set and reset spot services
joaquinolivera Sep 10, 2019
99b0335
add possible events model
joaquinolivera Sep 10, 2019
ef5413a
delete smartparkingusertoken file
Sep 10, 2019
67e01bd
add basic auth to tile server conn
Sep 13, 2019
3ac8493
correction on flag of parkDialog
Sep 14, 2019
5ac8446
change tile server base url
Sep 14, 2019
63f5c85
erase direct pass
Sep 14, 2019
ef026ce
add center screen button on map
Sep 14, 2019
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@ db.sqlite3

/requirements/
/static
/.venv
/.venv


app\src\main\java\smarttraffic\smartparking\SmartParkingInitialData.java
Binary file not shown.
Binary file not shown.
Binary file added .gradle/5.1.1/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/5.1.1/fileContent/fileContent.lock
Binary file not shown.
Binary file added .gradle/5.1.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/5.1.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/5.1.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Empty file added .gradle/5.1.1/gc.properties
Empty file.
Binary file added .gradle/5.1.1/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file added .gradle/5.1.1/javaCompile/javaCompile.lock
Binary file not shown.
Binary file added .gradle/5.1.1/javaCompile/taskHistory.bin
Binary file not shown.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Wed Jul 03 18:47:24 PYT 2019
gradle.version=5.1.1
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
Empty file.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
220 changes: 220 additions & 0 deletions app/app.iml

Large diffs are not rendered by default.

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

android {
compileSdkVersion 28
defaultConfig {
applicationId "smarttraffic.smartparking"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation "com.android.support:support-compat:28.0.0"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.jakewharton:butterknife:8.7.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'org.osmdroid:osmdroid-android:6.1.0'
implementation 'org.osmdroid:osmdroid-wms:6.1.0'
implementation 'org.osmdroid:osmdroid-mapsforge:6.1.0'
implementation 'org.osmdroid:osmdroid-geopackage:6.1.0'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# 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 *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package smarttraffic.smartparking;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("smarttraffic.smartparking", appContext.getPackageName());
}
}
128 changes: 128 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="smarttraffic.smartparking">

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

<!-- Needed only if your app targets Android 5.0 (API level 21) or higher. -->
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />

<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<application
tools:replace="android:allowBackup"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/smart_parking_logo_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity android:name=".activities.InitActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="smarttraffic.smartparking.activities.LoginActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.SmartParking"
android:windowSoftInputMode="stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="smarttraffic.smartparking.activities.InitActivity" />
</activity>
<activity
android:name="smarttraffic.smartparking.activities.HomeActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/AppTheme.SmartParking"
android:windowSoftInputMode="stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="smarttraffic.smartparking.activities.InitActivity" />
</activity>
<activity
android:name="smarttraffic.smartparking.activities.RegistryActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.SmartParking"
android:windowSoftInputMode="stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="smarttraffic.smartparking.activities.LoginActivity" />
</activity>
<activity
android:name="smarttraffic.smartparking.activities.ResetPassActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.SmartParking"
android:windowSoftInputMode="stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="smarttraffic.smartparking.activities.LoginActivity" />
</activity>
<activity
android:name="smarttraffic.smartparking.activities.ChangePasswordActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.SmartParking"
android:windowSoftInputMode="stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="smarttraffic.smartparking.activities.HomeActivity" />
</activity>

<service
android:name=".services.LoginService"
android:enabled="true"
android:exported="false"></service>
<service
android:name=".services.RegistrationService"
android:enabled="true"
android:exported="false"></service>
<service
android:name=".services.DetectedActivitiesService"
android:enabled="true"
android:exported="false"></service>

<receiver android:name=".receivers.LoginReceiver"
android:exported="true"
android:enabled="true">
<intent-filter>
<action android:name="loginIntent"/>
</intent-filter>
</receiver>
<receiver android:name=".receivers.RegistrationReceiver"
android:exported="true"
android:enabled="true">
<intent-filter>
<action android:name="registrationIntent"/>
</intent-filter>
</receiver>

<receiver
android:name=".receivers.GeofenceBroadcastReceiver"
android:enabled="true"
android:exported="true" />

<service
android:name=".services.GeofenceTransitionsJobIntentService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />

</application>

</manifest>
139 changes: 139 additions & 0 deletions app/src/main/java/smarttraffic/smartparking/Constants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
package smarttraffic.smartparking;

/**
* Created by Joaquin Olivera on august 19.
*
* @author joaquin
*/

public class Constants {

/**
* Add here all variables used at width in the project...
* **/
public Constants() {
}

public static final String USER_PASSWORD = "USER_PASSWORD";
public static final String USER_TOKEN = "USER_TOKEN";
public static final String CLIENT_NOT_LOGIN = "CLIENT_NOT_LOGIN";
public static final String CLIENTE_DATA = "CLIENTE_DATA";
public static final String USER_ID = "USER_ID";
public static final String USER_URL = "USER_URL";
public static final String APPLICATION_ID = "1";
public static final String EVENT_BASIC = "/entities/smartparking/event_types/";

public static final int NOT_IN_PARKINGSPOT = -1;
public static final String GEOFENCE_LOTS_SHARED_PREFERENCES = "GEOFENCE_LOTS_SHARED_PREFERENCES";
private static final String BROADCAST_GEOFENCE_TRIGGER_INTENT = "BROADCAST_GEOFENCE_TRIGGER_INTENT";
public static final String BROADCAST_TRANSITION_ACTIVITY_INTENT = "BROADCAST_TRANSITION_ACTIVITY_INTENT";
public static final String GEOFENCE_TRIGGER_ID = "geofenceTriggerId";
public static final String GEOFENCE_TRANSITION_TYPE = "GEOFENCE_TRANSITION_TYPE";

public static final String KEY_DETECTED_ACTIVITIES = "KEY_DETECTED_ACTIVITIES";
public static final String KEY_ACTIVITY_UPDATES_REQUESTED = "KEY_ACTIVITY_UPDATES_REQUESTED";
public static final String GEOFENCES_ADDED_KEY = "GEOFENCES_ADDED_KEY";
private static final long SECONDS_IN_MILLISECONDS = 1000 * 1;
public static final String ACTIVITY_TYPE_TRANSITION = "ACTIVITY_TYPE_TRANSITION";
public static final String ACTIVITY_CONFIDENCE_TRANSITION = "ACTIVITY_CONFIDENCE_TRANSITION";
public static final long DETECTION_INTERVAL_IN_MILLISECONDS = SECONDS_IN_MILLISECONDS; // 30 seconds
private static final long MINUTES_IN_MILLISECONDS = SECONDS_IN_MILLISECONDS * 60;
private static final long HOURS_IN_MILLISECONDS = MINUTES_IN_MILLISECONDS * 60;
public static final String BASE_URL = "http://192.168.100.5:8000/";
private static final String CHANNEL_ID = "SMARTPARKING_CHANNEL_ID";
private static final String PROXIMITY_INTENT_ACTION = "SMARTPARKING_PROXIMITY_ALERT";
private static final String NOTIFICATION_SERVICE = "notification";
private static final String BROADCAST_LOCATION_INTENT = "BROADCAST_LOCATION_INTENT";
private static final String FROM_PROXIMITY_INTENT = "FROM_PROXIMITY_INTENT";
private static final String INTENT_FROM = "INTENT_FROM";
private static final String LATITUD = "LATITUD";
private static final String LONGITUD = "LONGITUD";
private static final String RADIOUS = "RADIOUS";
private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 1;
private static final long DISTANCE_CHANGE_FOR_UPDATES = 100;
private static final long HIGH_FREQUENCY_UPDATES = SECONDS_IN_MILLISECONDS * 1;
private static final long LOW_FREQUENCY_UPDATES = MINUTES_IN_MILLISECONDS * 20;
private static final String PROX_ALERT_INTENT = "smarttraffic.smartparking.services.ProximityAlert";
public static final String TILE_SERVER = "https://smarttraffic.com.py/tile/";
public static final int REQUEST_CHECK_SETTINGS = 0x1;
/**
* The desired interval for location updates. Inexact. Updates may be more or less frequent.
*/

public static String getUserId() {
return USER_ID;
}

public static String getBroadcastGeofenceTriggerIntent(){
return BROADCAST_GEOFENCE_TRIGGER_INTENT;
}
public static String getLatitud() {
return LATITUD;
}

public static String getLongitud() {
return LONGITUD;
}

public static String getRadious() {
return RADIOUS;
}
public static String getProxAlertIntent() {
return PROX_ALERT_INTENT;
}

public static String getFromProximityIntent() {
return FROM_PROXIMITY_INTENT;
}

public static String getIntentFrom() {
return INTENT_FROM;
}

public static String getBroadcastLocationIntent() {
return BROADCAST_LOCATION_INTENT;
}

public static long getMinDistanceChangeForUpdates() {
return MIN_DISTANCE_CHANGE_FOR_UPDATES;
}

public static long getDistanceChangeForUpdates() {
return DISTANCE_CHANGE_FOR_UPDATES;
}

public static long getHighFrequencyUpdates() {
return HIGH_FREQUENCY_UPDATES;
}

public static long getLowFrequencyUpdates() {
return LOW_FREQUENCY_UPDATES;
}


public static long getSecondsInMilliseconds() {
return SECONDS_IN_MILLISECONDS;
}

public static long getMinutesInMilliseconds() {
return MINUTES_IN_MILLISECONDS;
}

public static long getHoursInMilliseconds() {
return HOURS_IN_MILLISECONDS;
}

public static String getNotificationService() {
return NOTIFICATION_SERVICE;
}

public static String getProximityIntentAction() {
return PROXIMITY_INTENT_ACTION;
}

public static String getChannelId() {
return CHANNEL_ID;
}


}
Loading