下面的详细信息,但基本上我正在尝试了解我的Droid上发生了什么错误。
详细说明: 我正在努力加快C2DM的速度。我正在测试使用Urban Airship的推送通知服务(目前为止IMO非常酷)通过C2DM向Android上运行的应用发送通知。
我的Droid(运行Android 2.2.2)没有显示通知,每当我认为设备收到通知时,我都会看到写入LogCat的堆栈跟踪。
我不知道是什么产生了堆栈跟踪。我知道每次通过Urban Airship的网站向设备发送推送通知时都会生成它。
我非常确定我已正确配置了我的C2DM,Urban Airship和Android应用,因为我可以在Android模拟器上使用相同的应用和Google帐户成功接收和显示通知。仅供参考 - Android应用程序是Urban Airship的示例Android推送应用程序,使用我的配置信息编辑。
由于它在Android模拟器中运行并且在我的实际设备上失败,我假设我的设备有一些导致它失败的东西。因此,对下面的堆栈跟踪感兴趣。
11-11 16:15:28.894: E/TalkProvider(4433): query db caught
11-11 16:15:28.894: E/TalkProvider(4433): java.lang.IllegalArgumentException: the bind value at index 2 is null
11-11 16:15:28.894: E/TalkProvider(4433): at android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:234)
11-11 16:15:28.894: E/TalkProvider(4433): at android.database.sqlite.SQLiteQuery.bindString(SQLiteQuery.java:182)
11-11 16:15:28.894: E/TalkProvider(4433): at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:48)
11-11 16:15:28.894: E/TalkProvider(4433): at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1345)
11-11 16:15:28.894: E/TalkProvider(4433): at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:330)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.talk.TalkProvider.queryInternal(TalkProvider.java:1740)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.talk.TalkProvider.query(TalkProvider.java:1436)
11-11 16:15:28.894: E/TalkProvider(4433): at android.content.ContentProvider$Transport.query(ContentProvider.java:163)
11-11 16:15:28.894: E/TalkProvider(4433): at android.content.ContentResolver.query(ContentResolver.java:245)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.gtalkservice.DatabaseHelper.getOffTheRecordCursor(DatabaseHelper.java:756)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.gtalkservice.ChatSession.queryOtrCursor(ChatSession.java:206)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.gtalkservice.ChatSession.<init>(ChatSession.java:168)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.gtalkservice.ChatMgr.createChatSession(ChatMgr.java:264)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.gtalkservice.ChatMgr.processIncomingMessage(ChatMgr.java:721)
11-11 16:15:28.894: E/TalkProvider(4433): at com.google.android.gsf.gtalkservice.ChatMgr.processPacket(ChatMgr.java:521)
11-11 16:15:28.894: E/TalkProvider(4433): at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader.java:1860)
11-11 16:15:28.894: E/TalkProvider(4433): at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:451)
11-11 16:15:28.894: E/TalkProvider(4433): at org.jivesoftware.smack.PacketReader.access$200(PacketReader.java:91)
11-11 16:15:28.894: E/TalkProvider(4433): at org.jivesoftware.smack.PacketReader$3.run(PacketReader.java:154)
11-11 16:15:28.894: E/Smack/Packet(4433): [PacketReader] listenerThread: caught exception
11-11 16:15:28.902: E/Smack/Packet(4433): notify conn error. close connection!
11-11 16:15:28.902: E/Smack/Packet(4433): java.lang.NullPointerException
11-11 16:15:28.902: E/Smack/Packet(4433): at com.google.android.gsf.gtalkservice.ChatSession.queryOtrCursor(ChatSession.java:208)
11-11 16:15:28.902: E/Smack/Packet(4433): at com.google.android.gsf.gtalkservice.ChatSession.<init>(ChatSession.java:168)
11-11 16:15:28.902: E/Smack/Packet(4433): at com.google.android.gsf.gtalkservice.ChatMgr.createChatSession(ChatMgr.java:264)
11-11 16:15:28.902: E/Smack/Packet(4433): at com.google.android.gsf.gtalkservice.ChatMgr.processIncomingMessage(ChatMgr.java:721)
11-11 16:15:28.902: E/Smack/Packet(4433): at com.google.android.gsf.gtalkservice.ChatMgr.processPacket(ChatMgr.java:521)
11-11 16:15:28.902: E/Smack/Packet(4433): at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader.java:1860)
11-11 16:15:28.902: E/Smack/Packet(4433): at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:451)
11-11 16:15:28.902: E/Smack/Packet(4433): at org.jivesoftware.smack.PacketReader.access$200(PacketReader.java:91)
11-11 16:15:28.902: E/Smack/Packet(4433): at org.jivesoftware.smack.PacketReader$3.run(PacketReader.java:154)
11-11 16:15:28.902: D/Smack(4433): [XMPPConn] close connection, notifyClosed=false
答案 0 :(得分:5)
我做了更多Google搜索,并且能够从2010年开始追踪解决方法described in this Google Group post。该问题似乎与Google Talk应用程序有关,建议的解决方法如下:
“我进入了Talk并关闭了自动登录,然后我退出了。我 再次测试,我能够在我的内部收到消息 应用“。
一旦我这样做,我就可以在没有堆栈跟踪的设备上收到推送通知。如果有人可以添加有关为什么会发生这种情况的任何信息,我会感兴趣。