我一直在从服务开始活动直到android P,但是从android10开始,谷歌一直限制不能从后台开始活动。
https://developer.android.com/guide/components/activities/background-starts
// below code stopped working
Intent intent = new Intent(this, MyActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
我应该为android10做些什么?
答案 0 :(得分:0)
您可以使用setFullScreenIntent
使用通知,这是您可以做的最好的操作,也可以请求SYSTEM_ALERT_WINDOW
权限,但这不适用于android go设备。