本帖最后由 Domino0627 于 2011-05-20 12:34:18 编辑

解决方案 »

  1.   

    报无响应 肯定是Activity主线程 卡住了
    //10秒更新一次  
    每次updateWithNewLocation中 都去
    HandlerThread ht = new HandlerThread("handler_thread");
    那岂不。 应该及时释放或者作成员变量
    可以试试
      

  2.   

    用service去试试吧,长时间工作的最好放到后台服务去开线程处理。
      

  3.   

    你每次调用这个方法updateWithNewLocation(),都会产生一个有消息循环的线程,长时间后,就会产生大量线程。
    建议在activity里定义一个线程实例
    HandlerThread ht = null;
    然后再OnCreate里创建启动 
                ht = new HandlerThread("handler_thread");
                ht.start();
    再把updateWithNewLocation()里对应的两句代码删除。
                HandlerThread ht = new HandlerThread("handler_thread"); //删除
                ht.start(); //删除这样应该就OK乐