C2DM registration results never receive
I have used "Android Cloud to Device Messaging (C2DM) - Tutorial" by Lars Vogel. When i start my applcation, registration response never received. How It can be solved? my Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application android:icon="@drawable/appicon" android:label="@string/app_name" android:debuggable="true">
<activity android:name=".activities.MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.DailyTripList" android:screenOrientation="portrait" />
<activity android:name=".ui.TripActivity" android:screenOrientation="portrait" />
<activity android:name=".ui.StationsList" android:screenOrientation="portrait" />
<activity android:name=".ui.StationActivity" android:screenOrientation="portrait" />
<activity android:name=".ui.PassengerList" android:screenOrientation="portrait" />
<activity android:name=".ui.DriverMsgList" android:screenOrientation="portrait" />
<service android:name=".services.SecurityReqestTransmitter" android:exported="false"/>
<service android:name=".services.LocationTransmitter" android:exported="false"/>
<activity android:name=".cardReader.IDTUniMagActivity" android:screenOrientation="portrait" />
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.em_projects.MyWay.receivers" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.em_projects.MyWay.receivers" />
</intent-filter>
</receiver>
</application>
CatLog
08-15 23:57:41.624: WARN/KeyCharacterMap(959): No keyboard for id 0
08-15 23:57:41.634: WARN/KeyCharacterMap(959): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
08-15 23:57:44.645: DEBUG/dalvikvm(150): GC_EXTERNAL_ALLOC freed 698 objects / 37712 bytes in 273ms
08-15 23:58:01.374: DEBUG/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
08-15 23:58:17.365: INFO/EventLogService(236): Aggregate from 1313450896472 (log), 1313450896472 (data)
08-15 23:58:22.704: DEBUG/dalvikvm(236): GC_EXPLICIT freed 473 objects / 120056 bytes in 276ms
08-15 23:58:29.744: DEBUG/dalvikvm(150): GC_EXTERNAL_ALLOC freed 611 objects / 29936 bytes in 198ms
08-15 23:58:32.754: DEBUG/MainActivity(959): onClick
08-15 23:58:33.944: INFO/global(959): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
08-15 23:58:33.974: DEBUG/Communicator(959): @ parseData <?xml version="1.0" encoding="UTF-8"?><root><row internal_code="644" external_code="1442" ws_string="http://wap.y-it.co.il:8080/wapdb/ws_redirect/http://localhost:8080/fltctrl_11" report_location_period="60" reject_mission="1"/></root>
08-15 23:58:34.124: DEBUG/MainActivity(959): Rows counter = 1
08-15 23:58:34.155: DEBUG/MainActivity(959): handleMessage
08-15 23:58:34.184: INFO/ActivityManager(70): Starting activity: Intent { flg=0x4000000 cmp=com.em_projects.MyWay/.ui.DailyTripList }
08-15 23:58:34.494: DEBUG/DailyTripList(959): onCreate
08-15 23:58:35.444: DEBUG/dalvikvm(959): GC_FOR_MALLOC freed 7436 objects / 493624 bytes in 90ms
08-15 23:58:43.254: ERROR/C2DMRegistrar(236): [C2DMReg] handleRequest caught java.io.IOException: SSL shutdown failed: I/O error during system call, Broken pipe
08-15 23:58:43.534: DEBUG/SecurityReqestTransmitter(959): onCreate
08-15 23:58:43.584: DEBUG/SecurityReqestTransmitter(959): initServiceThread
08-15 23:58:43.624: DEBUG/SecurityReqestTransmitter(959): run
08-15 23:58:43.634: DEBUG/SecurityReqestTransmitter(959): onStartCommand
08-15 23:58:43.875: DEBUG/LocationTransmitter(959): onCreate
08-15 23:58:43.944: DEBUG/LocationTransmitter(959): spd = 0.0
08-15 23:58:44.024: WARN/GpsLocationProvider(70): Duplicate add listener for uid 10040
08-15 23:58:44.224: WARN/ActivityManager(70): Launch timeout has expired, giving up wake lock!
08-15 23:58:44.414: INFO/global(959): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
08-15 23:58:44.454: WARN/ActivityManager(70): Activity idle timeout for HistoryRecord{44ec58c0 com.em_projects.MyWay/.ui.DailyTripList}
08-15 23:58:44.534: DEBUG/Communicator(959): @ parseData <?xml version="1.0" encoding="UTF-8"?><root><row line_code="90476" acc_name="אי סי אי" order_start_time="08:00" order_end_time="08:30" line_description="איסוף עובדים איזור הדרום" line_status="-1" t_Pass_QTY="4" Pass_QTY="4" group_name="שם הקבוצה" department_name="שם המחלקה" line_date="2011-08-15" long_remarks="הערות ארוכות...
שורה שניה
שורה שלישית
שורה רביעית
שורה אחרונה !" short_remarks="הערות קצרות של הנסיעה"/><row line_code="90377" acc_name="מפעל תע"ש רכש" order_start_time="12:00" order_end_time="12:45" line_description="מרוחובות+נס ציונה לתע"ש" line_status="-1" t_Pass_QTY="0" Pass_QTY="0" lin开发者_C百科e_date="2011-08-15" long_remarks="" short_remarks=""/><row line_code="90406" acc_name="משתלת ציפורן" order_start_time="15:00" order_end_time="15:40" line_description="הסעות עובדים אמצע שבוע" line_status="5" t_Pass_QTY="0" Pass_QTY="0" department_name="מחלקה 1" line_date="2011-08-15" long_remarks="על הנהג להתקשר לשלמה 050-3344334 בעל המשתלה
כל יום לאחר סיום ההסעה." short_remarks="הערה ליום ב'"/><row line_code="90439" acc_name="טבע כפר סבא" order_start_time="18:00" order_end_time="18:00" line_description="נתב"ג כ"ס" line_status="-1" t_Pass_QTY="0" Pass_QTY="0" line_date="2011-08-15" long_remarks="" short_remarks=""/></root>
08-15 23:58:47.554: INFO/ActivityManager(70): Displayed activity com.em_projects.MyWay/.ui.DailyTripList: 13122 ms (total 13122 ms)
Is your app package name com.em_projects.MyWay.receivers
?
If no, try to use only your package name instead of com.em_projects.MyWay.receivers
in categories
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="***your_app_package_name***" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="***your_app_package_name***" />
</intent-filter>
</receiver>
精彩评论