Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我实现了一项服务,每 3 分钟获取一次用户位置,但小米的问题是默认应用程序获取省电选项,因为它没有更新位置。有没有办法找到并启用?
默认情况下它是节电选项我希望它是没有限制
要打开选择电池优化的应用列表,您可以使用此代码示例:
private void openPowerSettings(Context context) { Intent intent = new Intent(); intent.setAction(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS); context.startActivity(intent); }