title: How to keep passwords securely in android using shared preferences or sqlite database?
body: <p>I am building an app which generates a random password and you can keep it along with your other details such as username, website url, name etc.</p>
  
  <p>Basically a password management thing.</p>
  
  <p>Things to be stored:</p>
  
  <p><img src="https://i.stack.imgur.com/uTqzDl.png" alt="Things to be stored"></p>
  
  <p>When I am clicking on the save button, I wanted it to be saved somewhere locally. So that, I could retrieve them and display it in another activity.</p>
  
  <p>Can I share those things in SharedPreferences for all those password entries securely? [By password entry, I meant the entire class ]</p>
  
  <p>I have referred to something like ComplexPreferences [ <a href="http://blog.nkdroidsolutions.com/class-object-in-sharedpreferences/" rel="nofollow noreferrer">http://blog.nkdroidsolutions.com/class-object-in-sharedpreferences/</a> ]</p>
  
  <p>I've tried them because I had created a class containing all these data [title, url, username, password, notes]. But I cannot retrieve them properly using a recyclerview. I'm ending up with some error.</p>
  
  <p>If it cannot be done with SharedPreferences, how can I do it with SQLite Database?</p>
  
  <p>But how can I save them securely? I don't know much about security in Android. </p>
  
  <p>Please guide.</p>