Capture
- Avoid using logcat in Android Studio to copy logs—it may miss some.
- Use the adb command to output logs to a local file for detailed analysis without losing data.
Capture steps
- Uninstall and reinstall the app.
- In the command window, enter
adb logcat -v time > xxxx.log
(run this before starting the app to ensure complete logs). - Launch the app and perform relevant actions until the issue occurs.
- For push notification logs, wait 2-3 minutes after initialization before ending the capture.
- Press
Ctrl + C
to stop log capture.
Note: Don’t filter log fields—keep them complete.
Note: Some Huawei devices require enabling a log switch for full output.
Analyze
Filter logs with the keyword RC:
to get RC-related data (use TextWrangler on Mac for filtering).
For push notification logs, filter with RongLog-Push
.
Analyze logs to track potential exceptions in RC SDK initialization, connection, message sending and receiving, and push handling.