Browse Source

Hello there

old
Yiğit Çolakoğlu 6 years ago
parent
commit
99e856a6e3
6 changed files with 20 additions and 9 deletions
  1. +0
    -4
      MyCity/app/build.gradle
  2. +5
    -0
      MyCity/app/src/main/java/gq/yigit/mycity/MainActivity.java
  3. +3
    -3
      MyCity/app/src/main/java/gq/yigit/mycity/tools/WebRequest.java
  4. +5
    -0
      MyCity/app/src/main/res/menu/activity_main_drawer.xml
  5. +6
    -2
      server_side/api/app.py
  6. +1
    -0
      server_side/api/modules/databases/users.json

+ 0
- 4
MyCity/app/build.gradle View File

@ -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'


+ 5
- 0
MyCity/app/src/main/java/gq/yigit/mycity/MainActivity.java View File

@ -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);
}


+ 3
- 3
MyCity/app/src/main/java/gq/yigit/mycity/tools/WebRequest.java View File

@ -83,13 +83,13 @@ public class WebRequest extends AsyncTask<Void,Void,String> {
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<Void,Void,String> {
}
return line;
}catch(Exception e){
Log.e("[ERROR](request:87): ", e.toString());
Log.e("[ERROR](request:106): ", e.toString());
}
return "Error";
}


+ 5
- 0
MyCity/app/src/main/res/menu/activity_main_drawer.xml View File

@ -34,6 +34,11 @@
android:id="@+id/utilities"
android:icon="@drawable/utility"
android:title="Utilities"/>
<item
android:id="@+id/denunciation"
android:icon="@drawable/denunciation"
android:title="Denunciation"/>
</menu>
</item>


+ 6
- 2
server_side/api/app.py View File

@ -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)

+ 1
- 0
server_side/api/modules/databases/users.json View File

@ -10,6 +10,7 @@
"bus_usage_month": 5,
"bus_usage_year": 67
},
"trustability": "16",
"daily_electricity_usage": [
32,
34,


Loading…
Cancel
Save