Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Example App

The first thing you'll see is the MainActivity. This screen shows you what the TokenStore knows, and since right now it knows nothing, it shows you nothing.

Click the FAB in the bottom right to authenticate a new user. It'll launch the NewUserActivity, which will show you a WebView. This WebView will automatically be loaded with the correct authorization URL for the example OAuth2 app credentials.

Once you enter your username and password, you'll be prompted by reddit to allow the example app to allow the app to fetch information about your account.

If you press "deny" you'll be taken back to the previous screen. If you press "allow," you'll be taken to the UserOverviewActivity.

From here, if you press the back or logout button, you'll be taken back to the MainActivity. This time, you'll notice that there is an entry present for the account you just logged in to. Clicking on the entry will take you back to the user overview.

Once the access token expires, the text in the bottom left-hand corner of the entry will read "Access token expired." If you now click on the entry, JRAW will automatically request a new access token for that user and you will be shown the UserOverviewActivity.