【问题标题】:Monodroid - Intent Filter for Google MapsMonodroid - 谷歌地图的意图过滤器
【发布时间】: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


    【解决方案1】:

    似乎有不同的方式来编写它们。比如下面的

    [IntentFilter (new[]{Intent.ActionView}]
    

    产生&lt;action android:name="android.intent.action.VIEW" /&gt;

    对于类别:LinkExamples

    【讨论】:

      猜你喜欢
      • 2013-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多