Logging on Android

On Android, you have the ability to enable logging and email the output to yourself or support@layer.com for further analysis.

  1. Call LayerClient.setLoggingEnabled() with enabled set to true before creating a new instance of the LayerClient object
  2. Somewhere in your app, add a control (button, menu item, custom gesture recognizer, etc) that will call LayerClient.sendLogs() when invoked
  3. Deploy your app and authenticate a user
  4. When you encounter a problem, trigger the widget
  5. This will open the email client on the device with several attachmeents, including the logs, a screenshot, and a copy of the local Layer database
  6. Please fill in the body details in that email with the following information:
    • An existing ticket number if you’ve opened a ticket with us before
    • A description of the issue you’re trying to address
    • Detailed steps to reproduce
    • Any other relevant information
  7. Send the email to support@layer.com
  8. You will receive an email reply confirming that we’ve received your ticket. This will contain a Ticket ID. Please use that ID as reference in any further communication regarding this issue.

If you are encountering problems in a Release build, or if there is another reason you cannot modify the source code to enable logging, you can turn on verbose logging from the console: adb shell setprop log.tag.LayerSDK VERBOSE.

Changelog Checklist