diff --git a/MyCity/app/build.gradle b/MyCity/app/build.gradle index 25a08bb..1df261f 100644 --- a/MyCity/app/build.gradle +++ b/MyCity/app/build.gradle @@ -22,11 +22,7 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') api 'cz.msebera.android:httpclient:4.4.1.2' - - implementation 'com.jjoe64:graphview:4.2.2' - - implementation 'com.android.support:design:27.1.1' implementation 'com.android.support:appcompat-v7:27.0.0' implementation 'com.android.support:design:27.0.0' diff --git a/MyCity/app/src/main/java/gq/yigit/mycity/MainActivity.java b/MyCity/app/src/main/java/gq/yigit/mycity/MainActivity.java index b84cc91..085af48 100644 --- a/MyCity/app/src/main/java/gq/yigit/mycity/MainActivity.java +++ b/MyCity/app/src/main/java/gq/yigit/mycity/MainActivity.java @@ -179,6 +179,11 @@ public class MainActivity extends AppCompatActivity fragmentTransaction.replace(R.id.app_bar_main, fragment); fragmentTransaction.commit(); fragmentTransaction.addToBackStack(null); + }else if(id == R.id.denunciation){ + DenunciationFragment fragment = new DenunciationFragment(); + fragmentTransaction.replace(R.id.app_bar_main, fragment); + fragmentTransaction.commit(); + fragmentTransaction.addToBackStack(null); } diff --git a/MyCity/app/src/main/java/gq/yigit/mycity/tools/WebRequest.java b/MyCity/app/src/main/java/gq/yigit/mycity/tools/WebRequest.java index e1597c1..9c366f0 100644 --- a/MyCity/app/src/main/java/gq/yigit/mycity/tools/WebRequest.java +++ b/MyCity/app/src/main/java/gq/yigit/mycity/tools/WebRequest.java @@ -83,13 +83,13 @@ public class WebRequest extends AsyncTask { response = client.execute(post_request); Log.d("[BOOKMARK]","Done execute"); }catch (Exception e){ - Log.e("[ERROR](request:67): ", e.toString()); + Log.e("[ERROR](request:86): ", e.toString()); } }else{ try { response = client.execute(get_request); }catch (Exception e){ - Log.e("[ERROR](request:74): ", e.toString()); + Log.e("[ERROR](request:92): ", e.toString()); } } try { @@ -103,7 +103,7 @@ public class WebRequest extends AsyncTask { } return line; }catch(Exception e){ - Log.e("[ERROR](request:87): ", e.toString()); + Log.e("[ERROR](request:106): ", e.toString()); } return "Error"; } diff --git a/MyCity/app/src/main/res/menu/activity_main_drawer.xml b/MyCity/app/src/main/res/menu/activity_main_drawer.xml index cbf9424..6e32444 100644 --- a/MyCity/app/src/main/res/menu/activity_main_drawer.xml +++ b/MyCity/app/src/main/res/menu/activity_main_drawer.xml @@ -34,6 +34,11 @@ android:id="@+id/utilities" android:icon="@drawable/utility" android:title="Utilities"/> + + diff --git a/server_side/api/app.py b/server_side/api/app.py index db10a96..0f69c6f 100644 --- a/server_side/api/app.py +++ b/server_side/api/app.py @@ -1,7 +1,7 @@ from flask import Flask, send_from_directory from flask_restful import Api -from api.modules import user_info, voting_system, rating_system, utility +from api.modules import user_info, voting_system, rating_system, utility,denunciation,navigation app = Flask(__name__) api = Api(app) @@ -26,5 +26,9 @@ if __name__ == '__main__': api.add_resource( user_info.Login, '/login', '/login/' ) api.add_resource(utility.Resources, '/resources', '/resources/') - + + api.add_resource(denunciation.Alert, '/denunciation', '/denunciation/') + + api.add_resource(navigation.Transit, '/transit', '/transit/') + app.run(host='0.0.0.0', port=5000, ssl_context=context) diff --git a/server_side/api/modules/databases/users.json b/server_side/api/modules/databases/users.json index 1c55ccb..2bcffb7 100644 --- a/server_side/api/modules/databases/users.json +++ b/server_side/api/modules/databases/users.json @@ -10,6 +10,7 @@ "bus_usage_month": 5, "bus_usage_year": 67 }, + "trustability": "16", "daily_electricity_usage": [ 32, 34,