title: set device time programmatically in android
body: <p>I need to set device time dynamically.if it possible please guide me </p>
  
  <p>So far as I tried</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>Calendar c = Calendar.getInstance();    
  c.set(2010, 1, 1, 12, 00, 00);
  </code></pre>
  
  <p><strong>manifest.xml</strong></p>
  
  <pre><code>&lt;permission android:name="android.permission.SET_TIME"
      android:protectionLevel="signatureOrSystem"
      android:label="@string/app_name" /&gt;
  </code></pre>
  
  <p>Thanks in advance</p>