Open Tushar-Kanvinde opened 2 years ago
The tag hid what i added. Putting them here. uses-permission android:name="android.permission.BLUETOOTH_SCAN" uses-permission android:name="android.permission.BLUETOOTH_CONNECT" uses-feature android:name="android.hardware.bluetooth" android:required="false" uses-feature android:name="android.hardware.bluetooth_le" android:required="false"
Hello @Tushar-Kanvinde , did you add that to the config.xml?
any solution?
@gsusalvarado
I am not familiar about how to add things to the AndroidManifest via config.xml
I added it to AndroidManifest.xml and then gave the gradlew bundleRelease command rather than the cordova build command.
I also have cordova.plugins.permissions.requestPermission(cordova.plugins.permissions.BLUETOOTH_SCAN, and cordova.plugins.permissions.requestPermission(cordova.plugins.permissions.BLUETOOTH_CONNECT); in javascript
@gsusalvarado
I am not familiar about how to add things to the AndroidManifest via config.xml
I added it to AndroidManifest.xml and then gave the gradlew bundleRelease command rather than the cordova build command.
I also have cordova.plugins.permissions.requestPermission(cordova.plugins.permissions.BLUETOOTH_SCAN, and cordova.plugins.permissions.requestPermission(cordova.plugins.permissions.BLUETOOTH_CONNECT); in javascript
this is working or not?
@lapisanlangi
Yes. It is working for me.
I already had the permissions plugin in my project. You may need to add that.
@lapisanlangi
Yes. It is working for me.
I already had the permissions plugin in my project. You may need to add that.
ok nice info..I will try it again.. I am remember I already add that but still failed.. can you gave us full sample code in AndroidManifest.xml? I don't understand what do you mean about gradlew bundleRelease command... how to use it?
edit the file platforms/android/app/src/main/AndroidManifest.xml search for uses-permission make a copy of that tag below it and then change android.permission.whatever to android.permission.BLUETOOTH_SCAN and again same with android.permission.BLUETOOTH_CONNECT
below that add tags uses-feature android:name="android.hardware.bluetooth" android:required="false" / uses-feature android:name="android.hardware.bluetooth_le" android:required="false" /
Then cd to the folder platforms/android
you will have a file named gradlew and another called gradlew.bat there
so the command
./gradlew bundleRelease
will give you aab file to upload to store
instead of bundleRelease use packageDebug for apk to debug
I am building on a linux machine. Things should be the same on windows.
edit the file platforms/android/app/src/main/AndroidManifest.xml search for uses-permission make a copy of that tag below it and then change android.permission.whatever to android.permission.BLUETOOTH_SCAN and again same with android.permission.BLUETOOTH_CONNECT
below that add tags uses-feature android:name="android.hardware.bluetooth" android:required="false" / uses-feature android:name="android.hardware.bluetooth_le" android:required="false" /
Then cd to the folder platforms/android
you will have a file named gradlew and another called gradlew.bat there
so the command ./gradlew bundleRelease will give you aab file to upload to store
instead of bundleRelease use packageDebug for apk to debug
I am building on a linux machine. Things should be the same on windows.
ok thanks @Tushar-Kanvinde I will try soon
Any update?
@gsusalvarado
I am not familiar about how to add things to the AndroidManifest via config.xml
I added it to AndroidManifest.xml and then gave the gradlew bundleRelease command rather than the cordova build command.
I also have cordova.plugins.permissions.requestPermission(cordova.plugins.permissions.BLUETOOTH_SCAN, and cordova.plugins.permissions.requestPermission(cordova.plugins.permissions.BLUETOOTH_CONNECT); in javascript
thank sir!
Android 11.0.0 Cordova 11.0.0 plugin 0.1.0-dev
I had to add
to AndroidManifest.xml
And also request permission for BLUETOOTH_SCAN and BLUETOOTH_CONNECT