I have my running service. When I call some service's method ( start() ) which must invoke showAlert() to show some information I have an exception ....
Using java Syntax Highlighting
- public class MyService extends Service {
- @Override
- public IBinder getBinder() {
- return mBinder;
- }
- @Override
- public void onCreate() {
- super.onCreate();
- }
- private final IMyService.Stub mBinder = new IMyService.Stub() {
- public void start() {
- notify();
- }
- };
- public void notify() {
- new Thread(new Notificator()).start();
- }
- private class Notificator implements Runnable {
- public void run() {
- showAlert("START TEST", "Yes or No?", "No", null, "Yes", yesListener, true, null);
- }
- }
- ....
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
How to call correctly showAlert() method from service ?




