Skip to content

Commit

Permalink
Update for new aurion api version
Browse files Browse the repository at this point in the history
  • Loading branch information
wallforfry committed Jun 19, 2017
1 parent 9873e26 commit 140f2bc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .idea/modules.xml

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

2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
config {
keyAlias 'Macao'
keyPassword 'F5jxbqwKT'
storeFile file('C:/Users/Wallerand/keystoresAndroid/macao.jks')
storeFile file('/home/delevacw/keystoresAndroid/macao.jks')
storePassword 'F5jxbqwKT'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,

//getGroups();
retrieveEvents();
getGroups();
getEvents();

return view;
}
Expand All @@ -158,7 +158,7 @@ public void onSignedIn(){
loader.setVisibility(View.GONE);
//}*/
Log.d("LOG", "3");
getGroups();
getEvents();
loader.setVisibility(View.GONE);
}

Expand Down Expand Up @@ -238,7 +238,7 @@ public boolean onOptionsItemSelected(MenuItem item){
}
return true;
case R.id.action_update_events:
this.getGroups();
this.getEvents();
return true;
default:
return super.onOptionsItemSelected(item);
Expand Down Expand Up @@ -347,7 +347,7 @@ public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
@Override
public void onSuccess(int statusCode, Header[] headers, JSONArray timeline) {
// Pull out the first event on the public timeline
getEvents(timeline);
//getEvents(timeline);

}

Expand All @@ -366,9 +366,11 @@ public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSO
});
}

private void getEvents(JSONArray groups){
private void getEvents(){
loader.setVisibility(View.VISIBLE);
String mail = ((MainActivity) this.getActivity()).getMail();
RequestParams rp = new RequestParams();
rp.add("groups", groups.toString());
rp.add("mail", mail);

HttpUtils.postByUrl("http://ade.wallforfry.fr/api/ade-esiee/agenda", rp, new JsonHttpResponseHandler() {
@Override
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/fr/esiee/bde/macao/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ public String getIdToken() {
return idToken;
}

public String getMail() {
return mail;
}

public SQLiteDatabase getDatabase(){
return this.database;
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit 140f2bc

Please sign in to comment.