Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Copying error messages #7

Open
wants to merge 1 commit into
base: osp-master
Choose a base branch
from

Conversation

HugeFrog24
Copy link

Added a 'Copy' button to the error dialog, allowing users to copy the stack trace into their clipboard for easier sharing.

Testing:
To test the functionality, you can force an exception early in the onCreate() method using the following code block:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Force an exception to test the error dialog functionality
    try {
        throw new RuntimeException("Test Exception: This is a forced error to test the dialog.");
    } catch (Exception e) {
        alertDialog(e);
        return; // Exit onCreate after triggering the error to prevent further execution
    }
    /*
    deviceInfo = getDeviceInfo();
    sharedPreferences = getSharedPreferences("package_configs", Context.MODE_PRIVATE);
    SKY_PACKAGE_NAME = sharedPreferences.getString("sky_package_name", "com.tgc.sky.android");
    sharedPreferences.edit().putString("sky_package_name", SKY_PACKAGE_NAME).apply();
    skyPackages = new HashMap<>();
    skyPackages.put("com.tgc.sky.android", 0);
    skyPackages.put("com.tgc.sky.android.test.gold", 1);
    skyPackages.put("com.tgc.sky.android.huawei", 2);
    loadGame();
    */
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant