Question

In the App Inventor 2, where is the block mentioned in last item (figure) of the url: http://beta.appinventor.mit.edu/learn/reference/blocks/definition.html

I am trying to use bluetooth to connect my custom device with Android App.

The internet says:

This block provides a "dummy socket" for fitting a block that has a plug on its left into a place where there is no socket, such as one of the sequence of blocks in the do part of a procedure or an if block. The block you fit in will be run, but its returned result will be ignored. This can be useful if you define a procedure that returns a result, but want to call it in a context that does not accept a result.

Was it helpful?

Solution

You are looking for the evaluate but ignore result block
enter image description here

However in your bluetooth connecting example let me recommend you to use an if statement instead

if BluetoothClient1.connect ...
then do something
else display a message, e.g. "connection was not successful"

see also this bluetooth example
and see the documentation of the Bluetooth components

boolean Connect(text address)
Connect to the Bluetooth device with the specified address and the Serial Port Profile (SPP).
Returns true if the connection was successful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top