我无法将图标的图像从 Firebase 存储检索到我的Xamarin.Android
应用程序,因为附加到图像 URL 的(动态)令牌最终会更改(出于安全原因)。
应用程序中的图标是使用 加载的FFImageLoading
,但是当传递存储在源代码中的静态链接(uri)时,ImageView 不会显示图标,因为令牌已过期(它不再有效)。
Firebase 存储 (uri) 中的图片链接示例:
https: // firebasestorage. googleapis. com / v0 / b / test-7c916. appspot. com / o / IconoSplash.png? alt = media & token = b207cb31-5ad5-48e1-86ac-1dcb07ee6021
位于上述 URL (uri) 末尾的过期令牌:
b207cb31-5ad5-48e1-86ac-1dcb07ee6021
使用 FFImageLoading 在 ImageView 中读取图像:
var Iconx = FindViewById <ImageView> (Resource.Id.IconoSplash);
ImageService.Instance.LoadUrl (uri)
.Retry (5, 250)
.Into (Iconox);
问题: 如何解决?
Firebase 存储 URL 是否可能是静态的(即不会不断变化)?
或者我如何获得一个新的有效令牌?
(找不到有关此问题和 Xamarin Android 的太多信息,因此任何提示都会有所帮助。)