0

My app implements a configuration activity for its widget exactly as described here.

Starting with Android 14, the activity can't be launched automatically in background, as stated here, but I have no control over the intent while implementing the widget configuration in this way, and i get the following error:

Without Android 14 BAL hardening this activity start would be allowed (missing opt in by PI sender)! [callingPackage: android; callingPackageTargetSdk: 34; callingUid: 1000; callingPid: -1; appSwitchState: 2; callingUidHasAnyVisibleWindow: false; callingUidProcState: PERSISTENT; isCallingUidPersistentSystemProcess: true; forcedBalByPiSender: BSP.NONE; intent: Intent { act=android.appwidget.action.APPWIDGET_CONFIGURE cmp=com.minar.birday/.activities.MinimalWidgetConfigurationActivity (has extras) }; callerApp: null; balAllowedByPiCreator: BSP.NONE; balAllowedByPiCreatorWithHardening: BSP.NONE; resultIfPiCreatorAllowsBal: BAL_ALLOW_ALLOWLISTED_UID; hasRealCaller: true; isCallForResult: true; isPendingIntent: true; realCallingPackage: bitpit.launcher; realCallingPackageTargetSdk: 34; realCallingUid: 10237; realCallingPid: 22638; realCallingUidHasAnyVisibleWindow: true; realCallingUidProcState: TOP; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: PendingIntentRecord{cbf937 android startActivity}; realCallerApp: ProcessRecord{fef2b6a 22638:bitpit.launcher/u0a237}; realInVisibleTask: true; balAllowedByPiSender: BSP.ALLOW_FGS; resultIfPiSenderAllowsBal: BAL_ALLOW_VISIBLE_WINDOW]

The question is simple: how can I fix this and modify the intent to pass the Context.BIND_ALLOW_ACTIVITY_STARTS flag in it? I just want the activity to work just like it did in Android 13 and below in the simplest way possible.

0

1 Answer 1

1

Long story short: this "bug" depends on the launcher rather than the app itself, and my implementation was correct. I tested it on Niagara launcher and it didn't work (an easy test is to add other customizable widgets, and if they don't work as well, it's a launcher bug). I tried to test it on another launcher and it did the trick. So, again, it's something the launcher should fix, not the app itself.

Not the answer you're looking for? Browse other questions tagged or ask your own question.