Skip to content
This repository was archived by the owner on Jul 27, 2019. It is now read-only.

Commit 3a3de33

Browse files
committed
Added lifecycle methods for checking user auth status.
1 parent ecff0fc commit 3a3de33

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

send-to-desktop-api/app/src/main/java/com/adobe/sendtodesktopapi/MainActivity.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.adobe.sendtodesktopapi;
22

3+
import android.content.Intent;
34
import android.os.Bundle;
45
import android.support.design.widget.FloatingActionButton;
56
import android.support.design.widget.Snackbar;
@@ -72,6 +73,42 @@ private void showAuthenticatedUI() {
7273

7374
}
7475

76+
@Override
77+
protected void onResume() {
78+
super.onResume();
79+
mAuthSessionHelper.onResume();
80+
}
81+
82+
@Override
83+
protected void onPause() {
84+
super.onPause();
85+
mAuthSessionHelper.onPause();
86+
}
87+
88+
@Override
89+
protected void onStart() {
90+
super.onStart();
91+
mAuthSessionHelper.onStart();
92+
}
93+
94+
@Override
95+
protected void onStop() {
96+
super.onStop();
97+
mAuthSessionHelper.onStop();
98+
}
99+
100+
@Override
101+
protected void onDestroy() {
102+
super.onDestroy();
103+
mAuthSessionHelper.onDestroy();
104+
}
105+
106+
@Override
107+
public void onActivityResult(int requestCode, int resultCode, Intent data) {
108+
super.onActivityResult(requestCode, resultCode, data);
109+
mAuthSessionHelper.onActivityResult(requestCode, resultCode, data);
110+
}
111+
75112
@Override
76113
public boolean onCreateOptionsMenu(Menu menu) {
77114
// Inflate the menu; this adds items to the action bar if it is present.

0 commit comments

Comments
 (0)