diff --git a/projects/CitiSimApp/.gitignore b/projects/CitiSimApp/.gitignore
new file mode 100644
index 00000000..2b75303a
--- /dev/null
+++ b/projects/CitiSimApp/.gitignore
@@ -0,0 +1,13 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/projects/CitiSimApp/.idea/codeStyles/Project.xml b/projects/CitiSimApp/.idea/codeStyles/Project.xml
new file mode 100644
index 00000000..30aa626c
--- /dev/null
+++ b/projects/CitiSimApp/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/.idea/gradle.xml b/projects/CitiSimApp/.idea/gradle.xml
new file mode 100644
index 00000000..2996d531
--- /dev/null
+++ b/projects/CitiSimApp/.idea/gradle.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/.idea/misc.xml b/projects/CitiSimApp/.idea/misc.xml
new file mode 100644
index 00000000..af0bbdde
--- /dev/null
+++ b/projects/CitiSimApp/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/.idea/runConfigurations.xml b/projects/CitiSimApp/.idea/runConfigurations.xml
new file mode 100644
index 00000000..7f68460d
--- /dev/null
+++ b/projects/CitiSimApp/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/.gitignore b/projects/CitiSimApp/app/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/projects/CitiSimApp/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/projects/CitiSimApp/app/build.gradle b/projects/CitiSimApp/app/build.gradle
new file mode 100644
index 00000000..fedd5b3b
--- /dev/null
+++ b/projects/CitiSimApp/app/build.gradle
@@ -0,0 +1,34 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 28
+ defaultConfig {
+ applicationId "com.main.citisim"
+ minSdkVersion 15
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ implementation 'com.google.android.gms:play-services-location:15.0.1'
+ implementation 'com.google.maps.android:android-maps-utils:0.5+' /////////////////
+ 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.google.android.gms:play-services-maps:16.1.0'
+ implementation 'com.google.android.gms:play-services-plus:16.0.0'
+ implementation 'com.android.volley:volley:1.1.1'
+
+}
diff --git a/projects/CitiSimApp/app/proguard-rules.pro b/projects/CitiSimApp/app/proguard-rules.pro
new file mode 100644
index 00000000..f1b42451
--- /dev/null
+++ b/projects/CitiSimApp/app/proguard-rules.pro
@@ -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
diff --git a/projects/CitiSimApp/app/src/androidTest/java/com/main/citisim/ExampleInstrumentedTest.java b/projects/CitiSimApp/app/src/androidTest/java/com/main/citisim/ExampleInstrumentedTest.java
new file mode 100644
index 00000000..e268ee1b
--- /dev/null
+++ b/projects/CitiSimApp/app/src/androidTest/java/com/main/citisim/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.main.citisim;
+
+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 Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.main.citisim", appContext.getPackageName());
+ }
+}
diff --git a/projects/CitiSimApp/app/src/main/AndroidManifest.xml b/projects/CitiSimApp/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..b134fe3c
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/AndroidManifest.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/java/com/main/citisim/MainActivity.java b/projects/CitiSimApp/app/src/main/java/com/main/citisim/MainActivity.java
new file mode 100644
index 00000000..2bcf1236
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/java/com/main/citisim/MainActivity.java
@@ -0,0 +1,119 @@
+package com.main.citisim;
+
+import android.app.Dialog;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.android.volley.AuthFailureError;
+import com.android.volley.NoConnectionError;
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.android.volley.TimeoutError;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.GoogleApiAvailability;
+
+import org.json.JSONObject;
+
+import java.util.HashMap;
+
+public class MainActivity extends AppCompatActivity {
+
+ private static final String TAG = "MainActivity";
+ private static final int ERROR_DIALOG_REQUEST = 9001;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ Button addBtn = (Button) findViewById(R.id.addBtn);
+ addBtn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ EditText username = (EditText) findViewById(R.id.username);
+ EditText password = (EditText) findViewById(R.id.password);
+ final TextView okmsg = (TextView) findViewById(R.id.okmsg);
+
+
+ //------LOGARE-------
+ okmsg.setText("");
+ HashMap data = new HashMap();
+ data.put("username", username.getText().toString());
+ data.put("password", password.getText().toString());
+ data.put("rememberMe", true);
+
+ String url =getResources().getString(R.string.api_server)+"/api/authenticate";
+
+ JsonObjectRequest jsonObjectRequest = new JsonObjectRequest
+ (Request.Method.POST, url, new JSONObject(data), new Response.Listener() {
+
+ @Override
+ public void onResponse(JSONObject response) {
+ okmsg.setText("Response: " + response.toString());
+ openMap();
+ }
+ }, new Response.ErrorListener() {
+
+ @Override
+ public void onErrorResponse(VolleyError error) {
+ // TODO: Handle error
+ if(error instanceof TimeoutError || error instanceof NoConnectionError){
+ Toast.makeText(getApplicationContext(),"no internet connection",Toast.LENGTH_SHORT).show();
+ }else if(error instanceof AuthFailureError){
+ Toast.makeText(getApplicationContext(),"wronguser/pass",Toast.LENGTH_SHORT).show();
+ }
+ else{
+ Toast.makeText(getApplicationContext(),"????",Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+
+// Access the RequestQueue through your singleton class.
+ MyVolleyQueue.getInstance(getApplicationContext()).addToRequestQueue(jsonObjectRequest);
+
+
+ //------LOGARE-------//
+ }
+ });
+ }
+
+ public void openMap(){
+ Intent intent = new Intent(this, Map.class);
+ startActivity(intent);
+ }
+
+
+ public boolean isServicesOK(){
+ Log.d(TAG,"isServicesOK: checking google services version");
+
+ int available = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(MainActivity.this);
+
+ if(available == ConnectionResult.SUCCESS) {
+ Log.d(TAG,"isServicesOK: Google Play Services is working");
+ return true;
+ }
+ else if(GoogleApiAvailability.getInstance().isUserResolvableError(available)) {
+ Log.d(TAG,"isServicesOK: a version error occured");
+ Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(MainActivity.this,available,ERROR_DIALOG_REQUEST);
+ dialog.show();
+ }else {
+ Toast.makeText(this,"an error occured",Toast.LENGTH_SHORT).show();
+ }
+ return false;
+ }
+
+
+
+
+
+}
+
diff --git a/projects/CitiSimApp/app/src/main/java/com/main/citisim/Map.java b/projects/CitiSimApp/app/src/main/java/com/main/citisim/Map.java
new file mode 100644
index 00000000..e3622dda
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/java/com/main/citisim/Map.java
@@ -0,0 +1,236 @@
+package com.main.citisim;
+
+import android.Manifest;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.location.Location;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.Toast;
+
+import com.google.android.gms.location.FusedLocationProviderClient;
+import com.google.android.gms.location.LocationServices;
+import com.google.android.gms.maps.CameraUpdateFactory;
+import com.google.android.gms.maps.GoogleMap;
+import com.google.android.gms.maps.OnMapReadyCallback;
+import com.google.android.gms.maps.SupportMapFragment;
+import com.google.android.gms.maps.model.LatLng;
+import com.google.android.gms.maps.model.TileOverlay;
+import com.google.android.gms.maps.model.TileOverlayOptions;
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import com.google.maps.android.heatmaps.HeatmapTileProvider;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Scanner;
+
+public class Map extends AppCompatActivity implements OnMapReadyCallback {
+
+ @Override
+ public void onMapReady(GoogleMap googleMap) {
+ mMap = googleMap;
+
+ if (mLocationPermissionsGranted) {
+ getDeviceLocation();
+ if (ActivityCompat.checkSelfPermission(this,
+ Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,
+ Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
+ return;
+ }
+ mMap.setMyLocationEnabled(true);
+ //mMap.getUiSettings(). different settings
+ }
+
+ }
+
+ private static final String TAG = "Map";
+
+ private static final String FINE_LOCATION=Manifest.permission.ACCESS_FINE_LOCATION;
+ private static final String COURSE_LOCATION=Manifest.permission.ACCESS_COARSE_LOCATION;
+ private static final int LOCATION_PERMISSION_REQUEST_CODE = 1234;
+ private static final float DEFAULT_ZOOM=15f;
+ //vars
+ private Boolean mLocationPermissionsGranted=false;
+ private GoogleMap mMap;
+ private FusedLocationProviderClient mFusedLocationProviderClient;
+ private Button button2;
+ public static double latitude;
+ public static double longitude;
+
+ private HeatmapTileProvider mProvider;
+
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_map);
+
+ getLocationPermission();
+
+ button2=(Button)findViewById(R.id.button2);
+ button2.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ openNewReport();
+ }
+ });
+
+ }
+
+
+
+ ///////////////////////////////////////////////////////
+
+
+
+ private void addHeatMap() {
+ List list = null;
+
+ // Get the data: latitude/longitude positions of police stations.
+ try {
+ list = readItems(R.raw.reports);
+ } catch (JSONException e) {
+ Toast.makeText(this, "Problem reading list of locations.", Toast.LENGTH_LONG).show();
+ }
+
+ // Create a heat map tile provider, passing it the latlngs of the police stations.
+ mProvider = new HeatmapTileProvider.Builder()
+ .data(list)
+ .build();
+ // Add a tile overlay to the map, using the heat map tile provider.
+ final TileOverlay mOverlay = mMap.addTileOverlay(new TileOverlayOptions().tileProvider(mProvider));
+ }
+
+
+ private ArrayList readItems(int resource) throws JSONException {
+ ArrayList list = new ArrayList();
+ InputStream inputStream = getResources().openRawResource(resource);
+ String json = new Scanner(inputStream).useDelimiter("\\A").next();
+ JSONArray array = new JSONArray(json);
+ for (int i = 0; i < array.length(); i++) {
+ JSONObject object = array.getJSONObject(i);
+ double lat = object.getDouble("lat");
+ double lng = object.getDouble("lng");
+ list.add(new LatLng(lat, lng));
+ }
+ return list;
+ }
+
+
+////////////////////////////////////////////////////////////
+
+ public void openNewReport(){
+ Intent intent = new Intent(this,NewReport.class);
+ startActivity(intent);
+ }
+
+ public void getDeviceLocation(){
+ mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);
+ try {
+ if(mLocationPermissionsGranted){
+ Task location = mFusedLocationProviderClient.getLastLocation();
+ location.addOnCompleteListener(new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ if(task.isSuccessful()){
+
+ addHeatMap(); ////////////
+ Log.d(TAG, "onComplete: found location!");
+ Location currentLocation = (Location) task.getResult();
+
+ moveCamera(new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude()),
+ DEFAULT_ZOOM );
+
+ latitude=currentLocation.getLatitude();
+ longitude=currentLocation.getLongitude();
+
+
+
+ }else{
+ Log.d(TAG, "onComplete: current location is null");
+ Toast.makeText(Map.this, "unable to get current location", Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+ }
+ }catch(SecurityException e){
+ Log.e(TAG, "getDeviceLocation: SecurityException: " +e.getMessage() );
+ }
+ }
+
+
+
+
+ private void moveCamera(LatLng latLng, float zoom){
+ mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,zoom));
+ }
+
+ private void initMap(){
+ SupportMapFragment mapFragment=(SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
+
+ mapFragment.getMapAsync(Map.this);
+ }
+
+ private void getLocationPermission(){
+ String[] permissions={Manifest.permission.ACCESS_FINE_LOCATION,
+ Manifest.permission.ACCESS_COARSE_LOCATION};
+
+ if(ContextCompat.checkSelfPermission(this.getApplicationContext(),
+ FINE_LOCATION)== PackageManager.PERMISSION_GRANTED) {
+ if(ContextCompat.checkSelfPermission(this.getApplicationContext(),
+ COURSE_LOCATION)== PackageManager.PERMISSION_GRANTED) {
+ mLocationPermissionsGranted = true;
+ initMap();
+ }else{
+ ActivityCompat.requestPermissions(this,
+ permissions,
+ LOCATION_PERMISSION_REQUEST_CODE);
+
+ }
+ }else{
+ ActivityCompat.requestPermissions(this,
+ permissions,
+ LOCATION_PERMISSION_REQUEST_CODE);
+
+ }
+
+ }
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+ mLocationPermissionsGranted = false;
+
+ switch(requestCode) {
+ case LOCATION_PERMISSION_REQUEST_CODE: {
+ if(grantResults.length>0) {
+ for(int i=0;i
+ cache = new LruCache(20);
+
+ @Override
+ public Bitmap getBitmap(String url) {
+ return cache.get(url);
+ }
+
+ @Override
+ public void putBitmap(String url, Bitmap bitmap) {
+ cache.put(url, bitmap);
+ }
+ });
+ }
+
+ public static synchronized MyVolleyQueue getInstance(Context context) {
+ if (instance == null) {
+ instance = new MyVolleyQueue(context);
+ }
+ return instance;
+ }
+
+ public RequestQueue getRequestQueue() {
+ if (requestQueue == null) {
+ // getApplicationContext() is key, it keeps you from leaking the
+ // Activity or BroadcastReceiver if someone passes one in.
+ requestQueue = Volley.newRequestQueue(ctx.getApplicationContext());
+ }
+ return requestQueue;
+ }
+
+ public void addToRequestQueue(Request req) {
+ getRequestQueue().add(req);
+ }
+
+ public ImageLoader getImageLoader() {
+ return imageLoader;
+ }
+}
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/java/com/main/citisim/NewReport.java b/projects/CitiSimApp/app/src/main/java/com/main/citisim/NewReport.java
new file mode 100644
index 00000000..923a29bc
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/java/com/main/citisim/NewReport.java
@@ -0,0 +1,122 @@
+package com.main.citisim;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.MediaStore;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+public class NewReport extends AppCompatActivity {
+
+ //vars
+ private Button backToReports;
+ private Button addImage;
+ private Button submitImage;
+ ImageView image;
+ private static final int PICK_IMAGE=100;
+ Uri imageUri;
+ EditText latitude;
+ EditText longitude;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_new_report);
+
+ latitude=(EditText)findViewById(R.id.latitudeView);
+ longitude=(EditText)findViewById(R.id.longitudeView);
+
+ image=(ImageView)findViewById(R.id.image) ;
+ backToReports=(Button)findViewById(R.id.backToReports);
+ backToReports.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ openMap2();
+ }
+ });
+
+ addImage=(Button)findViewById(R.id.addImage);
+ addImage.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ openGallery();
+ }
+ });
+
+ submitImage=(Button)findViewById(R.id. submitImage);
+ submitImage.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+
+ latitude.setText(Double.toString(Map.latitude));
+ longitude.setText(Double.toString(Map.longitude));
+ //writeToFile("");
+ //write to reports.json
+
+
+ }
+ });
+
+
+ }
+
+
+
+ ////////////////////////////........
+
+
+ public static void writeToFile(Context context, String fileName, String str){
+ try{
+ FileOutputStream fos = context.openFileOutput(fileName,Context.MODE_PRIVATE);
+ fos.write(str.getBytes(),0,str.length());
+ fos.close();
+ }catch (IOException e){
+ e.printStackTrace();
+ }
+ }
+
+///////////////////////////////..........
+
+
+
+
+ private void openGallery(){
+ Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);
+ startActivityForResult(gallery, PICK_IMAGE);
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data){
+ super.onActivityResult(requestCode,resultCode,data);
+ if(resultCode == RESULT_OK && requestCode == PICK_IMAGE) {
+ imageUri = data.getData();
+ image.setImageURI(imageUri);
+ //aici imaginea trebuie rotita
+ //aici imaginea trebuie rotita
+ //aici imaginea trebuie rotita
+ //aici imaginea trebuie rotita
+ }
+
+
+
+ }
+
+
+
+
+
+ public void openMap2(){
+ Intent intent = new Intent(this, Map.class);
+ startActivity(intent);
+ }
+
+}
diff --git a/projects/CitiSimApp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/projects/CitiSimApp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 00000000..1f6bb290
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/projects/CitiSimApp/app/src/main/res/drawable/ic_launcher_background.xml b/projects/CitiSimApp/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 00000000..0d025f9b
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/projects/CitiSimApp/app/src/main/res/drawable/logo.png b/projects/CitiSimApp/app/src/main/res/drawable/logo.png
new file mode 100644
index 00000000..fd21090e
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/drawable/logo.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/layout/activity_main.xml b/projects/CitiSimApp/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 00000000..33a7d497
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/res/layout/activity_map.xml b/projects/CitiSimApp/app/src/main/res/layout/activity_map.xml
new file mode 100644
index 00000000..560d4da1
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/layout/activity_map.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/res/layout/activity_new_report.xml b/projects/CitiSimApp/app/src/main/res/layout/activity_new_report.xml
new file mode 100644
index 00000000..a6916345
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/layout/activity_new_report.xml
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/projects/CitiSimApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..eca70cfe
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/projects/CitiSimApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 00000000..eca70cfe
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-hdpi/ic_launcher.png b/projects/CitiSimApp/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..898f3ed5
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/projects/CitiSimApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 00000000..dffca360
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-mdpi/ic_launcher.png b/projects/CitiSimApp/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..64ba76f7
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/projects/CitiSimApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 00000000..dae5e082
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/projects/CitiSimApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..e5ed4659
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/projects/CitiSimApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 00000000..14ed0af3
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/projects/CitiSimApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..b0907cac
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/projects/CitiSimApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 00000000..d8ae0315
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/projects/CitiSimApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..2c18de9e
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/projects/CitiSimApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 00000000..beed3cdd
Binary files /dev/null and b/projects/CitiSimApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/projects/CitiSimApp/app/src/main/res/raw/reports.json b/projects/CitiSimApp/app/src/main/res/raw/reports.json
new file mode 100644
index 00000000..3a5ee669
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/raw/reports.json
@@ -0,0 +1,3 @@
+[
+ {"lat" : 44.3957214, "lng" : 26.1025811 }
+]
\ No newline at end of file
diff --git a/projects/CitiSimApp/app/src/main/res/values/colors.xml b/projects/CitiSimApp/app/src/main/res/values/colors.xml
new file mode 100644
index 00000000..69b22338
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #008577
+ #00574B
+ #D81B60
+
diff --git a/projects/CitiSimApp/app/src/main/res/values/strings.xml b/projects/CitiSimApp/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..26ac26f0
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/values/strings.xml
@@ -0,0 +1,5 @@
+
+ CitiSim
+ AIzaSyCjNrSR-6cPUrGPx7hKcuHDLVKKILaYGTE
+ http://54.171.179.128:8080
+
diff --git a/projects/CitiSimApp/app/src/main/res/values/styles.xml b/projects/CitiSimApp/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..5885930d
--- /dev/null
+++ b/projects/CitiSimApp/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/projects/CitiSimApp/app/src/test/java/com/main/citisim/ExampleUnitTest.java b/projects/CitiSimApp/app/src/test/java/com/main/citisim/ExampleUnitTest.java
new file mode 100644
index 00000000..f44ee106
--- /dev/null
+++ b/projects/CitiSimApp/app/src/test/java/com/main/citisim/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.main.citisim;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/projects/CitiSimApp/build.gradle b/projects/CitiSimApp/build.gradle
new file mode 100644
index 00000000..1a3198f8
--- /dev/null
+++ b/projects/CitiSimApp/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ google()
+ jcenter()
+
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.3.2'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ maven { url "https://maven.google.com" }
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/projects/CitiSimApp/gradle.properties b/projects/CitiSimApp/gradle.properties
new file mode 100644
index 00000000..82618cec
--- /dev/null
+++ b/projects/CitiSimApp/gradle.properties
@@ -0,0 +1,15 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+
diff --git a/projects/CitiSimApp/gradle/wrapper/gradle-wrapper.properties b/projects/CitiSimApp/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..0e17577a
--- /dev/null
+++ b/projects/CitiSimApp/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue Apr 02 10:41:47 EEST 2019
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
diff --git a/projects/CitiSimApp/gradlew b/projects/CitiSimApp/gradlew
new file mode 100644
index 00000000..cccdd3d5
--- /dev/null
+++ b/projects/CitiSimApp/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/projects/CitiSimApp/gradlew.bat b/projects/CitiSimApp/gradlew.bat
new file mode 100644
index 00000000..f9553162
--- /dev/null
+++ b/projects/CitiSimApp/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/projects/CitiSimApp/settings.gradle b/projects/CitiSimApp/settings.gradle
new file mode 100644
index 00000000..e7b4def4
--- /dev/null
+++ b/projects/CitiSimApp/settings.gradle
@@ -0,0 +1 @@
+include ':app'