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

Commit 1bce4a1

Browse files
committed
Added lifecycle methods for checking user auth status.
1 parent 0a995ca commit 1bce4a1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

user-auth-ui/app/src/main/java/com/adobe/userauthui/MainActivity.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.adobe.userauthui;
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;
@@ -73,6 +74,42 @@ private void showAuthenticatedUI() {
7374

7475
}
7576

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

0 commit comments

Comments
 (0)