Funny Crash
A simple Crash detector for Android apps that allows you to receive crashes from different devices or permit user to send a bug or feedback with screenshot when he shake his device.
- API 21+
Download
Add the JitPack repository to the build.gradle file:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the Gradle dependency:
implementation 'com.github.minageorge5080:Funny-Crash:1.1.2'
Usage
Setup in your application class
FunnyCrash.initialize(this)
FunnyCrash.showExcuseDialog = false // default is true.
Setup the listener to receive crashes or reports in your mainActivity or mainViewModel
FunnyCrash.reportListener = object : FunnyCrashReportListener {
override fun onReceiveReport(reportModel: ReportModel) {
Toast.makeText(this@MainActivity, reportModel.info, Toast.LENGTH_SHORT).show()
if (reportModel.reportType == FunnyCrashConstants.REPORT)
screenShot_imageView.setImageBitmap(BitmapFactory.decodeFile(reportModel.file?.absolutePath))
}
}
Contributing.
All pull requests are welcome, make sure to follow the contribution guidelines when you submit pull request.
- Fork it!
- Checkout the development branch:
git checkout development
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes to the index:
git add .
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request against the
development
branch
License
Copyright (C) 2020 Mina George
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.