Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jkasten2/fb83b1df754cf26df378 to your computer and use it in GitHub Desktop.
Save jkasten2/fb83b1df754cf26df378 to your computer and use it in GitHub Desktop.
Logcat from device of an app closing normally vs "Force Closed" and how it affects notifications.
// Logcat from device of an app closing normally vs "Force Closed" and how it affects notifications.
// com.onesignal.example app running with the OneSignal 2.1.2 SDK on a Android 6.0.1 device
/** 1.1 Swiping away example app from the Recent Apps list **/
02-27 13:39:29.854 15326-15326/com.onesignal.example D/OneSignal: onActivityDestroyed: com.onesignal.example.MainActivity
02-27 13:39:29.855 15326-15326/com.onesignal.example D/OneSignal: curActivity is NOW: null
02-27 13:39:29.863 15326-15326/com.onesignal.example I/OneSignal: GetUnsentActiveTime: 25
02-27 13:39:29.863 15326-15326/com.onesignal.example I/OneSignal: SaveUnsentActiveTime: 27
02-27 13:39:29.873 937-3666/? I/ActivityManager: Killing 15326:com.onesignal.example/u0a261 (adj 16): remove task
02-27 13:39:29.964 937-3673/? D/GraphicsStats: Buffer count: 13
02-27 13:39:29.975 937-2331/? W/ActivityManager: Scheduling restart of crashed service com.onesignal.example/com.onesignal.SyncService in 1000ms
02-27 13:39:30.992 937-952/? I/ActivityManager: Start proc 16785:com.onesignal.example/u0a261 for service com.onesignal.example/com.onesignal.SyncService
02-27 13:39:30.999 16785-16785/? I/art: Late-enabling -Xcheck:jni
02-27 13:39:31.068 16785-16785/com.onesignal.example W/System: ClassLoader referenced unknown path: /data/app/com.onesignal.example-1/lib/arm
02-27 13:39:31.100 16785-16785/com.onesignal.example I/GMPM: App measurement is starting up, version: 8487
02-27 13:39:31.101 16785-16785/com.onesignal.example I/GMPM: To enable debug logging run: adb shell setprop log.tag.GMPM VERBOSE
02-27 13:39:31.107 16785-16785/com.onesignal.example E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
02-27 13:39:31.107 16785-16785/com.onesignal.example E/GMPM: Scheduler not set. Not logging error/warn.
02-27 13:39:31.124 16785-16809/com.onesignal.example E/GMPM: Uploading is not possible. App measurement disabled
/** 1.2 Notification received, and then is displayed by OneSignal here. **/
02-27 13:39:49.897 2630-31453/? I/GCM: GCM message com.onesignal.example 0:1456609189832558%616610ddf9fd7ecd
/** 2.1 "Force closed" example app from Settings > Apps **/
02-27 13:43:38.352 937-1820/? I/ActivityManager: Force stopping com.onesignal.example appid=10261 user=0: from pid 20071
02-27 13:43:38.352 937-1820/? I/ActivityManager: Killing 19647:com.onesignal.example/u0a261 (adj 7): stop com.onesignal.example
02-27 13:43:38.393 937-1513/? I/WindowState: WIN DEATH: Window{b1bbc68 u0 com.onesignal.example/com.onesignal.example.BlankActivity}
02-27 13:43:38.393 937-2331/? D/GraphicsStats: Buffer count: 12
02-27 13:43:38.396 937-2331/? I/WindowState: WIN DEATH: Window{5abbbbd u0 com.onesignal.example/com.onesignal.example.MainActivity}
02-27 13:43:38.405 937-1820/? W/ActivityManager: Scheduling restart of crashed service com.onesignal.example/com.onesignal.SyncService in 1000ms
02-27 13:43:38.406 937-1820/? I/ActivityManager: Force finishing activity ActivityRecord{fd34eb4 u0 com.onesignal.example/.BlankActivity t3336}
02-27 13:43:38.408 937-1820/? I/ActivityManager: Force finishing activity ActivityRecord{568fa76 u0 com.onesignal.example/.MainActivity t3336}
02-27 13:43:38.410 937-1820/? I/ActivityManager: Force stopping service ServiceRecord{785adaa u0 com.onesignal.example/com.onesignal.SyncService}
02-27 13:43:38.412 937-3666/? W/ActivityManager: Spurious death for ProcessRecord{a50ed9b 0:com.onesignal.example/u0a261}, curProc for 19647: null
02-27 13:43:38.441 20071-20071/? D/Settings: Have 0 number of activities in preferred list
/** 2.2 Sent notification, GCM Message payload was received by Google Play services on the device. **/
02-27 13:44:54.019 2630-31453/? I/GCM: GCM message com.onesignal.example 0:1456609494311032%616610ddf9fd7ecd
/** 2.3 Google Play services couldn't wake the app as "result=CANCELLED" is in the intent callback. **/
02-27 13:44:54.044 2630-2630/? W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.onesignal.example (has extras) }
Copy link

ghost commented May 4, 2016

~$ adb logcat | grep "GCM"
- waiting for device -
05-03 22:29:33.641 21696 21696 I GunsAppRegManager: GCM Project Id: 144105662513, View Id: tapandpay
05-04 05:31:43.935  1822  3092 D GCM     : GcmService start Intent { act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 cmp=com.google.android.gms/.gcm.GcmService (has extras) } com.google.android.checkin.CHECKIN_COMPLETE
05-04 05:49:03.815  1822  1822 W GCM     : Heartbeat timeout, GCM connection reset -479991
05-04 06:34:30.249  1822  1822 W GCM     : Heartbeat timeout, GCM connection reset -479980
05-04 07:01:30.253  1822  1822 W GCM     : Heartbeat timeout, GCM connection reset -479968
05-04 07:28:31.044  1822  1822 W GCM     : Heartbeat timeout, GCM connection reset -479994
05-04 07:28:31.061  1822 23507 E GCM     : Lower wifi heartbeat interval to: 110000 (good hb = 7, bad hb = 2)
05-04 10:00:59.097 24913 24913 I GunsAppRegManager: GCM Project Id: 144105662513, View Id: tapandpay
05-04 10:01:08.301  1822  3545 D GCM     : GcmService start Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmService (has extras) } com.google.android.c2dm.intent.REGISTER
05-04 10:01:32.565  1822 23569 E GCM     : Wifi connection closed with errorCode 20
05-04 10:02:06.241  1822 25304 I GCM     : GCM message org.cocos2dx.onesignal 0:1462327326088660%99ed6a75f9fd7ecd
05-04 10:02:06.255  1822  1822 W GCM-DMM : broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=org.cocos2dx.onesignal (has extras) }
05-04 10:02:06.257  1822  1822 W GCM-DMM : Unregister application org.cocos2dx.onesignal for user 0

@jkasten2
Copy link
Author

jkasten2 commented May 4, 2016

GCM-DMM : Unregister application can mean any of the following 4 things.

  • The app is no longer installed on the device
  • You're missing the following receiver in your AndroidManifest.xml
    • com.google.android.c2dm.intent.RECEIVE
  • The category on your GCM receiver doesn't match your package name.
    • <category android:name="com.onesignal.example" />
  • The tags noted in the documentation below must be in your <application> tag. Make sure they are not under an <activity> tag.

Full tag details in step 2.2 of the Eclipse documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment