Java Code Examples for org.apache.cordova.CordovaResourceApi#getUriType()

The following examples show how to use org.apache.cordova.CordovaResourceApi#getUriType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SystemWebViewClient.java    From xmall with MIT License 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 2
Source File: SystemWebViewClient.java    From chappiecast with Mozilla Public License 2.0 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 3
Source File: SystemWebViewClient.java    From cordova-plugin-intent with MIT License 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 4
Source File: SystemWebViewClient.java    From a2cardboard with Apache License 2.0 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 5
Source File: SystemWebViewClient.java    From cordova-plugin-app-update-demo with MIT License 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 6
Source File: X5WebViewClient.java    From cordova-plugin-x5engine-webview with Apache License 2.0 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(Build.VERSION.SDK_INT){
        case Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 7
Source File: SystemWebViewClient.java    From app-icon with MIT License 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 8
Source File: X5WebViewClient.java    From cordova-plugin-x5-tbs with Apache License 2.0 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
  if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
    return false;
  }
  if (uri.getQuery() != null || uri.getFragment() != null) {
    return true;
  }

  if (!uri.toString().contains("%")) {
    return false;
  }

  switch (android.os.Build.VERSION.SDK_INT) {
    case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
    case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
      return true;
  }
  return false;
}
 
Example 9
Source File: X5WebViewClient.java    From cordova-plugin-x5-webview with Apache License 2.0 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(Build.VERSION.SDK_INT){
        case Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 10
Source File: X5WebViewClient.java    From x5webview-cordova-plugin with Apache License 2.0 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(Build.VERSION.SDK_INT){
        case Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 11
Source File: SystemWebViewClient.java    From ultimate-cordova-webview-app with MIT License 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 12
Source File: SystemWebViewClient.java    From BigDataPlatform with GNU General Public License v3.0 6 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    switch(android.os.Build.VERSION.SDK_INT){
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH:
        case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1:
            return true;
    }
    return false;
}
 
Example 13
Source File: SystemWebViewClient.java    From keemob with MIT License 5 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    return false;
}
 
Example 14
Source File: SystemWebViewClient.java    From keemob with MIT License 5 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    return false;
}
 
Example 15
Source File: SystemWebViewClient.java    From pychat with MIT License 5 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    return false;
}
 
Example 16
Source File: SystemWebViewClient.java    From lona with GNU General Public License v3.0 5 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    return false;
}
 
Example 17
Source File: SystemWebViewClient.java    From countly-sdk-cordova with MIT License 5 votes vote down vote up
private static boolean needsSpecialsInAssetUrlFix(Uri uri) {
    if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) {
        return false;
    }
    if (uri.getQuery() != null || uri.getFragment() != null) {
        return true;
    }

    if (!uri.toString().contains("%")) {
        return false;
    }

    return false;
}