public void onNewIntent()

in car_app_library/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/ShowcaseSession.java [115:149]


    public void onNewIntent(@NonNull Intent intent) {
        // Process various deeplink intents.

        ScreenManager screenManager = getCarContext().getCarService(ScreenManager.class);

        if (CarContext.ACTION_NAVIGATE.equals(intent.getAction())) {
            // If the Intent is to navigate, and we aren't already, push the navigation screen.
            if (screenManager.getTop() instanceof NavigatingDemoScreen) {
                return;
            }
            screenManager.push(new NavigatingDemoScreen(getCarContext()));
            return;
        }

        if (getCarContext().getCallingComponent() != null) {
            // Remove any other instances of the results screen.
            screenManager.popToRoot();
            screenManager.push(new ResultDemoScreen(getCarContext()));
            return;
        }

        Uri uri = intent.getData();
        if (uri != null
                && URI_SCHEME.equals(uri.getScheme())
                && URI_HOST.equals(uri.getSchemeSpecificPart())) {

            Screen top = screenManager.getTop();
            // No-op
            if (INTENT_ACTION_NAV_NOTIFICATION_OPEN_APP.equals(uri.getFragment())) {
                if (!(top instanceof NavigationNotificationsDemoScreen)) {
                    screenManager.push(new NavigationNotificationsDemoScreen(getCarContext()));
                }
            }
        }
    }