static/src/core/router.js
/**
 * Route to the corresponding Android scene for the passed route.
 */
Route to the corresponding Android scene for the passed route.
Route to the corresponding Android scene for the passed route .
function routeToAndroid(route) {
  let androidRoute = undefined;
  if (route[0] === '@') {
    androidRoute = route.substr(1);
  } else if (isAndroid()) {
    if (route === 'jetpack' || route === 'gumball') {
      androidRoute = route;
    } else if (route === 'matching') {
      androidRoute = 'memory';
    }
  }
  if (!androidRoute) {
    return false;
  }
  console.info('loading Android route', androidRoute);
  const hostname = window.location.hostname;
  window.location = `com.google.android.apps.santatracker://${hostname}/android/${androidRoute}`;
  return true;
}
function routeToAndroid ( route ) { let androidRoute = undefined ; if ( route [ 0 ] === '@' ) { androidRoute = route . substr ( 1 ) ; } else if ( isAndroid ( ) ) { if ( route === 'jetpack' || route === 'gumball' ) { androidRoute = route ; } else if ( route === 'matching' ) { androidRoute = 'memory' ; } } if ( ! androidRoute ) { return false ; } console . info ( 'loading Android route' , androidRoute ) ; const hostname = window . location . hostname ; window . location = ` ${ hostname } ${ androidRoute } ` ; return true ; }
Route to the corresponding Android scene for the passed route.
Route to the corresponding Android scene for the passed route .
// Name mismatch from web/Android.