可在Terminal终端执行以下adb命令,该命令会监控你的App是否有在后台启动前台服务的行为,一旦有此行为,就会在通知栏推送一条提醒,定位到触发此行为的代码处:
adb shell device_config put activity_manager \
default_fgs_starts_restriction_notification_enabled true
可在Terminal终端执行以下adb命令,该命令会监控你的App是否有在后台启动前台服务的行为,一旦有此行为,就会在通知栏推送一条提醒,定位到触发此行为的代码处:
adb shell device_config put activity_manager \
default_fgs_starts_restriction_notification_enabled true