How can i make a app to chat from two phones

that's my pleasure :wink:

Taifun

Unfortunately the example aia does not work with an Android 8.1 and Android 12 devices; spawning numerous errors. When was the last time you tested this @Taifun

this might be, as it needs to be adapted to the SDK31 requirements, see here

Taifun

Thanks. I had to add permissions on the Android 11 and redo the pairing between devices.
Working now. :slight_smile:

I now added the ask for permission blocks and updated the example app...

however the ask for permission blocks from the example by @Anke fail for older Android devices... Error 908 RequestPermission: The permission BLUETOOTH_CONNECT has been denied. Please enable it in the settings app.. I guess, this issue will be fixed after MIT updates the bluetooth components?

Taifun

This seemed to work on both the 8.1 and 12 Androids
android8.1

If anyone tries the Bluetooth chat, they might try those . :slight_smile:

Which older devices fail?

Thank you @SteveJG for your tests...

I tested with Android 8.1 and asked for BluetoothComnect and BluetoothScan which resulted in error 908, see above... those permissions only work for newer devices... for older devices your blocks seem to be the correct ones...

Taifun

hello i did this project but it doesnt work

Which Android version are you using for your tests?
Do you have 2 Android devices? Did you install the example app in both devices? Is bluetooth enabled? Are the devices paired?
After you did that, what exactly happens? Please be as specific as possible

Taifun

askpermmm

Android 9 - Server BT (installed) ------ Android 5.1 Client BT (installed)

Server and client work for me with/without AskForPermission.

p9C3_Servidor_BTi_AskPerm.aia (10.8 KB)

p9C3_Cliente_BTi_AskPerm.aia (12.9 KB)

Important the "Known Issues" of @Taifun
http://puravidaapps.com/btchat.php

Sometimes I have had to close the application and "clear cache" of data to get it working again.

Yes, use a CloudDB.

pls I am working on a chat app that can send messages with one listview and receive messages with another listview

Welcome Joel.

Not clear what you want to do Joel. Here is a simple chat app CloudDB Chat App . It can be easily modified so that the current signed in user chat on his/her device is displayed in one listview and all others' comments are displayed in another listview. Is that what you want to do?

I just it in a way that someone using the same app can send messages in one box and receive messages in another box
something like thi

Screenshot 2023-08-26 232210

That is an example from Kodular. It uses a single listview that can be formatted to be 'pretty'
App Inventor can do that using an extension or it can be done in a similar way using a single listview but with a different display. Something like
chatSR

like How to: A SpeechRecognizer powered Chat app using the MIT CloudDB component

or like

or search the community for chat several examples using other techniques. :wink:

I just want something like that for Kodular
pls how can I do it using a single listview or an extension

pls i need help with this code
I want to achieve this
Screenshot 2023-08-28 175029
but the extension for that is regular expression extension
but I can not find this code in it