【问题标题】:Cannot Receive App Intent Type Nearby Notification - Beacons无法接收应用意图类型附近的通知 - 信标
【发布时间】:2018-02-07 17:07:43
【问题描述】:

我注册了一个信标(由 Android 设备上的应用模拟,属于 Eddystone-UID 类型)并尝试从 Google Beacon Platform 仪表板设置附近的通知。

当我创建“App Intent”类型的通知时,当它靠近充当信标的设备时,它没有在设备上收到。但是,如果我设置“Web URL”类型的附近通知,它会显示在此信标范围内的所有设备上。

在设置 App Intent 类型的通知时,我提供以下详细信息: 1. Intent scheme(与下面代码中的scheme相同) 2. 应用程序的包名 - 与应用程序清单文件中的相同 将意图路径字段留空,因为它不是强制性的。

这是应用清单中的意图过滤器:

       <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="app" />
        </intent-filter>

我尝试查看多个博客和视频,但无法找出问题所在。有人可以指出我的错误吗?

谢谢。

【问题讨论】:

    标签: android android-intent eddystone google-beacon-platform


    【解决方案1】:

    试试 whis

    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <!-- both categories below are required -->
        <category android:name="android.intent.category.BROWSABLE"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:host="host"
            android:pathPrefix="/path"
            android:scheme="yourscheme"/>
     </intent-filter>
    

    【讨论】:

    • 如果您已经解决了问题,您可以将其发布为答案吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多