title: Android Changing homepage of default browser programmatically
body: <p>I am trying to use the following code to set my page as the browser homepage, but it is not working:</p>
  
  <pre><code>Context browserContext = createPackageContext("com.android.browser", Context.CONTEXT_IGNORE_SECURITY);
  
  SharedPreferences sp = browserContext.getSharedPreferences("com.android.browser_preferences",Context.MODE_PRIVATE);                 
  SharedPreferences.Editor edidor = sp.edit();
  edidor.putString("homepage", "http://www.mypage.com");
  edidor.commit();
  </code></pre>
  
  <p>I am getting this warning:
  <code>///data/data/com.android.browser/shared_prefs/com.android.browser_preferences.xml without permission</code>.</p>
  
  <p>As both application process ids are different, I cannot access the SharedPreferences of Browser application.</p>
  
  <p>So:</p>
  
  <ol>
  <li>How do I achieve this task?</li>
  <li>Are there other approaches to try, such as a javascript or web page loading?</li>
  <li>Can I open <code>setHomepage</code> dialog of default browser programmatically?</li>
  </ol>