Android 12 changes

Hello extension developers,

We will be releasing an update soon to address the changes need to make App Inventor apps compatible with Android 12. The update is available on the test server at http://ai2-test.appinventor.mit.edu/. You should test your extensions both in the companion and compiled apps on the test server to ensure your extensions work with Android 12.

One major point is that if you are declaring activities, broadcast receivers, or services, you must assert whether those items are exported or not. Previously, Android assumed that these items were exported if the appropriate information was not provided. However, it may not make sense to export these items and so you should consider whether it makes sense to set the exported field to true/false based on the needs of your extension.

Any extensions that use those entities but do not update to explicitly indicate whether they are exported will fail to install on Android 12+ starting with the next major release of App Inventor.

Regards,
Evan

8 Likes

Anyone facing this problem after targetSdk 31 when using extensions has two options:

  1. Contact the extension developer(s) and ask them to declare this (android:exported="true" for activities, broadcast receivers) in the Manifest.

  2. Build the APK, decompile it, declare it in the Manifest, recompile the APK, convert the APK to AAB and sign it. See also here: New App API Level 31 In Console - #2 by Anke - Discuss - Niotron Community

Example:

Note: Taifun has already fixed it in his today's new extension version (sent to me via PM).

4 Likes

A post was merged into an existing topic: Screen Orientation Bug

This needs to be pinned at the top of the page. :thinking:

1 Like

Another point is the Pending intent mutability: You must specify the mutability of each PendingIntent object that your app creates, i.e. you have to specify FLAG_ IMMUTABLE or FLAG_MUTABLE. See for example this extension

The complete SDK31 update requirements are here

Taifun

1 Like

The actual Users of Extensions are unlikely to see your post Anke because Extension Development is a sub-category and thus not listed in the Forums drop-down of categories.

How about repeating it on the Extensions forum?

A post was split to a new topic: SMS app not working in Android 13