Skip to content

Commit

Permalink
added missing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikigraf committed Jul 6, 2017
1 parent f604191 commit 082cb7d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
6 changes: 3 additions & 3 deletions android/Lunchmates/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">

<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDCVWfMSpAutv7lVwJR1Bfcinw2rEu8YTE"/>
<!--<meta-data-->
<!--android:name="com.google.android.maps.v2.API_KEY"-->
<!--android:value="AIzaSyDCVWfMSpAutv7lVwJR1Bfcinw2rEu8YTE"/>-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAATzAd0ghNfvW8KpThPkJ4efhvMGB59HQ"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,30 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
// drawer.requestLayout();
}
};
// helper.login(token, listener);
}

private void sendGoogleLoginToken(String token) {
RestHelper helper = new RestHelperImpl();
RestHelper.DataReceivedListener<AuthenticationResult> listener = new RestHelper.DataReceivedListener<AuthenticationResult>() {
@Override
public void onDataReceived(AuthenticationResult result) {
if(result == null) {
Toast.makeText(MainActivity.this, "Login connection error", Toast.LENGTH_SHORT).show();
return;
} else {
if(!result.isSuccess()) {
Toast.makeText(MainActivity.this, "Server error", Toast.LENGTH_SHORT).show();
return;
}
PreferencesController prefs = new PreferencesControllerImpl(MainActivity.this);
Log.d("bla", "token" + result.getSessionToken());
prefs.setSessionToken(result.getSessionToken());
prefs.setUserId(result.getUserId());

}
}
};
helper.login(token, listener);
}

Expand Down

0 comments on commit 082cb7d

Please sign in to comment.