我使用this question作为参考,了解如何从带有嵌入式网址的URI中获取图片,该网址是从“照片”应用开始退回的。现在,我注意到这些URI不再包含此URL,而是包含某种键。我现在不知道如何处理此图像。我回来的URI看起来像这样:
content://com.google.android.apps.photos.contentprovider/0/1/mediaKey:/*long-key*/ACTUAL
我们如何使用它来显示用户从“照片”应用中选择的位图?
答案 0 :(得分:2)
使用
从URI中读取var dist = Math.sqrt( Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2) );