簡體   English   中英

如何從 Xamarin.Forms 中啟動谷歌照片應用程序?

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

使用時

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

谷歌地圖應用程序打開很漂亮,但

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

它在瀏覽器中打開應用程序。

根據官方文檔

OpenAsync(String)啟動 uri 方案指定的應用程序

因此,如果您像下面這樣設置 url,它將啟動 google photos 應用程序。我在我這邊對其進行了測試,它確實打開了應用程序。

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

更新:

如果您想分別啟動應用程序,請嘗試使用以下格式的鏈接:

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM