umair13adil / simple_beacons_flutter

A flutter plugin project to range & monitor iBeacons.
Apache License 2.0
35 stars 42 forks source link

It don't work with android 12 (API 31) #59

Closed ravinandan25 closed 2 years ago

ravinandan25 commented 2 years ago

Same code works for android 11 but it shows this error for android 12:

Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1183447910.tmp/base.apk (at Binary XML file line #86): com.umair.beacons_plugin.RebootBroadcastReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]`

I have already added : "android:exported="true" inside activity in AndroidMainfest.xml. Sill its not working

barangungor commented 2 years ago

Same issue for me. @umair13adil can you fix it please?

umair13adil commented 2 years ago

I will fix this & send an update by today.

barangungor commented 2 years ago

@umair13adil I'm updated to version 2.0.7, i ran flutter clean -> pub get and try run my project but still same error.

Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1838481334.tmp/base.apk (at Binary XML file line #270): org.altbeacon.beacon.startup.StartupBroadcastReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]

umair13adil commented 2 years ago

@barangungor This error is from the 'AltBeacon' library that my plugin is using. Let me see if there is any update for it. I will update & release the plugin again.

ravinandan25 commented 2 years ago

I have a fork that plugin repo and made some changes that work for me. you can use my repo

add this instead of flutter beacon in pubspec.yml

beacons_plugin:
    git:
      url: `https://github.com/ravinandan25/simple_beacons_flutter.git`

and then in app base build.gradle made this changes:

compileSdkVersion 31
....
...  
minSdkVersion 23
targetSdkVersion 30
vladaman commented 2 years ago

I also get same issue with following receiver. Unfortunately @ravinandan25 git doesn't seem to work either.

android:exported needs to be explicitly specified for element <receiver#org.altbeacon.beacon.startup.StartupBroadcastReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined.
ravinandan25 commented 2 years ago

I also get same issue with following receiver. Unfortunately @ravinandan25 git doesn't seem to work either.

android:exported needs to be explicitly specified for element <receiver#org.altbeacon.beacon.startup.StartupBroadcastReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined.

Did you made changes in " app base build.gradle" file? @vladaman

barangungor commented 2 years ago

@ravinandan25 can you look my issue? https://github.com/umair13adil/simple_beacons_flutter/issues/61

sandeepunify commented 2 years ago

java.lang.SecurityException: Permission Denial: starting Intent { act=android.bluetooth.adapter.action.REQUEST_ENABLE cmp=com.android.settings/.bluetooth.RequestPermissionActivity } from ProcessRecord{321302e 23158:dw.ujjainapp.app/u0a438} (pid=23158, uid=10438) requires android.permission.BLUETOOTH_CONNECT

please solve this issue This issue is happening on android 12

umair13adil commented 2 years ago

This issue is resolved in version "2.0.8".

sachin-neurastats commented 1 year ago

Hello @umair13adil results are not coming through on android 12 where as everything works fine on Android 11 or less