标签: android google-maps battery-saver
在我的应用程序中,我正在使用Google Maps并从onLocationChanged()获取latlon,同时它在后台运行并使用服务获取该值。
由于这个原因,我的应用程序消耗了大量电池电量
如何减少应用程序耗电量?
答案 0 :(得分:1)
你走了:
在setPriority(LocationRequest.PRIORITY_LOW_POWER);
setPriority(LocationRequest.PRIORITY_LOW_POWER);
LocationRequest
请参阅文档Here: