title: share data between two flavoured apps having same package name using shared preferences
body: <p>I have one app which is using different build variant(flavor), Now I want to share data between these flavored apps(different apps for End User). Now my question is that how can I use shared preferences to share some data amongst the flavored apps as only one package name mentioned in the manifest file and that one package is valid for all the flavored apps. I have tried the below approach and failed to share data.</p>
  
  <p>//To set data </p>
  
  <pre><code>SharedPreferences settings = getSharedPreferences(MyPref, Context.MODE_WORLD_READABLE);
  SharedPreferences.Editor editor = settings.edit();
  editor.putString("UserEmail", m_email);
  editor.putString("UserPass", m_pass);
  editor.putString("LoggedUserName", m_statusData);
  editor.commit(); 
  </code></pre>
  
  <p>//To Get data</p>
  
  <pre><code>Context con = getApplicationContext().createPackageContext("my_packagename", 0);
  SharedPreferences pref = con.getSharedPreferences(MyPref, Context.MODE_PRIVATE);
  EmailId = pref.getString("UserEmail", email);//got always null
  Password = pref.getString("UserPass", Password);//got always null
  </code></pre>
  
  <p>But it is not working. What to do now?</p>