kandi background
Explore Kits

CustomActivityOnCrash | Android library that allows launching a custom activity | Android library

 by   Ereza Java Version: 2.3.0 License: Apache-2.0

 by   Ereza Java Version: 2.3.0 License: Apache-2.0

Download this library from

kandi X-RAY | CustomActivityOnCrash Summary

CustomActivityOnCrash is a Java library typically used in Mobile, Android applications. CustomActivityOnCrash has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. However CustomActivityOnCrash has 3 bugs. You can download it from GitHub, Maven.
Android library that allows launching a custom activity when your app crashes, instead of showing the hated "Unfortunately, X has stopped" dialog.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • CustomActivityOnCrash has a medium active ecosystem.
  • It has 3378 star(s) with 512 fork(s). There are 98 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 7 open issues and 61 have been closed. On average issues are closed in 471 days. There are 3 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of CustomActivityOnCrash is 2.3.0
This Library - Support
Best in #Android
Average in #Android
This Library - Support
Best in #Android
Average in #Android

quality kandi Quality

  • CustomActivityOnCrash has 3 bugs (2 blocker, 0 critical, 1 major, 0 minor) and 14 code smells.
This Library - Quality
Best in #Android
Average in #Android
This Library - Quality
Best in #Android
Average in #Android

securitySecurity

  • CustomActivityOnCrash has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • CustomActivityOnCrash code analysis shows 0 unresolved vulnerabilities.
  • There are 1 security hotspots that need review.
This Library - Security
Best in #Android
Average in #Android
This Library - Security
Best in #Android
Average in #Android

license License

  • CustomActivityOnCrash is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
This Library - License
Best in #Android
Average in #Android
This Library - License
Best in #Android
Average in #Android

buildReuse

  • CustomActivityOnCrash releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • CustomActivityOnCrash saves you 462 person hours of effort in developing the same functionality from scratch.
  • It has 1091 lines of code, 77 functions and 18 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
This Library - Reuse
Best in #Android
Average in #Android
This Library - Reuse
Best in #Android
Average in #Android
Top functions reviewed by kandi - BETA

kandi has reviewed CustomActivityOnCrash and discovered the below as its top functions. This is intended to give you an instant insight into CustomActivityOnCrash implemented functionality, and help decide if they suit your requirements.

  • Get all error details from Intent .
  • Checks if the stack trace of the given exception is a conflict - sensitive error .
  • Returns the build date as a string .
  • Copy the error details to clipboard .
  • Get error drawable
  • Inserts a new Uri at the given Uri .
  • Returns the type of the requested URI .
  • Queries a Uri and returns a Result object .
  • Gets the error activity class .
  • Gets the restart activity class .

CustomActivityOnCrash Key Features

Android library that allows launching a custom activity when your app crashes, instead of showing the hated "Unfortunately, X has stopped" dialog.

One-step install

copy iconCopydownload iconDownload
dependencies {
    compile 'cat.ereza:customactivityoncrash:2.3.0'
}

Try it

copy iconCopydownload iconDownload
throw new RuntimeException("Boom!");

Advanced setup

copy iconCopydownload iconDownload
@Override
public void onCreate() {
    super.onCreate();

    CaocConfig.Builder.create()
        .backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) //default: CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM
        .enabled(false) //default: true
        .showErrorDetails(false) //default: true
        .showRestartButton(false) //default: true
        .logErrorOnRestart(false) //default: true
        .trackActivities(true) //default: false
        .minTimeBetweenCrashesMs(2000) //default: 3000
        .errorDrawable(R.drawable.ic_custom_drawable) //default: bug image
        .restartActivity(YourCustomActivity.class) //default: null (your app's launch activity)
        .errorActivity(YourCustomErrorActivity.class) //default: null (default error activity)
        .eventListener(new YourCustomEventListener()) //default: null
        .apply();
}

Custom behavior

copy iconCopydownload iconDownload
launchWhenInBackground(int);

Customization of the default activity

copy iconCopydownload iconDownload
<activity
    android:name="cat.ereza.customactivityoncrash.activity.DefaultErrorActivity"
    android:theme="@style/YourThemeHere"
    android:process=":error_activity" />

Completely custom error activity

copy iconCopydownload iconDownload
CustomActivityOnCrash.getStackTraceFromIntent(getIntent());

How to access YouTubePlayerView inside Butterknife onlick function

copy iconCopydownload iconDownload
@BindView(R.id.youtube_player_view) YouTubePlayerView player_view;
YouTubePlayerView youTubePlayerView =  player_view;

Could not find multidex.jar (com.android.support:multidex:1.0.2)

copy iconCopydownload iconDownload
apply from: 'buildsystem/dependencies.gradle'

buildscript {
   repositories {
      jcenter()
      mavenCentral()
      maven { url 'https://maven.fabric.io/public' }
      google()
      //maven {
      //    url 'https://maven.google.com'
      //}
    }
    dependencies {
       //Update it to the latest version: 3.1.3
       classpath 'com.android.tools.build:gradle:3.1.3' 
       classpath 'com.frogermcs.androiddevmetrics:androiddevmetrics-plugin:0.5'
       classpath 'com.google.gms:google-services:3.1.2'
       classpath 'io.fabric.tools:gradle:1.25.1'
    }
}

