Skip to content

Commit

Permalink
ref: Use Application instance (this) as context (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-garcia authored Aug 9, 2019
1 parent 77fb029 commit e8787d2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/collections/_documentation/clients/java/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();

Context ctx = this.getApplicationContext();
Sentry.init("___PUBLIC_DSN___", new AndroidSentryClientFactory(ctx));
Sentry.init("___PUBLIC_DSN___", new AndroidSentryClientFactory(this));
}
}
```
Expand All @@ -70,9 +68,7 @@ public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();

Context ctx = this.getApplicationContext();
Sentry.init(new AndroidSentryClientFactory(ctx));
Sentry.init(new AndroidSentryClientFactory(this));
}
}
```
Expand Down

0 comments on commit e8787d2

Please sign in to comment.