geocalizacion的线程停止?

时间:2013-06-17 14:38:31

标签: android gps

欲望以某种方式停止此功能“使用gps”

private void localizacion() {
    progressDialog = ProgressDialog.show(
            actUsarGPS.this, "Por favor espere", "BUSCANDO", true);


     handler = new Handler();

    final Runnable runInUIThread = new Runnable() {
         public void run() {

    LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
    LocationListener mlocListener = new MyLocationListener();
    mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, 0, mlocListener);

         }
    };

    new Thread() {
         @Override
         public void run() {
            //handler.post(runInUIThread);
            handler.postDelayed(runInUIThread,1000);
            }
        }.start();
}

对话框有取消按钮或后退按钮

并试图阻止他,但无济于事。 agradecere他们很多..

问候

0 个答案:

没有答案