I'm creating an app that communicates with an IOT board via Bluetooth low energy. When I install the app for testing directly from my pc it works perfectly. But when I published it, it doesn't list the Bluetooth devices.
I am using the following permissions
android.permission.INTERNET
android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
android.permission.ACCESS_COARSE_LOCATION
'These permissions are in'
'android/app/src/main/androidManifest.xml'
'android/app/src/profile/androidManifest.xml'
I'm using the ble component: ^2.0.0
Related
Original problem: My flutter app using the http package connects to a rest service to get the data needed. If I am connected via my modems wifi, the connection would fail (but not timeout) on the login attempt. The circular spinner would spin forever (tried for 15 minutes). If I connect using my router's wifi, or my mobile data, the connection is fine. The app logs in and runs correctly.
I created a web app to test and after trying a few things, I found port 443 was the problem. I changed the port on my rest service and the app and now 2 emulators and 2 physical devices all work perfectly during testing.
Then yesterday I published the app update to the Play Store and the App Store. I'm still waiting on the app store to approve, but testing from TestFlight worked perfectly on my iPhone.
Google approved the app quite quickly, but when I install the update from the Play Store, no connection at all works now. I have tried uninstalling and rebooting the phone (Galaxy S22+ running Android 13 and a Galaxy S8 running Android 9) but regardless of whether I connect using mobile data or either wifi, the login sits trying forever. The app does not crash, it just won't login and although there is a timeout on the login connection, it doesn't timeout.
What could be the difference between the test version which works great, and the version I build for uploading to the Play Store?
I was building app on my physical device and suddenly their occurred some problem with USB connector in my phone. So I was compelled to use emulator. But my urgent need is test bluetooth thermal printer and emulators don't provide bluetooth services as per this How to use android emulator for testing bluetooth application? answer. So is there any way that I build or release on an emulator and could share its APK to my physical device?
You won't get Bluetooth functionalities on an emulator. The emulator does not support Bluetooth.
You need to create an apk using flutter build apk command and later can transfer that apk to your device.
In my application, I am using STm32L4R5VG as a host MCU. I want to upgrade the firmware of host MCU in run time over USB through the Android mobile app.
I have looked into USB DFU mode, but in that case, my device will enumerate as ST USB and also I need to enable the boot loader with boot pin.
In actuality, my device will connect with the Android mobile app using the CDC class device and enumerates as VCP. So I want to send the firmware file from Android mobile to host MCU over VCP and write into Bank2 of internal flash (as current code is in Bank1). Once the file transfer is done, the device will reboot on its own and check for the latest firmware and boots from Bank2.
I am stuck at how to write at bank2 securely during run time and perform self reset to boot from Bank2.
If anyone already worked on this or know about this then please guide me or point to the link where I can get details for this.
Is it possible (e.g. when developing) to send a pwa to the phone someway e..g. via usb cable without the network and serving it in https?
The use case is development, when maybe a wifi network is not available or unpractical to set up.
If your APP is fully PWA compliant, the app added to home will be an installed APK, which you can extract using file explorer(I used ES File explorer) and put it in other devices using USB connection and adb install myapp.apk for installation.
After you load the apk, it would anyways make calls to your web-server which I'm not sure how it make sense to achieve without network connection though. I couldn't think of any reason to develop a mobile application as PWA without network. You can even have a pass though internet(sharing your desktops internet via USB) by connecting via USB if wifi is not available. But developing PWA with absolute no network mode is not practical.
Update: While you can generate the APK and side load it via USB in the above mentioned way, transferring the cached assets(HTML/CSS/JS/images) might be tricky. You may have to wrap your app as a plain cordova application or Ionic kind of PWA app which uses Cordova to wrap and build with your assets. This way, your APK will be having everything it needs to run for calculator kind of use case.
I created an Actions on Google app which I am currently testing. I was able to test it on my Pixel, but when I tried to launch the app on my Raspberry Pi running the Google Assistant SDK it responded by saying "(name of app) isn't supported on this device". Is there any way I can run the app on my Pi?
EDIT: Here is a picture of the surface capabilities.