canDecodeUrl
The canDecodeUrl API is called by the super app to verify if the URL can be decoded by Mini Program Platform.
Method signature
copy
public static synchronized boolean canDecodeUrl(String url);
Request parameters
Name | Type | Description | Required |
url | String | The URL content that is used to check if the URL can be decoded. | M |
Response parameters
Type | Length | Description | Required |
Boolean | / | Specify whether the user is in Alipay+ supported region. | M |
Sample
The following sample shows how to call the canDecodeUrl API.
copy
boolean canDecode = GriverDecodeUrl.canDecodeUrl(uriContent);
if(canDecode) {
//following code is like
//GriverDecodeUrl.decodeUrlContent(uriContent, new GriverDecodeUrlCallback(...))
} else {
//other logic
}