gpt4 book ai didi

android - LocationManager 和 LOCATION_SERVICE

转载 作者:行者123 更新时间:2023-11-29 00:28:26 25 4
gpt4 key购买 nike

这两行是等价的吗?它们在我的应用程序中表现不同。

locationManager = (LocationManager) context.getSystemService(LOCATION_SERVICE);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);

谢谢

最佳答案

是的,它们是一样的,第一个来自 ActivityService 以外的任何东西,而另一个来自这两个中的一个。

关于android - LocationManager 和 LOCATION_SERVICE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17708679/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com