title: How to use datetime in android?
body: <p>I have <strong>android</strong> app as I call <strong>html</strong> files one of these files page for play sound as user can 
   manage when the sound play as:</p>
  
  <p>Saturday  <strong>on</strong></p>
  
  <p>Sunday    <strong>off</strong></p>
  
  <p>Monday    <strong>on</strong></p>
  
  <p>and so on. I did my code well, but when I manage select input
   option values to on and off it return back to its default when I close
   the app or go to another page. So the question is <strong>how can keep with
   select options values for first time as user selected?</strong> Also, if I want
   to play sound in specific time as:</p>
  
  <p>Saturday  on</p>
  
  <p>5.30am  how can I do it?</p>
  
  <p>&lt;play sound method&gt;</p>
  
  <pre><code>public class WebAppInterface    {
    Context mContext;
    public  MediaPlayer mp = null;
    public static boolean checked = false;
    /** Instantiate the interface and set the context */
    WebAppInterface(Context c) {
      mContext = c;
      mp = MediaPlayer.create(mContext,R.raw.sound);
    }
  
  
    @JavascriptInterface
      public void playsound(String value  ) {
  
        if (value.equals("on")){
          checked = true;
  
          mp.setLooping(true);
          mp.start();
        }
        else 
        {  
          checked = false;
          mp.stop();
        }
      }
  }
  </code></pre>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;html&gt;
    &lt;form &gt;
      &lt;select name="flip-1" id="flip-1" data-role="slider" onchange="getAzan(this)" &gt;
        &lt;option value="off" &gt;play&lt;/option&gt;
        &lt;option value="on"&gt;off&lt;/option&gt;
      &lt;/select&gt;
    &lt;/form&gt;
  
    &lt;script type="text/javascript"&gt;
      function getAzan(sel) {
        var value = sel.options[sel.selectedIndex].value; 
        Android.playsound(value); 
      }
    &lt;/script&gt;
  </code></pre>
  
  <p><strong>Note</strong>: I did play sound when user select <strong>on</strong> value at the code up</p>