Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto request Bluetooth permissions doesn't work on Android #396

Closed
avdyushin opened this issue Oct 5, 2021 · 0 comments
Closed

Auto request Bluetooth permissions doesn't work on Android #396

avdyushin opened this issue Oct 5, 2021 · 0 comments
Labels
1.0.0 expected in the 1.0.0 release 🐛bug Something isn't working component:bluetooth

Comments

@avdyushin
Copy link
Contributor

Describe the bug
Permissions request doesn't popup on bluetooth start scanning

To Reproduce


class MainActivity : AppCompatActivity() {

    private val permissions = Permissions(
        PermissionsBuilder().apply {
            registerBluetoothPermission()
        }
    )
    private val builder = BluetoothBuilder(
        permissions = permissions
    )
    private val bluetooth = builder.create(
        connectionSettings = ConnectionSettings(),
        autoRequestPermission = true
    )

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
    }

    override fun onResume() {
        super.onResume()
        bluetooth.startScanning()
    }

    override fun onPause() {
        bluetooth.stopScanning()
        super.onPause()
    }
}

Expected behavior
Bluetooth permissions dialog should be shown

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S10
  • OS: Android 11
@avdyushin avdyushin added the 🐛bug Something isn't working label Oct 5, 2021
@Daeda88 Daeda88 added 1.x.x expected somewhere in a future release component:bluetooth labels Feb 18, 2022
@Daeda88 Daeda88 added 1.0.0 expected in the 1.0.0 release and removed 1.x.x expected somewhere in a future release labels Feb 28, 2023
@Daeda88 Daeda88 closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.0 expected in the 1.0.0 release 🐛bug Something isn't working component:bluetooth
Projects
None yet
Development

No branches or pull requests

2 participants