Skip to content

erro android sdk a partir 31 #20

Description

@evalton2017

Erro ao chamar PendingIntent sdk 31
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

SOLUÇÃO ALTERAR
this.mPermissionIntent = PendingIntent.getBroadcast(this.context, 0, new Intent("com.android.example.USB_PERMISSION"), 0);
*para *
mPermissionIntent = PendingIntent.getBroadcast(this.context, 0, new Intent("com.android.example.USB_PERMISSION"), PendingIntent.FLAG_IMMUTABLE);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions