In Preview mode, clicked on the Play button. Then a lot of text scrolling through console. The screen flashed once and a popup showed:
“APDE Sketch Preview has stopped”
In App mode, clicked on the Play button. Then a lot of text scrolling through console. It showed:
“Do you want to install an update to this existing application? Your existing data will not be lost. It does not require any special access”
Clicked on Install and the progress bar is shown. At the end a popup showed:
“BluetoothCursors has stopped.”
Not sure what was updating. Play Store doesn’t show any update for ADPE is required.
I hope you have access to two phones. Below you have a send code and a receiver code for each individual phone. Give permission to Bluetooth on both phones by choosing Settings/Sketch permmissions/ BLUETOOTH and also BLUETOOTH_ADM
Did you give the Bluetooth permission?
What is your Android version?
Please comment out the lines of the else part in the if block in the draw() function, and try once more.
Do you have another device with other Android version?
Let’s try it different.
But for this test yo need two phones and pair them. On one phone you load the code below and change the string MY_PHONE with the string that appears as paired device on the other phone you want to connect to. (You see them in your phone :Settings/Bluetooth).
On the other phone you install an app named “Serial Bluetooth Terminal”, that you can find on Google’s Play store. In that app you tap on the menu top left and choose “Devices”. There you must see the name of the other phone if it is paired. Tab on the name of that phone and the Terminal will open. Then you run the sketch’s code below on the other phone. Now tap on the icon in the bluetooth terminal app, that looks like two hearts left of the trash can (top right).If everything goes well you will see ,"Connecting to (paired phone’s name) ", and then “Connected”. Nothing more will happen, it’s just to verify the connection.
I tried it with my bluetooth speaker. I know it’s paired because I’ve been using RFO-BASIC to send BT commands to the speaker.
Actually, the device does not matter because it already crashed in the first line while generating the object with “new”
So your device does work with Bluetooth using the RFO-BASIC app?
I tried that language before I found Processing.
I really liked it, because Basic is my background, but it is incredible slow with graphics.
The only thing the code above does is creating a Ketai Bluetooth object. There are two possibilities left; or the Ketai lib does not work with Android OREO, or the APDE does not write the permissions in the Android manifest file.
In the f irst case I could write the code in plain Android java but I would need your phone to test it. In the second case I can guide you to the build folder, but to acsess that, your phone needs to be rooted. Is it?
Another thing you could try, is to load your sketch with an usb cable on your PC using Processing for Android Mode.
Yes, tapping 7 times on the “About this device”, bar in “Settings”, will create a new, “Developer Options” bar, where you set the usb options, to be able to use the MTP mode (Media Transfer Protocol.). I had a look at the Basic’s forum. It’s pretty quiet now, and the app isn’t available on the GPlay store anymore. A pity.
Anyhow, I would give it a try on PC, and let us know the result.
Caused by: java.lang.ClassNotFoundException: android.content.BroadcastReceiver
... 4 more