本文整理了Java中com.facebook.internal.Utility.isWebUri()
方法的一些代码示例,展示了Utility.isWebUri()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utility.isWebUri()
方法的具体详情如下:
包路径:com.facebook.internal.Utility
类名称:Utility
方法名:isWebUri
暂无
代码示例来源:origin: facebook/facebook-android-sdk
private static void validateLinkContent(
ShareLinkContent linkContent, Validator validator) {
Uri imageUrl = linkContent.getImageUrl();
if (imageUrl != null && !Utility.isWebUri(imageUrl)) {
throw new FacebookException("Image Url must be an http:// or https:// url");
}
}
代码示例来源:origin: facebook/facebook-android-sdk
private Attachment(UUID callId, Bitmap bitmap, Uri uri) {
this.callId = callId;
this.bitmap = bitmap;
this.originalUri = uri;
if (uri != null) {
String scheme = uri.getScheme();
if ("content".equalsIgnoreCase(scheme)) {
isContentUri = true;
shouldCreateFile = uri.getAuthority() != null &&
!uri.getAuthority().startsWith("media");
} else if ("file".equalsIgnoreCase(uri.getScheme())) {
shouldCreateFile = true;
} else if (!Utility.isWebUri(uri)) {
throw new FacebookException("Unsupported scheme for media Uri : " + scheme);
}
} else if (bitmap != null) {
shouldCreateFile = true;
} else {
throw new FacebookException("Cannot share media without a bitmap or Uri set");
}
attachmentName = !shouldCreateFile ? null : UUID.randomUUID().toString();
attachmentUrl = !shouldCreateFile
? this.originalUri.toString()
: FacebookContentProvider.getAttachmentUrl(
FacebookSdk.getApplicationId(),
callId,
attachmentName);
}
代码示例来源:origin: facebook/facebook-android-sdk
private static void validatePhotoForApi(SharePhoto photo, Validator validator) {
validatePhoto(photo);
Bitmap photoBitmap = photo.getBitmap();
Uri photoUri = photo.getImageUrl();
if (photoBitmap == null && Utility.isWebUri(photoUri) && !validator.isOpenGraphContent()) {
throw new FacebookException(
"Cannot set the ImageUrl of a SharePhoto to the Uri of an image on the " +
"web when sharing SharePhotoContent");
}
}
代码示例来源:origin: facebook/facebook-android-sdk
private static void validatePhotoForNativeDialog(SharePhoto photo, Validator validator) {
validatePhotoForApi(photo, validator);
if (photo.getBitmap() != null || !Utility.isWebUri(photo.getImageUrl())) {
Validate.hasContentProvider(FacebookSdk.getApplicationContext());
}
}
代码示例来源:origin: facebook/facebook-android-sdk
if (Utility.isWebUri(uri)) {
results[writeIndex] = uri.toString();
latch.countDown();
内容来源于网络,如有侵权,请联系作者删除!