I want to open a non-launcher activity from broadcastreceiver when the app is in background. I tried using intent but still its opening the launcher page only. Is there any way open any other activity which is not a launcher activity and still open the whole app? In the below code when an incoming call is received I am checking if the app is in background and if it is then sending the intent to open app.

```html
public class CallStateReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {

        final String action = intent.getAction();

        if(NgnInviteEventArgs.ACTION_INVITE_EVENT.equals(action)){
            NgnInviteEventArgs args =
                    intent.getParcelableExtra(NgnEventArgs.EXTRA_EMBEDDED);
            if(args == null){
                Log.d("DEBUG", "Invalid event args");
                return;
            }

            NgnAVSession avSession = NgnAVSession.getSession(args.getSessionId());
            if (avSession == null) {
                return;
            }

            final NgnInviteSession.InviteState callState = avSession.getState();
            NgnEngine mEngine = NgnEngine.getInstance();

            switch(callState){
                case NONE:
                default:
                    break;
                case INCOMING:
                    Log.i("DEBUG", "Incoming call");

                    if (isAppForground(context)) {

                        context.startActivity(new Intent(context,CallScreen.class));
                      mEngine.getSoundService().startRingTone();
                   } else {
                        System.out.println("sammy_isINbackground");
                        // when App is in Background
                        Intent it = new Intent();
                        it.setComponent(new ComponentName(context.getPackageName(), MainActivity.class.getName()));
                        it.putExtra("from", "receiver");
                        intent.putExtra("incomingSessionID", avSession.getId());
                        it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        context.startActivity(it);

                        Intent in = new Intent("android.intent.category.DEFAULT");
                        in.setClassName("nits_33.sipcall.CallStateReceiver", "nits_33.sipcall.CallScreen");
                        in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        context.startActivity(in);
                       mEngine.getSoundService().startRingTone();
                    }
                    //for Ringtone
                    mEngine.getSoundService().startRingTone();
                    break;
                case INCALL:
                    Log.i("DEBUG", "Call connected");
                    mEngine.getSoundService().stopRingTone();
                    break;
                case TERMINATED:
                    Log.i("DEBUG", "Call terminated");
                    mEngine.getSoundService().stopRingTone();
                    mEngine.getSoundService().stopRingBackTone();
                    break;
            }
        }
    }

    public boolean isAppForground(Context mContext) {

        ActivityManager am = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
        List<ActivityManager.RunningTaskInfo> tasks = am.getRunningTasks(1);
        if (!tasks.isEmpty()) {
            ComponentName topActivity = tasks.get(0).topActivity;
            if (!topActivity.getPackageName().equals(mContext.getPackageName())) {
                return false;
            }
        }

        return true;
    }
}
```