Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/189.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何接收正确的url?正在尝试从firebase应用程序中的googlesignin帐户获取个人资料图片_Java_Android_Firebase_Android Studio_Google Cloud Firestore - Fatal编程技术网

Java 如何接收正确的url?正在尝试从firebase应用程序中的googlesignin帐户获取个人资料图片

Java 如何接收正确的url?正在尝试从firebase应用程序中的googlesignin帐户获取个人资料图片,java,android,firebase,android-studio,google-cloud-firestore,Java,Android,Firebase,Android Studio,Google Cloud Firestore,好的,听着,我已经在我的应用程序中加入了使用你的谷歌帐户登录的功能,一切正常。问题是,当我尝试从该帐户检索profileImage时,我可以将其显示到ImageView中,但我没有获得到它的真正下载链接,你知道吗 account = GoogleSignIn.getLastSignedInAccount(getApplicationContext()); Picasso.get().load(account.getPhotoUrl()).placeholder(R.drawable.ic_act

好的,听着,我已经在我的应用程序中加入了使用你的谷歌帐户登录的功能,一切正常。问题是,当我尝试从该帐户检索profileImage时,我可以将其显示到ImageView中,但我没有获得到它的真正下载链接,你知道吗

account = GoogleSignIn.getLastSignedInAccount(getApplicationContext());
Picasso.get().load(account.getPhotoUrl()).placeholder(R.drawable.ic_action_profile).into(profilePictureImageView);
当我尝试从帐户中获取url时,我收到以下示例:

但是我需要一个以.jpg或.png结尾的url。任何可以在我的应用程序上运行的东西有什么想法吗? 就像我随机发现的一样:
您检索到的第一个链接https://lh3.googleusercontent.com/a-/AOh14GhRv3JUcLKBQD3GSVZZbHHoQBxvPXafNlPICiU_=s96-c是一个,您想要检索的是一个URL,下面是一个解释两者区别的URL

要检索URL,请使用以下字符串URL=account.getPhotoUrl.toString