3

Hello friends on StackOverflow. I got a problem with my Application when run on Android 12 Beta, Pixel 5.

When staying in BubbleActivity, I call a BubbleActivity#startActivity(MainActivity.class) but it does not work as I expect (minimize BubbleActivity and switch to Application).

I attached some logs from BubbleActivity#startActivity

W/ActivityTaskManager: Background activity start [callingPackage: com.package.myapp; 
callingUid: 10248; appSwitchAllowed: false; 
isCallingUidForeground: true; callingUidHasAnyVisibleWindow: true; callingUidProcState: TOP; isCallingUidPersistentSystemProcess: false; 
realCallingUid: 10248; isRealCallingUidForeground: true; 
realCallingUidHasAnyVisibleWindow: true; realCallingUidProcState: TOP; 
isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: null; allowBackgroundActivityStart: false; 
intent: Intent { act=com.package.myapp.action.ACTION_SHOW_MY_VIEW flg=0x14000000 
cmp=com.package.myapp/.ui.MainLauncherActivity (has extras) }; 
callerApp: ProcessRecord{19f9941 5079:com.package.myapp/u0a248}; inVisibleTask: true]

I tried on Android 11 and it works.

So, anyone here got the same problem?

Danh Tran
  • 31
  • 3
  • I suggest you to filter logcat with ActivityManager tag, maybe you can find something through logs. – Will Tang Sep 27 '21 at 07:09
  • Yeb, I've tried it. The logcat tells that I'm starting an Activity from background. But I'm using a resuming Activity (Bubble Activity) to start. So, I think the call startActivity must be accepted by the OS – Danh Tran Sep 27 '21 at 11:18
  • as the link: https://developer.android.com/guide/components/activities/background-starts tells Some Exceptions to the restriction included * The app has a visible window, such as an activity in the foreground. -> I think this visible window can be a Bubble Activity. It works on android 11 but not on 12 – Danh Tran Sep 27 '21 at 11:20

0 Answers0