title: How to save persistent values in a Titanium Appcelerator App
body: <p>I am trying to figure out the best way to securely save user info in my Android mobile app built using Titanium. I am confused about the best way to do it.</p>
  
  <p>It seems that the easiest way is to save it as a property. Something like...</p>
  
  <pre><code>                Ti.App.Properties.setString('user_name', user.name);
                  Ti.App.Properties.setString('user_id', user.id);
                  Ti.App.Properties.setString('user_sessionid', user.session_id);
  </code></pre>
  
  <p>This seems great because these properties are persisted etc. However, based on what I read elsewhere, I am not sure if this is secure / best way of doing it.</p>
  
  <p>Another approach is to save it as a Global property. </p>
  
  <pre><code>                Alloy.Globals.userid = user.id;
                  Alloy.Globals.user_name = user.name;
  </code></pre>
  
  <p>This is of-course not persistent and so the user has to login everytime. I am curious to know what others are doing, and what is the best practice. Any insight would be appreciated. Thanks!</p>