allprojects {
   ext {
     androidApplicationId = 'com.medikoe.connect'
     androidVersionCode = 23
     androidVersionName = "1.7.2"
     testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
     testApplicationId = 'com.medikoe.test'
   }

   repositories {
     google()
     jcenter()
   }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
// Remove these lines
// repositories {
//    google()
// }
-----------------------
repositories {
    maven {
            url 'https://maven.google.com'
        }
    jcenter()
    // Add your other repositories here
}
repositories {
    google()
    jcenter()
    // Add your other repositories here
}
-----------------------
repositories {
    maven {
            url 'https://maven.google.com'
        }
    jcenter()
    // Add your other repositories here
}
repositories {
    google()
    jcenter()
    // Add your other repositories here
}
-----------------------
 maven { url 'https://maven.google.com' }
jcenter()
-----------------------
 maven { url 'https://maven.google.com' }
jcenter()

Error when compiling after updating project to Android X

copy iconCopydownload iconDownload
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'

Error: 'Please fix the version conflict either by updating the version....'

copy iconCopydownload iconDownload
 implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.4'
 classpath 'com.google.gms:google-services:4.2.0'
-----------------------
 implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.4'
 classpath 'com.google.gms:google-services:4.2.0'
-----------------------
 implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.4'
 classpath 'com.google.gms:google-services:4.2.0'
-----------------------
 implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.4'
 classpath 'com.google.gms:google-services:4.2.0'

Android: force gradle to include only one version of a library

copy iconCopydownload iconDownload
configurations.all { 
    resolutionStrategy.force 'com.android.support:support-v4:24.0.0'
}

Using a custom crash handler with Firebase installed

copy iconCopydownload iconDownload
If you want to disable the Firebase Analytics Crash Reporting, use the below 
code inside app.gradle file.

configurations {
    all*.exclude group: 'com.google.firebase', module: 'firebase-crash'
}
-----------------------
dependencies {
    compile 'cat.ereza:customactivityoncrash:2.0.0'
}

Community Discussions

Trending Discussions on CustomActivityOnCrash
  • How to access YouTubePlayerView inside Butterknife onlick function
  • Could not find multidex.jar (com.android.support:multidex:1.0.2)
  • Error when compiling after updating project to Android X
  • Error: 'Please fix the version conflict either by updating the version....'
  • Using ACRA with tracepot as backend
  • Refactor from Support Libraries to AndroidX with dependencies
  • Use Ereza/CustomActivityOnCrash with Fabric crashlytics
  • instrumentation tests stops working after rebuild: No tests found
  • Android: force gradle to include only one version of a library
  • Using a custom crash handler with Firebase installed
Trending Discussions on CustomActivityOnCrash

QUESTION

How to access YouTubePlayerView inside Butterknife onlick function

Asked 2021-Mar-04 at 06:01

Using this method is throwing a null object reference. Butterknife wont allow any refrence to view inside the void go(){ function. Is there a way to access this view YouTubePlayerView youTubePlayerView = player_view; inside the function?

.java

 @BindView(R.id.youtube_player_view) YouTubePlayerView player_view;

   YouTubePlayerView youTubePlayerView =  player_view;
    //start view trailer
    @OnClick(R.id.iv_play_circle)
    void go(){

       String vid = video.getVideoKey(); 

       if(vid != null){

           youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() {
               @Override
               public void onReady(@NonNull YouTubePlayer youTubePlayer) {
                   youTubePlayer.loadVideo(vid, 0);
               }
           });

        }
    }//end view trailer


    @Override
    public void onDestroyView () {

        if(youTubePlayerView != null) {
            youTubePlayerView.release();
        }
        super.onDestroyView ();
  
    }

error log

E/CustomActivityOnCrash: The previous app process crashed. This is the stack trace of the crash:
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView.addYouTubePlayerListener(com.pierfrancescosoffritti.androidyoutubeplayer.core.player.listeners.YouTubePlayerListener)' on a null object reference
       

ANSWER

Answered 2021-Mar-03 at 22:53
@BindView(R.id.youtube_player_view) YouTubePlayerView player_view;
YouTubePlayerView youTubePlayerView =  player_view;

Here you're expcting the value of youTubePlayerView to be the same as the 'filled' value of the player_view view variable, but in reality, this assigment is done at the time before the player_view has been bound to the view.

That is because the @BindView takes effect after ButterKnife.bind(this) is called on your onCreate(), but your assignment is done on the class initialization.

Either just use player_view directly, or do the youTubePlayerView = player_view; after you have called ButterKnife.bind(this).

Source https://stackoverflow.com/questions/66466044

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install CustomActivityOnCrash

Add the following dependency to your build.gradle:.
You can customize the behavior of this library in several ways by setting its configuration at any moment. However, it's recommended to do it on your Application class so it becomes available as soon as possible.

Support

Any contribution in order to make this library better will be welcome!. The library is licensed under the Apache License 2.0.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.