GPS停留在使用电话意向停留在、意向、电话、GPS

2023-09-08 09:02:05 作者:莂侢洣戀滒

我有一个快速的行为问题。当我打电话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

 
精彩推荐
图片推荐