Hi All!
I have a printer class that I declared in the starter to allow printing to continue in the background regardless of anything. The printer class also contains a bluetooth class, because I use a BT printer. When I start using a new printer, the bluetooth class wants to connect to it and offers a list for the client to choose the right one. This of course ends up with an error, which has been mentioned in forum (android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?), but no solution. How to call a dialog from service or avoid this call? I have tried using callsub from class to call a procedure in main which calls nicely, but I can't return the chosen value to a dynamically created class.
Can anybody suggest something?
I have a printer class that I declared in the starter to allow printing to continue in the background regardless of anything. The printer class also contains a bluetooth class, because I use a BT printer. When I start using a new printer, the bluetooth class wants to connect to it and offers a list for the client to choose the right one. This of course ends up with an error, which has been mentioned in forum (android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?), but no solution. How to call a dialog from service or avoid this call? I have tried using callsub from class to call a procedure in main which calls nicely, but I can't return the chosen value to a dynamically created class.
Can anybody suggest something?