-
Notifications
You must be signed in to change notification settings - Fork 543
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
Main activity should be obtained automatically from Manifest file #4
Comments
That would be cool! There are some drawbacks however:
What should we do in those cases? If you are willing to provide a proposal via pull request I can take a look at it. Thanks! |
Maybe it can add a custom action in order to be launched from library: <activity
android:name=".view.activity.ErrorActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="cat.ereza.customactivityoncrash.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> |
Library should check for this action first, if there is no Activity with that, search for default android launcher activities, and if not launch the default library error Activity |
@alorma I think that's more complicated than the currently needed configuration... Anyway, we are talking about the activity that gets launched when pressing the "restart" button, so launching the error activity is independent from that. IMHO, it should be like this:
Also, add an option to always close the app instead of restarting. |
Oh, sorry i missunderstood the Issue :D i will move it to a new Issue. Anyway, it can be used in a similar way, with an extra action. <action android:name="cat.ereza.customactivityoncrash.RELAUNCH" /> |
Closed with the pull request #6 by @AizazAZ. Thanks! |
CustomActivityOnCrash.setRestartActivityClass(MainActivity.class);
why not by default get Main Activity from Manifest file?
The text was updated successfully, but these errors were encountered: