I'm creating an application using Bluetooth, where the method that receives the messages is static
.
Depending on the message the device receives, I would like the application to do something other than simply display the message in a textView
(also static
) on the screen, such as calling another screen ( setContentView
), creating a Intent
any or AlertDialog.Builder
.
The problem occurs when a static
method tries to use these resources. I have tried using this method static
to create an object of class ActivityMain
to use any other method that performed this process, however, errors also occur.
What to do?