All Projects → osama-raddad → Firecrasher

osama-raddad / Firecrasher

Licence: apache-2.0
FireCrasher is a Uncaught Exceptions recovery library for android

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Firecrasher

Smart Webcomponents
Web Components & Custom Elements for Professional Web Applications
Stars: ✭ 110 (-23.08%)
Mutual labels:  ux
Awesome Product Design
A collection of bookmarks, resources, articles for product designers.
Stars: ✭ 1,679 (+1074.13%)
Mutual labels:  ux
Overlap
Tiny iOS library to achieve overlap visual effect
Stars: ✭ 133 (-6.99%)
Mutual labels:  ux
Sketchmine
Tools to validate, generate and analyse sketch files from web pages
Stars: ✭ 114 (-20.28%)
Mutual labels:  ux
Frontend
🌌 Vue based front-end.
Stars: ✭ 121 (-15.38%)
Mutual labels:  ux
Liquid
Create a playful backsplash in SwiftUI.
Stars: ✭ 127 (-11.19%)
Mutual labels:  ux
Realtaiizor
C# WinForm UI/UX Component Library
Stars: ✭ 109 (-23.78%)
Mutual labels:  ux
You Dont Know Ui
Learn how to build universal, modern and scalable user interfaces
Stars: ✭ 140 (-2.1%)
Mutual labels:  ux
Ui Ux
📝 Curated list for UI/UX Designers
Stars: ✭ 125 (-12.59%)
Mutual labels:  ux
Motion
A library used to create beautiful animations and transitions for iOS.
Stars: ✭ 1,726 (+1106.99%)
Mutual labels:  ux
Easytransitions
A simple way to create custom interactive UIViewController transitions
Stars: ✭ 1,592 (+1013.29%)
Mutual labels:  ux
Sample Currency Converter
A sample currency conversion Progressive Web App
Stars: ✭ 119 (-16.78%)
Mutual labels:  ux
React Native Pulse
React Native Pulse Animation
Stars: ✭ 129 (-9.79%)
Mutual labels:  ux
Overrideit Sketchplugin
Overrideit is sketch plugin that allow designers to search in overridelist and overrides dropdowns, and with many other features.
Stars: ✭ 113 (-20.98%)
Mutual labels:  ux
Kaiju
A drag and drop web editor for React components.
Stars: ✭ 135 (-5.59%)
Mutual labels:  ux
Doormat
Let's take a scroll!
Stars: ✭ 111 (-22.38%)
Mutual labels:  ux
Syblinkanimationkit
SYBlinkAnimationKit is a blink effect animation framework for iOS, written in Swift.
Stars: ✭ 126 (-11.89%)
Mutual labels:  ux
Rn Placeholder
🏖️ Display some placeholder stuff before rendering your text or media content in React Native
Stars: ✭ 1,934 (+1252.45%)
Mutual labels:  ux
Nativelogin
Authorization form in native iOS style
Stars: ✭ 140 (-2.1%)
Mutual labels:  ux
Xamarin.forms.breadcrumb
This is a breadcrumb navigation control that is complete automatic and uses the Navigation stack and page titles to generate the breadcrumbs.
Stars: ✭ 130 (-9.09%)
Mutual labels:  ux

Buy Me a Coffee at ko-fi.com

Codacy Badge

Build Status

API Android Arsenal License

FireCrasher

FireCrasher is designed to handle the uncaught exceptions and utilize a RECOVERY process from the Exception Without exiting from the application.

The Problem

"The study, carried out online by uSamp, found that freezing (76%), crashing (71%) and slow responsiveness (59%) were the primary bugbears when it came to app problems, with heavy battery usage (55%) and too many ads (53%) also mentioned. Users stressed that performance mattered the most on banking apps (74%) and maps (63%), with the latter no doubt much to the chagrin of Apple, which has had some difficulty with its own maps software on iOS 6. For almost every respondent (96%) said that they would write a bad review on an under-par app, while 44% said that they would delete the app immediately. Another 38% said that they would delete the app if it froze for more than 30 seconds with 32% and 21% respectively indicating that they would moan about the app to their friends or colleagues in person or over Facebook and Twitter. A considerable 18% would delete an app immediately if it froze for just five seconds, but 27% said that they would persist with the app if they paid for it. Those experiencing bad apps urged developers to fix the problem (89%) first and foremost, followed by offering easy refunds (65%) and a customer service number (49%)."

The Solution

Every developer knows that shit happens, and at some point you will ship a random exception to the production code (application) thus you might risk losing a 44% of the affected users, this where Firecrasher comes in, it utilizes a recovery sequence to limit and chicaneries the crash consequences on three different levels; the first level is the random behavioral crash (occasional crash) that would be solved with just restarting the crashed activity if the restarted activity kept crashing for three consecutive times, the second level of the sequence will start executing at this stage the crashed is considered dead and the library checks if there are other activities in the backstack it invokes the onBackPressed() if there are no activities in the backstack then level three takes effect in restarting the whole application from the default activity. Moreover, it works without losing any crash reports.

Requirements

Min SDK version 14

Install

Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        implementation 'com.github.osama-raddad:FireCrasher:2.0.0'
	}

Usage

to use the library add this code to Application class :

class App : Application() {
    override fun onCreate() {
        super.onCreate()
	FireCrasher.install(this);
    }
}

or you can use your logic, For example :

class App : Application() {
    override fun onCreate() {
        super.onCreate()
        FireCrasher.install(this, object : CrashListener() {

            override fun onCrash(throwable: Throwable) {
                Toast.makeText(this@App, throwable.message, Toast.LENGTH_SHORT).show()
                // start the recovering process
                recover()
                //you need to add your crash reporting tool here
                //Ex: Crashlytics.logException(throwable);
            }
        })
    }
}

to detarmein the crash level before srating the recovery you can use:

       FireCrasher.install(this, object : CrashListener() {

            override fun onCrash(throwable: Throwable) {

                evaluate { activity, crashLevel ->
                     recover {
                                Toast.makeText(this@App, "recover", Toast.LENGTH_LONG).show()
                            }
                	}
                
                //you need to add your crash reporting tool here
                //Ex: Crashlytics.logException(throwable);
            }
        })

Contributing

We welcome contributions to FireCrasher!

  • ⇄ Pull requests and ★ Stars are always welcome.

Let me know!

I’d be really happy if you sent me links to your projects where you use my library. Just send an email to [email protected] And do let me know if you have any questions or suggestion regarding the library.

License

Copyright 2019, Osama Raddad

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].