title: Can't create handler inside thread that has not called Looper.prepare() in CountDownTimer
body: <p>I have a service. And there is a method called onServiceUpdate(). This method is similiar with onLocationChanged() in Google Maps API.</p>
  
  <p>So i want to start CountDownTimer inside onServiceUpdate() method but showing error like this :</p>
  
  <pre><code>Can't create handler inside thread that has not called Looper.prepare()
      java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
              at android.os.Handler.&lt;init&gt;(Handler.java:200)
              at android.os.Handler.&lt;init&gt;(Handler.java:114)
              at android.os.CountDownTimer$1.&lt;init&gt;(CountDownTimer.java:114)
              at android.os.CountDownTimer.&lt;init&gt;(CountDownTimer.java:114)
              at skripsi.ubm.studenttracking.Service2$6.&lt;init&gt;(Service2.java:317)
              at skripsi.ubm.studenttracking.Service2.onServiceUpdate(Service2.java:317)
  </code></pre>
  
  <p>This is my code :</p>
  
  <pre><code>    @Override
      public void onServiceUpdate(ServiceState state)
      {
  final float[] distance = new float[2];
          Location.distanceBetween(state.getGeoPoint().getLatitude(), state.getGeoPoint().getLongitude(), 6.130607787619352,106.81839518499267, distance);
          if (distance[0] &gt; 25.0)
          {
  
                          CountDownTimer cdt5  = new CountDownTimer(total_onServiceUpdate,1000) {
                              @Override
                              public void onTick(long millisUntilFinished) {
                                  total_onServiceUpdate = millisUntilFinished/1000;
                              }
  
                              @Override
                              public void onFinish() {
                                  sendSMS();
                                  stopSelf();
                              }
                          }.start();
  
          }
  </code></pre>