简体   繁体   English

如何从 Xamarin.Forms 中启动谷歌照片应用程序?

[英]How can I launch google photos app from within Xamarin.Forms?

When using使用时

Launcher.OpenAsync("http://maps.google.com") 

the google maps application opens beautifully but with谷歌地图应用程序打开很漂亮,但

Launcher.OpenAsync("http://photos.google.com") 

it opens the application in browser.它在浏览器中打开应用程序。

According to the official docs ,根据官方文档

the OpenAsync(String) Launches the app specified by the uri scheme OpenAsync(String)启动 uri 方案指定的应用程序

So if you set the url like below it'll start the google photos application.I tested it on my side and it does open the application.因此,如果您像下面这样设置 url,它将启动 google photos 应用程序。我在我这边对其进行了测试,它确实打开了应用程序。

 await Launcher.OpenAsync("http://photos.google.com");

Update:更新:

If you want to launch the app respectively, please try use the following format of links:如果您想分别启动应用程序,请尝试使用以下格式的链接:

for instagram
instagram://user?username=yourUserName

for twitter
twitter://userName?user_id=userId

for facebook
fb://page/page_id

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 Xamarin.Forms 内本机启动外部应用程序? - How can I natively launch an external app from within Xamarin.Forms? 如何在应用中心的 Xamarin.Forms 中使用设置环境变量 - How can I use set Environment Variables in Xamarin.Forms from App Center 如何从 Xamarin.Forms 获得连续的地理定位? - How can I get a continous geolication from Xamarin.Forms? Xamarin.Forms UWP-登录时启动应用程序 - Xamarin.Forms UWP - Launch app on login 如何允许用户在Xamarin.Forms的ListView中平移地图? - How can I allow a user to pan a map within a ListView in Xamarin.Forms? How can I restrict my Azure Web App API access to only my Xamarin.Forms app? - How can I restrict my Azure Web App API access to only my Xamarin.Forms app? 无法从Xamarin.Forms应用连接到SignalR服务器 - Can't connect to SignalR server from Xamarin.Forms app 如何从 xamarin.forms 中的 Google 电子表格读取数据 - How to read data from Google spreadsheet in xamarin.forms 如何刷新 Xamarin.Forms 应用程序上的选项卡 - How do I refresh a tab on Xamarin.Forms app 我如何在xamarin.forms应用程序中使用permissionplugin和zxing nuget pkg? - How i can use permissionplugin with zxing nuget pkg in xamarin.forms app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM