mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
[Android] Enable Sentry
This commit is contained in:
@@ -89,6 +89,11 @@
|
|||||||
<artifactId>gdx-backend-android</artifactId>
|
<artifactId>gdx-backend-android</artifactId>
|
||||||
<version>1.10.0</version>
|
<version>1.10.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.sentry</groupId>
|
||||||
|
<artifactId>sentry-android</artifactId>
|
||||||
|
<version>1.7.30</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ import forge.localinstance.properties.ForgePreferences;
|
|||||||
import forge.model.FModel;
|
import forge.model.FModel;
|
||||||
import forge.util.FileUtil;
|
import forge.util.FileUtil;
|
||||||
import forge.util.ThreadUtil;
|
import forge.util.ThreadUtil;
|
||||||
|
import io.sentry.Sentry;
|
||||||
|
import io.sentry.android.AndroidSentryClientFactory;
|
||||||
|
|
||||||
public class Main extends AndroidApplication {
|
public class Main extends AndroidApplication {
|
||||||
AndroidAdapter Gadapter;
|
AndroidAdapter Gadapter;
|
||||||
@@ -60,6 +62,10 @@ public class Main extends AndroidApplication {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
Context ctx = this.getApplicationContext();
|
||||||
|
String sentryDsn = "https://a0b8dbad9b8a49cfa51bf65d462e8dae:b3f27d7461224cb8836eb5c6050c666c@sentry.cardforge.org/2?buffer.enabled=false";
|
||||||
|
//init Sentry
|
||||||
|
Sentry.init(sentryDsn, new AndroidSentryClientFactory(ctx));
|
||||||
//get total device RAM in mb
|
//get total device RAM in mb
|
||||||
ActivityManager actManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
|
ActivityManager actManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
|
||||||
ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();
|
ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();
|
||||||
|
|||||||
Reference in New Issue
Block a user