java - Android c2dm 未知权限

标签 java android android-c2dm

我看到有人发布了一个非常相似的问题,但他的解决方案没有帮助。我在 logcat 的警告部分看到未知权限。

unknown permission com.google.android.c2dm.permission.C2D_MESSAGE in package com.upmc

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.upmc"
android:versionCode="1"
android:versionName="1.0" >

<uses-permission android:name="android.permission.INTERNET" />
<permission android:name="com.upmc.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.google.android.c2dm.permission.C2D_MESSAGE" />

     <!-- registers the receiving class for a c2dm broadcast intent to be .C2DMBroadcastReceiver.-->

    <receiver android:name=".C2DMReceiver" android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <!--Action String being listened for, then calls parent registered receiver -->
            <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
            <!-- still don't understand this  -->
            <catagory android:name="com.upmc" />
            <!-- must unregister intent filter when app is not running -->
        </intent-filter>
        <intent-filter>
            <!-- change here...action string pre-set by google?-->
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
            <!-- specify under what circumstances the action should be serviced -->
            <catagory android:name="com.upmc" />
        </intent-filter>
    </receiver>

很难阅读,我知道抱歉!

我也没有从 Google 得到任何类型的回复。我已经注册了这个应用程序并登录了谷歌帐户。有什么想法吗?

最佳答案

根据this article ,要在应用程序中使用C2DM必须注册以下权限

  1. com.google.android.c2dm.permission.RECEIVE
  2. android.permission.INTERNET

同时引用这个问题:C2DM: How to use C2D_MESSAGE permission?

关于java - Android c2dm 未知权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11051207/

相关文章:

java - 如何覆盖移动浏览器的自动调整?

android - 来自传入短信android的时间戳

android - 使用键盘进行屏幕输入

运行重绘方法后,JAVA swing gui 窗口会出现抖动

java - 在 Spring 和 hibernate 中从数据库获取数据时,如何以正确的格式获取日期时间?

android - 使用SQLiteOpenHelper在数据库中创建表时,应用程序崩溃

android - Android c2dm 每天的设备配额是多少?

android - grails C2DM - Android

java.lang.ArrayIndexOutOfBoundsException 和 If 逗号后面的条目不是整数