내 응용 프로그램이 등록 과정에서 충돌이 발생합니다.이 문제에 대한 많은 수정이 있었지만 희망이 없습니다. 서버 측에서 PHP를 사용했습니다. 추가 된 도움말은 아래에 추가 된 코드입니다. 그것.C2DM 등록 프로세스에서 응용 프로그램이 다운되지는 않습니까?
1.In the Main Activity
C2DMessaging.register (this, "[email protected]"); C2DMessaging 클래스
공공 정적 무효 레지스터 (컨텍스트 컨텍스트 문자열 센더) = 새로운 텐트 (REQUEST_REGISTRATION_INTENT) {
의도 registrationIntent 2.In
;registrationIntent.setPackage(GSF_PACKAGE);
registrationIntent.putExtra(EXTRA_APPLICATION_PENDING_INTENT,PendingIntent.getBroadcast(context, 0, new Intent(), 0));
registrationIntent.putExtra(EXTRA_SENDER, senderId);
context.startService(registrationIntent);
// TODO: if intent not found, notification on need to have GSF
}
내 매니페스트 파일은 내가 모든 가능한 m를 시도 내가이 누락하고 확실하지 않다
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="com.requestec.push.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name="com.notify.AndroidNotification"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".C2DMReceiver" android:enabled="true" />
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.kk.push" />
</intent-filter>
<!-- Receive registration ids -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.kk.push" />
</intent-filter>
</receiver>
</application>
입니다 eans, 또는 나는 여기에 기본적인 것을 놓치고있다. 감사합니다
당신이 포함 할 수 있습니다 가지고있는 오류 메시지 (DDMS 사용)? –
답장을 보내 주셔서 감사합니다. 11-10을받습니다. 15 : 29 : 50.443 : WARN/ActivityManager (59) : 사용 권한 거부 : 수신 의도 {act = com.google.android.c2dm.intent.REGISTRATION cat = [com.kk com.kk.push하려면 보낸 사람 com.google.android.gsf (uid 10023) – Karthik
및 com.kk.push.permission.C2D_MESSAGE가 필요하며 또한 11-10 16 : 01 : 07.353 : 오류/C2DMRegistrar (188) : [C2DMReg] handleRequest catch java.io.IOException : SSL 종료 실패 : 시스템 호출 중 입출력 오류, 파이프 끊김 – Karthik