如何跟踪GCM问题? [英] How to track GCM Problems?

查看:166
本文介绍了如何跟踪GCM问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题我真的只是没有得到任何消息GCM。我不想弹出式广告或声音播放时,它甚至犯规火的的onReceive()的在广播Reciever,这是我的理解方法,第一点的应用程序处理的消息。

I have a problem I`m just not getting any GCM Messages. I dont want Pop Ups or sounds playing, it doesnt even fire the onReceive() Method in the Broadcast Reciever, which is, to my understanding, the first point the Application handles a message.

我的最大的问题是我没有得到任何错误消息或提示。当我发送消息时,我得到的消息ID,组播ID和一个成功= 1的消息。我还获得已经注册了运行应用程序第二次了注册资格的任何设备和一个注册ID,一个在设备上。该设备也登录到谷歌播放,同一帐户在谷歌API控制台,但什么也没有发生在设备时,我送一个GCM消息。

My biggest problem is I dont get any error messages or Hints. When I send a message, I get the message ID, a multicast ID and a "success=1" message. I also get a "Device registrated on any device and a Reg ID, a "already registered" running the app a second time. The Devices are also logged into Google Play, same account as on the Google API Console. But nothing happens on the Device when I send a GCM Message.

我张贴我的完整Android清单,请让我知道如果你需要更多code。这是我驾驶的疯狂。

I post my complete android manifest, please let me know if you need more code. This is driving my crazy.

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

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

<supports-screens 
android:largeScreens="true" 
android:normalScreens="true" 
android:smallScreens="true" 
android:resizeable="true" 
android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<permission android:name="com.lottoapplicationandroid.permission.C2D_MESSAGE"     android:protectionLevel="signature" />
<uses-permission android:name="com.lottoapplicationandroid.permission.C2D_MESSAGE" /> 
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" /> 
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main"
        android:configChanges="orientation|keyboardHidden" 
        android:screenOrientation="portrait">

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

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

    <!-- ZXing activities -->
<activity android:name="com.google.zxing.client.android.CaptureActivity"
          android:screenOrientation="landscape"
          android:configChanges="orientation|keyboardHidden"
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
          android:windowSoftInputMode="stateAlwaysHidden">
  <intent-filter>
    <action android:name="com.phonegap.plugins.barcodescanner.SCAN"/>
    <category android:name="android.intent.category.DEFAULT"/>
  </intent-filter>
</activity>
<activity android:name="com.google.zxing.client.android.encode.EncodeActivity" android:label="@string/share_name">
  <intent-filter>
    <action android:name="com.phonegap.plugins.barcodescanner.ENCODE"/>
    <category android:name="android.intent.category.DEFAULT"/>
  </intent-filter>
</activity>


<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
 <action android:name="com.google.android.c2dm.intent.RECEIVE" />
 <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
 <category android:name="com.lottoapplicationandroid" />
</intent-filter>
</receiver>

<service android:name=".GCMIntentService" />

</application>

修改

我不如果没有可能需要一个解决方案这一点。我倒是对提示如何找到什么`脚麻非常感激。例如。我发现我必须有一个开放的端口5228.有谁知道如何检查设备的是,端口上监听?

I dont need a solution for this if not possible. I´d be very thankful for hints how to find out what`s going wrong. E.g. I found out I have to have an open Port 5228. Does anybody know how to check if the devices is listening on that port?

推荐答案

的问题是解决了。

我不得不打开Wi-Fi关闭。

I had to turn Wi-Fi off.

无线网络/电话网络

OFF / OFF:不工作

off / off : not working

开启/关闭:不工作

这是/于:不工作

OFF / ON:工作

off / on : working

这篇关于如何跟踪GCM问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