GPS停留在使用电话意向 [英] GPS stays on using Intent call
本文介绍了GPS停留在使用电话意向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个快速的行为问题。当我打电话code以下行:
I have a quick behavior question. When I call the following lines of code:
String currURL = "http://maps.google.com/maps?saddr="+nLocation.getLatitude()+","+nLocation.getLongitude()+"&daddr=110+Possum+Hollow+Road,+Newark,+DE+19711+(Tri-State+Bird+Rescue)&hl=en&ll=AnotherLat,AnotherLong&spn=0.28323,0.683212&sll=AnotherLat,AnotherLong&sspn=0.283147,0.683212&geocode=FcejYQIdRnCE-w%3BFXn_XQIda4F8-yF_tbhhHBmAIw&vpsrc=0&mra=pd&z=11";
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(currURL));
App.this.getParent().startActivity(browserIntent);
这似乎保持GPS上。有什么错我是做什么的?
It seems to keep the GPS on. Is there something wrong in what I was doing?
谢谢!
乔恩
推荐答案
如果您请求的位置更新,那么你必须做的 removeUpdates(LocationListener的)
所以,正确的做之前 startActivity
,您可能希望 removeUpdates
If you requested location updates, then you must do removeUpdates(locationListener)
So, right before doing startActivity
, you might want to removeUpdates
这篇关于GPS停留在使用电话意向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文