【发布时间】:2015-02-12 00:50:08
【问题描述】:
我正在尝试针对我的 Activity 响应 Google Maps Uri 意图。在谷歌快速搜索后,我发现了这个:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https" android:host="maps.google.com" />
<data android:scheme="geo" />
</intent-filter>
来源:How intercept a google maps intent in Android? 对于我的 Activity,Xamarin.Android 中的这个 Intent Filter 是什么?
目前,我尝试这样做:
[IntentFilter(new[] { "android.intent.action.VIEW" }, Categories = new[] {"android.intent.category.DEFAULT", "android.intent.category.BROWSABLE"}, DataScheme = "https", DataHost = "maps.google.com" )]
但它似乎不起作用。我很困惑如何指定额外的
<data android:scheme="geo" />
任何指针?谢谢。
【问题讨论】:
标签: c# android google-maps xamarin xamarin.android