I'm adding Sentry to my android wearable application to log crashes. However Sentry is not sending/showing any events in the dashboard.
I'm testing on an android emulator which has internet acces. I'm using the following setup:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Sentry.init("http://public:private@sentry.io/app_id?async=false", new AndroidSentryClientFactory(this.getApplicationContext()));
try{
int i = 4 / 0;
} catch (Throwable ex) {
Sentry.capture(ex);
}
}
AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
The only logs I am getting are:
03-04 18:58:54.214 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory: Construction of Android Sentry.
03-04 18:58:54.226 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory: Sentry init with ctx='nl.jamieknoef.homewizard.homewizard_java.HomeWizardApp@82709d8' and dsn='Dsn{uri= http://sentry.io/ }'
03-04 18:58:54.287 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory: Using buffer dir: /data/user/0/nl.jamieknoef.homewizard.homewizard_java/cache/sentry-buffered-events
03-04 18:58:54.376 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.event.helper.AndroidEventBuilderHelper: Proguard UUIDs file not found.
Any idea's what causing Sentry to not send events?
I noticed Sentry doesn't immediatly send logs, it periodically sends your exceptions to their servers. So if you crash your application on your first activity in the onCreate method like I did, it probably won't get the time to ever send your exceptions.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.