In my app, I simply initialise Clarity on Activity create. I didn't do any other extra handling. Not sure what is the issue.
A NullPointerException can be thrown when calculating the total size of existing shards created from remote snapshots. This appears to happen while shards are being allocated. Add any other context ...