2013-12-23 3 views
0

지시를 따랐습니다. 그러나 메시지 전송을 테스트 할 때 아무 것도받지 못합니다.PushBot 안드로이드 클라이언트가 작동하지 않습니다.

응용 프로그램에 오류가없고 밀어 넣기 콘솔에 등록 된 장치가 있다는 것을 알 수 있습니다.

무슨 일이 일어나는지 어떻게 알 수 있습니까?

코드는 템플릿과 유사하며 제공 한 모든 지침을 따릅니다.

응용 프로그램

import com.pushbots.push.Pushbots; 
import android.app.Application; 

public class MyApplication extends Application { 
    @Override 
    public void onCreate() { 



     super.onCreate(); 
     String SENDER_ID = "ID here"; 
     String PUSHBOTS_APPLICATION_ID = "Pushbot App Id"; 
     Pushbots.init(this, SENDER_ID,PUSHBOTS_APPLICATION_ID); 
    } 
} 

다음

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.zuppush" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <!-- GCM connects to Google Services. --> 
<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 
<!-- GCM requires a Google account. --> 
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
<uses-permission android:name="android.permission.WAKE_LOCK" /> 
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/> 
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> 

<permission android:name="com.example.zuppush.permission.C2D_MESSAGE" 
    android:protectionLevel="signature" /> 
<uses-permission android:name="com.example.zuppush.permission.C2D_MESSAGE" /> 

<!-- This app has permission to register and receive data message. --> 
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> 




    <uses-sdk 
     android:minSdkVersion="14" 
     android:targetSdkVersion="17" /> 


     <application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:name="com.example.zuppush.MyApplication" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" > 


     <activity 
      android:name="com.example.zuppush.MainActivity" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 


      <intent-filter> 
      <action android:name="com.example.zuppush.MESSAGE" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 

     </activity> 


     <activity android:name="com.pushbots.push.PBMsg"/> 
<activity android:name="com.pushbots.push.PBListener"/> 
<receiver 
android:name="com.google.android.gcm.GCMBroadcastReceiver" 
android:permission="com.google.android.c2dm.permission.SEND" > 
    <intent-filter> 
     <!-- Receives the actual messages. --> 
     <action android:name="com.google.android.c2dm.intent.RECEIVE" /> 
     <!-- Receives the registration id. --> 
     <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> 
     <category android:name="com.example.zuppush" /> 
    </intent-filter> 
</receiver> 
<receiver android:name="com.pushbots.push.MsgReceiver" /> 
<service android:name="com.pushbots.push.GCMIntentService" /> 
<service android:name="org.openudid.OpenUDID_service" > 
    <intent-filter> 
     <action android:name="org.openudid.GETUDID" /> 
    </intent-filter> 
</service> 


    </application> 

</manifest> 

답변

0

난 당신이 사용하는 com.google.android.gcm.GCMBroadcastReceiver의 버전을 잘 모르겠지만, 같은 매니페스트 외모는 이전 클라이언트에서 가져온 기본 구현이 있다면 GCM 라이브러리의 경우이 구현에서는 GCMIntentService이 앱의 기본 패키지 (com.example.zuppush)에 포함될 것으로 예상합니다.

+0

GCM을 감싸는 푸시 (pushbot) 서비스입니다. 하지만 이것은 푸시 봇에 관한 버그라고 생각합니다. 나는이 코드를 변경하지 않았지만 새 프로젝트를 마친 후에 결국 다시 작동하게 만들었습니다. – drlobo

관련 문제