How can I get final string 'data' into this function beginListenForData
() for use to another function upload
()? BeginListen
get data from bluetooth...
void beginListenForData()
{
final Handler handler = new Handler();
workerThread = new Thread(new Runnable()
{
public void run()
{
try {
final String data = new String(encodedBytes, "US-ASCII");
readBufferPosition = 0;
//data2=data;
handler.post(new Runnable()
{
public void run()
{
myLabel.setText(data);