0

I have a service 'MyService' running in background which launches an activity 'MyActivity' on certain event (code below).

    Intent i = new Intent(this, MyActivity.class);
    i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(i);

'MyActivity' perfroms some action and has to communicate back to 'MyService' but I do not know how it can be done since there is no reference to service.

Please note 'MyService' extends 'HostApduService'. I have just checked in docs that HostApduService has declared 'onBind' as final

@Override
public final IBinder onBind(Intent intent) {
    return mMessenger.getBinder();
}

So I can not use the service binding mechanism, right?

Any pointer please?

Thanks
iuq

iuq
  • 1,487
  • 1
  • 20
  • 42

0 Answers0