Comments (6)
That would be cool!
There are some drawbacks however:
- An app may have more than one activity with intent filter with category LAUNCHER.
- An app may have NO launchable activity (for example, apps that are only widgets).
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!
from customactivityoncrash.
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>
from customactivityoncrash.
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
from customactivityoncrash.
@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:
- If a restart activity has been specified with
CustomActivityOnCrash.setRestartActivityClass()
, use that. - If not specified, get the launchable activities via
PackageManager
, if one or more exist, just grab the first one by default (although I don't personally like that). - If no activities are launchable, just close the app.
Also, add an option to always close the app instead of restarting.
from customactivityoncrash.
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" />
from customactivityoncrash.
Closed with the pull request #6 by @AizazAZ. Thanks!
from customactivityoncrash.
Related Issues (20)
- Unable to get provider cat.ereza.customactivityoncrash.provider.CaocInitProvider(solved) HOT 1
- Library hangs completely if the app defines a EventListener and some of its methods crash HOT 1
- OutOfMemoryError: pthread_create HOT 2
- Crash on Android 4.1.2 and 4.4
- incompatible with wrapper shell script HOT 2
- Not working with firebase Crashlytics HOT 3
- Plagiarism of your library HOT 1
- Is it possible to show a fragment instead of activity for crashes? HOT 1
- may provide a callback with the Throwable object
- Not works with FirebaseFirestore HOT 3
- errorActivity will not launch when I do something in eventListener->onLaunchErrorActivity HOT 2
- Deleted everthing on my phone HOT 2
- Is this testable? HOT 1
- Wrong build date info HOT 2
- NoWork at remi note 10x HOT 1
- call api before crash HOT 1
- crash from webrtc framework HOT 1
- Not fetching from the module crash response
- Another lib that goes well with CustomActivityOnCrash
- How to use with Sentry
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from customactivityoncrash.