How to open app in mobile from android auto app?

36 views Asked by At

Android auto app should ask user to sign in from phone app so need to add screen in android auto to open sign in activity in app and sign in, if user clicks on sign in button in message screen in android auto it should open sign in screen in app.

I tried it with following code.

Intent intent = new Intent(getCarContext(), LoginWithActivity.class);
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
         
                getCarContext().startActivity(intent);

this works only when app is running but if app is closed or phone is locked in that case it's not opening the app in mobile.

Please help.

0

There are 0 answers