Hello everyone!
I have been working on an app that takes the data readings (English phrases) from arduino and displays it in the app. It was working fine until yesterday when I only had one button to connect to bluetooth through HC-05 and one label to display the text but today, I added translator functionality and few languages to translate to and tested the app, the bluetooth gets connected but although I can see the phrases output on the arduino serial monitor, there is nothing on the label. I had put color to the label , thought maybe its covering the text but even after making it light gray, there is no output.
I know this is kinda last minute but I really need it to work by tomorrow as I have to present it. Any help is appreciated...thank you in advance!
this is whats happening...the listpicker works fine and it displays my hc-05 module's address but in the label where it is supposed to display the output it shows the else block statement...please help i am starting to feel hopeless
Most people use a ListView instead of a List Picker for their connection establishment.
Here is a technique to deal with connection permissions, using a ListView:
(Canned Response ABG - Bluetooth non-BLE SCAN Permission Blocks)
The easiest solution, for immediate relief
(from @Barry_Meaker) ...
I had the same issue. The problem is your app does not have permission to see nearby devices. The solution is to give your app permission on your phone (no code changes in your app).
on your phone,
goto settings
search for your app
in App Info for your app select Permissions
change Nearby Devices from Not Allowed to Allowed
Done
By the way, the very first time you run the app, Android will ask if you want to grant the app this permission. If you say no, or ignore the pop-up, the permission will be set as Denied. Android will not ask again.
A more complex approach, for professional app development:
You mentioned that adding the translator broke your app.
Removing the translator component would lose all your translation request blocks, but allow you to verify if it indeed had an effect on your BlueTooth operations.
The draggable event block above would let you restore your translation calls if you drag it back into the Blocks Editor.
Update: I got the output on the app (my wiring was wrong) but now the translator functionality is not working :((
Please help!!.
If you can help me with getting the translated text on another app,please do.
Thanks for all the deubgging up till now.