Starting activity from a remote service

iam tries to start activity from another distribution from my remote service: this is how I implement service.java

  public class CurrencyService extends Service
  {
    public class CurrencyServiceImpl extends ICurrencyService.Stub
    {

    int CALL_PUSH_SERVICE_ACTIVITY=10;


    @Override
    public void callSomeActivity(int activityId) throws RemoteException
    {
            Intent pushActivity=new Intent("com.pushservice.PushActivity");
            pushActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

            startActivity(pushActivity);
     }
     .....

}

ive also added a line to the service manifest:

the service is working fine, but I can not start the action → PushActivity, which is in a different package of a different application, this is an error:

No activity was found Exception: no activity was found for working with the object {act = com.pushservice.PushServiceActivity flq = 0x10 ...

thank.

+3
source share
2 answers

You are trying to open Activityfrom intent-filterwith actionfrom "com.pushservice.PushActivity". You do not have Activitya intent-filterc actionfrom "com.pushservice.PushActivity".

- , , , .

+1

. Android:

, NotificationManager . , , .

+2

Source: https://habr.com/ru/post/1743314/


All Articles