public static boolean isValidDeviceTokenForVariant ( final String deviceToken , final VariantType type ) { switch ( type ) { case IOS : return IOS_DEVICE_TOKEN . matcher ( deviceToken ) . matches ( ) ; case ANDROID : return ANDROID_DEVICE_TOKEN . matcher ( deviceToken ) . matches ( ) ; case WINDOWS_WNS : return WINDOWS_DEVICE_TOKEN . matcher ( deviceToken ) . matches ( ) ; } return false ; }
Helper to run quick up - front validations .