title: Android: OAuth2 - How do I implement remember me functionality?
body: <p>A bit of background:</p>
  
  <ol>
  <li>User enters credentials on every app launch instance. </li>
  <li>These credentials are sent as a part of the POST body (we encrypt them with a key using AES and put in the post body) to server and we get back a token which is some encoded string from the server. </li>
  <li>This token will authorize our app to make requests. </li>
  </ol>
  
  <p>Now I would like you readers to focus on the fact that <strong>we need user credentials to get an authorization token in the first place.</strong></p>
  
  <ol start="4">
  <li><strong>Token expires in 12 hours</strong> and all the subsequent requests are unauthorized and we are forced to kick the user out of the app to relogin again and get a new token which is good for another 12 hrs. I KNOW ITS A BAD EXPERIENCE.  </li>
  </ol>
  
  <p>Now we are required to implement a remember me functionality. I am NOT AT ALL COMFORTABLE using shared preferences (even with encryption, a serious hacker might get to the key in this case). What should I do ? I just came to know that the token web service is an oAuth2. Im a novice still looking at articles about oAuth2 and I saw where people have huge discussions about SharedPrefs and AccountManager api. But I saw this one <a href="https://stackoverflow.com/a/786588/2423312">answer</a> by Reto Meier. He mentions that server should use oAuth. My question is given my scenario, what is the most secure way to do this and how can I use anything with oAuth to implement the remeber me functionality. Any kind of "clear" examples/clear explanantion would be a great help. Looking forward for your answers.</p>