Git Product home page Git Product logo

customactivityoncrash's People

Contributors

aizazzaidee avatar akallabeth avatar alorma avatar bourmhe avatar ereza avatar rocboronat avatar sloy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

customactivityoncrash's Issues

Request: Capture ANR state of thread

Currently, libraries like ACRA, Crashlytics, Hockey, etc do not capture ANR(Application not responding). It will be very helpful if we can intercept ANR and listen it

Crashlytics are not working properly

Crashlytics are not working properly
this is my code

@OverRide
public void onCreate() {

    super.onCreate();

    //This makes the library not launch the error activity when the app crashes while it is in background.
    CustomActivityOnCrash.setLaunchActivityEvenIfInBackground(false);
    //This enables CustomActivityOnCrash
    CustomActivityOnCrash.setShowErrorDetails(true);
    CustomActivityOnCrash.setErrorActivityClass(CustomErrorActivity.class);
    CustomActivityOnCrash.install(this);


    Fabric.with(this, new Crashlytics());
    sInstance = this;
}

restartApplicationWithIntent() more than Home key

me App crash,according to sample,do restartApplicationWithIntent() method.
Then, press Home key,perhaps repeat this operation.
App Stack no clean .
if in LAUNCHER Activity onCreate() add following code,would not produce.
But I don't know why.

 if (!isTaskRoot()) {
            finish();
            return;
  }

Incompatible Issues

Hi,

I am getting this error after adding your library to my project. Kindly help to resolve this issue.

Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.

app restart problem

Hi,author.Thank you for the library.I ran into a small problem,after use your libs,my app was restart two times,the default error page was displayed for the first time,the second burst also restarted the new default error page ,but the system error box pops up between the first and the second .and log print like this:
App already crashed recently, not starting custom error activity because we could enter a restart loop. Are you sure that your app does not crash directly on init?
Thanks again.

Stacktrace doesn't show up on Android Studio

Hi!

Android Studio only shows the logcat of the current process by default.
Since the library restarts the process to show the error Activity, and the stacktrace of the crash is logged in the old process, Android Studio doesn't show the stacktrace after a crash. You need to change the filters, or remove them, showing a lot of unwanted verbose information.

So, here's my idea for that problem:
The library could log the info in getStackTraceFromIntent() or getAllErrorDetailsFromIntent() from the error Activity. This way the developer will see it in Android Studio without changing the filter. The info will be duplicated in the full logcat, but I think its an acceptable trade-off.

That's what I've done in our custom error Activity at InfoJobs, but I think it could be a helpful addition to the library itself.

What do you think?
Thanks again for the library @Ereza, you know we're happy users of it :)

the last version not found in repo

Hello,

The last version not found in repo ?

compile 'cat.ereza:customactivityoncrash:2.2.0' give me :

Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve cat.ereza:customactivityoncrash:2.2.0.

Thanks

Bugsnag conflict

Hi.
I noticed that library is blocking the crash analysis Bugsnag. I initialize the Bugsnag after the install of CustomActivityOnCrash. But still not notifies the bugs.

The application class:

 @Override public void onCreate() {
    super.onCreate();
    initializeDependencyInjector().inject(this);
    CustomActivityOnCrash.setEnableAppRestart(true);
    CustomActivityOnCrash.setShowErrorDetails(true);
    CustomActivityOnCrash.setErrorActivityClass(CustomErrorActivity.class);
    CustomActivityOnCrash.install(this);
    ActiveAndroid.initialize(this);
    Fresco.initialize(getApplicationContext());
    FacebookSdk.sdkInitialize(this);
    Bugsnag.init(this);
  }

I removed the install and Bugsnag comes working.

Hi i want to ask a question about StackTrace.

The CustomActivityOnCrash.getStackTraceFromIntent(...) doesn't not return the full message. For example ...... android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2528) ... 10 more , How to get the 10 more error line ?

CustomActivityOnCrash.java line 370 cat.ereza.customactivityoncrash.CustomActivityOnCrash.restartApplicationWithIntent

Anyone seen this before - I'm picking it up from Crashlytics:
It appears to be crashing trying to restart the main activity in CustomActivityOnCrash.java line 370
cat.ereza.customactivityoncrash.CustomActivityOnCrash.restartApplicationWithIntent

  • Raw Text:
    Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.server.am.TaskRecord.setIntent(com.android.server.am.ActivityRecord)' on a null object reference
    at android.os.Parcel.readException(Parcel.java:1689)
    at android.os.Parcel.readException(Parcel.java:1636)
    at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:3159)
    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1584)
    at android.app.Activity.startActivityForResult(Activity.java:4228)
    at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:767)
    at android.app.Activity.startActivityForResult(Activity.java:4187)
    at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:754)
    at android.app.Activity.startActivity(Activity.java:4515)
    at android.app.Activity.startActivity(Activity.java:4483)
    at cat.ereza.customactivityoncrash.CustomActivityOnCrash.restartApplicationWithIntent(CustomActivityOnCrash.java:370)

Normally the app restarts fine... but occasionally I'm getting this.

E/CustomActivityOnCrash: App has crashed, executing CustomActivityOnCrash's UncaughtExceptionHandler

I am using custom error activity , below is my manifest file

<activity
           android:name="com.o1.shop.ui.activity.CustomErrorActivity"
           android:process=":error_activity"
           android:screenOrientation="portrait">
           <intent-filter>
               <action android:name="cat.ereza.customactivityoncrash.ERROR"/>
           </intent-filter>
       </activity>

and this my application file

CleverTapAPI.changeCredentials(DeviceUtils.getCleverTapAccountID(BuildConfig.FLAVOR), DeviceUtils.getCleverTapAccountToken(BuildConfig.FLAVOR));
        ActivityLifecycleCallback.register(this);
        super.onCreate();
        CaocConfig.Builder.create()
                .enabled(true)
                .minTimeBetweenCrashesMs(2000) //default: 3000
                .errorActivity(CustomErrorActivity.class) //default: null (default error activity)
                .apply();

i cannot see the custom crash activity

Default should have a close button too

Hi, I'm testing the library, if the app crash on exit button, it is stuck in inifinite loop because the default button is Restart App. It should have a Quit button

CustomActivityOnCrash(V 2.2.0) Not work when use ACRA!

hi @Ereza
i try to use your Lib in my project but when I use
Acra .init(this)
in application Class, CustomActivityOnCrash not work.

` @OverRide
public void onCreate() {
super.onCreate();
CaocConfig.Builder.create() .showErrorDetails(false) .apply();
context = getApplicationContext();
// The following line triggers the initialization of ACRA
ACRA.init(this);
ACRA.getErrorReporter().putCustomData("IMEI", getIMEI(this));

    if (!InitPublicClass.getInstance(this).initPublicClass()) {
        System.exit(0);
    }
}`

Possible concurrency issues because two processes have different application class instances

The library may cause concurrency issues because the error activity is launched in a new process, therefore creating a new instance of the Application class. This is not a problem because the previous process is completely killed by CustomActivityOnCrash.

However, the restart of the app is done without killing the error activity process, therefore two different instances of the Application class are running at the same time. If anyone uses not-multiprocess components (i.e, shared preferences), there may be unexpected results.

The error activity process should be killed just before launching the restart activity, if that's possible.

NPE in getConfigFromIntent

I received several crash reports in the Developer Console.

This is the relevant part of the stacktrace:

Caused by: java.lang.NullPointerException: 
  at cat.ereza.customactivityoncrash.config.CaocConfig.isLogErrorOnRestart (CaocConfig.java:90)
  at cat.ereza.customactivityoncrash.CustomActivityOnCrash.getConfigFromIntent (CustomActivityOnCrash.java:280)

It seems that this is caused by a missing null check here:

[Compatibility] Extending AppCompatActivity instead of Activity for DefaultErrorActivity

Hello!

Current situation: Currently, DefaultErrorActivity extends Activity, which looks great for API >= 21 devices. However, the problem is that pre-Lollipop devices still have to use the old Holo theme. So the look on these devices is hard to customize, not uniform with the post-Lollipop Material look, and forces the developer to create multiple style files, like this one : https://github.com/Ereza/CustomActivityOnCrash/blob/master/library/src/main/res/values-v14/styles.xml

Solution: It may be easier for everyone to make DefaultErrorActivity extend AppCompatActivity instead, making use of the support lib to make everything homogeneous, easier to customize and keeping a unique style.xml file with a theme extending Theme.AppCompat.
As far as I know, modifying the parent class is the only thing to do, and it pains me to create my own error activity class just to do so (because that's the only thing that keeps me from using the default error activity class).

By the way, that might also explain why issue #26 (which uses an AppCompat theme) still doesn't seem to work if I believe the last comment, though I haven't investigated the issue further.

Also, I may have overlooked a problem so let me know if it's not doable.
Thanks!

Add send report to email

Hello,
Thank you for your nice library.
How can I add a "send report by email" button instead of show error details?

Not working with RetroLambda

I seem to be seeing issues with this not working with RetroLambda?
It works OK with the Jack compiler and no RetroLambda - but unfortunatley I'm also using Glide... which doesn't work with Jack!

help error when debug.

when i try to debug after add customcrash i have this problem

import android.support.v7.app.NotificationCompat;

Error:(33, 30) error: cannot find symbol class NotificationCompat

and i use for notifications.

Trace loggin

Just a note, that stack trace logging is not working, because of the "\n\n" before it. So if you call CustomActivityOnCrash.getAllErrorDetailsFromIntent(context, intent) and log the result, it ends after the device modell name. If you remove the "\n\n" from the end of this part of the string, it is working

show custom crash activity

i added this line into main activity:

throw new RuntimeException("Boom!");

and configure library on application class:

   CaocConfig.Builder.create()
           .backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) //default: CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM
           .enabled(false)
           .showErrorDetails(false)
           .showRestartButton(false)
           .trackActivities(true)
           .minTimeBetweenCrashesMs(2000)
           .errorDrawable(R.mipmap.ic_launcher_round)
           .restartActivity(null)
           .errorActivity(CrashActivity.class)
           .eventListener(new CustomEventListener())
           .apply();

manifest:

   <activity
       android:name=".Ui.CrashActivity"
       android:configChanges="screenSize|orientation"/>

restartActivity is null here and after launch application that cause of restarting to loop and i don't see crash activity

How to disable logs in your library, its populating my logcat with many lines

[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 0, nProtocol = 6, front = sl, nSrcAddrV6 = $�, tempFilter.srcPort= 0, nDestAddrV6 =x���}, tempFilter.dstPort=0, rest =
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 0: 00000000000000000000000000000000:A9AE 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33889 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 0:, nSrcAddrV6 = ::, tempFilter.srcPort= A9AE, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 1: 00000000000000000000000000000000:1F90 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000 10197 0 19646972 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Converting filter family to v4
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Add filter for AF=2, protocol=6, nSrcAddrV6 = ::, sport=901F, nDestAddrV6 =::, dport=0,
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 2: 00000000000000000000000000000000:9C70 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33909 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 2:, nSrcAddrV6 = ::, tempFilter.srcPort= 9C70, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 3: 00000000000000000000000000000000:AE94 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33893 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.661 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 3:, nSrcAddrV6 = ::, tempFilter.srcPort= AE94, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 4: 00000000000000000000000000000000:A656 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33913 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 4:, nSrcAddrV6 = ::, tempFilter.srcPort= A656, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 5: 00000000000000000000000000000000:A7BA 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33901 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 5:, nSrcAddrV6 = ::, tempFilter.srcPort= A7BA, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 6: 00000000000000000000000000000000:9D9A 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33897 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 6:, nSrcAddrV6 = ::, tempFilter.srcPort= 9D9A, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 7: 00000000000000000000000000000000:A79C 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33905 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 7:, nSrcAddrV6 = ::, tempFilter.srcPort= A79C, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 8: 0000000000000000FFFF00006401A8C0:98A0 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000 10152 0 19293995 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Converting filter family to v4
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Add filter for AF=2, protocol=6, nSrcAddrV6 = ::ffff:192.168.1.100, sport=A098, nDestAddrV6 =::, dport=0,
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 9: 00000000000000000000000000000000:E981 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000 10152 0 19298519 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Converting filter family to v4
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Add filter for AF=2, protocol=6, nSrcAddrV6 = ::, sport=81E9, nDestAddrV6 =::, dport=0,
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 10: 00000000000000000000000000000000:9F63 00000000000000000000000000000000:0000 8A 00000000:00000000 00:00000000 00000000 1001 0 33885 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Skip non-listening tcp6 Socket: state = 8A, nProtocol = 6, front = 10:, nSrcAddrV6 = ::, tempFilter.srcPort= 9F63, nDestAddrV6 =::, tempFilter.dstPort=0, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 11: 0000000000000000FFFF00000100007F:9AEC 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000 10152 0 19298756 1 0000000000000000 100 0 0 10 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Converting filter family to v4
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Add filter for AF=2, protocol=6, nSrcAddrV6 = ::ffff:127.0.0.1, sport=EC9A, nDestAddrV6 =::, dport=0,
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 12: 0402052437839594F0312C2C0EEB9A25:B04E 0068042408080940000000000A200000:01BB 08 00000000:00000001 00:00000000 00000000 10040 0 19338642 1 0000000000000000 29 4 28 10 1400
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: dstAddr.v6.s6_addr does not match addrV6Any Socket: state = 8, nProtocol = 6, front = 12:, nSrcAddrV6 = 2405:204:9495:8337:2c2c:31f0:259a:eb0e, tempFilter.srcPort= B04E, nDestAddrV6 =2404:6800:4009:808::200a, tempFilter.dstPort=1BB, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 13: 0000000000000000FFFF00006401A8C0:9E1E 0000000000000000FFFF00007C481517:01BB 01 00000000:00000000 00:00000000 00000000 10197 0 19647643 1 0000000000000000 93 4 25 10 1400
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: dstAddr.v6.s6_addr does not match addrV6Any Socket: state = 1, nProtocol = 6, front = 13:, nSrcAddrV6 = ::ffff:192.168.1.100, tempFilter.srcPort= 9E1E, nDestAddrV6 =::ffff:23.21.72.124, tempFilter.dstPort=1BB, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 14: 0402052437839594F0312C2C0EEB9A25:BC1B 8028032A0F002FF00CB0CEFA02000000:01BB 08 00000000:00000000 00:00000000 00000000 10113 0 19494044 1 0000000000000000 29 4 30 10 1400
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: dstAddr.v6.s6_addr does not match addrV6Any Socket: state = 8, nProtocol = 6, front = 14:, nSrcAddrV6 = 2405:204:9495:8337:2c2c:31f0:259a:eb0e, tempFilter.srcPort= BC1B, nDestAddrV6 =2a03:2880:f02f:f:face:b00c:0:2, tempFilter.dstPort=1BB, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 15: 0402052437839594F0312C2C0EEB9A25:A8FB 00680424060809400000000002200000:01BB 08 00000000:000001A1 00:00000000 00000000 10125 0 19612411 1 0000000000000000 43 4 30 10 1400
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: dstAddr.v6.s6_addr does not match addrV6Any Socket: state = 8, nProtocol = 6, front = 15:, nSrcAddrV6 = 2405:204:9495:8337:2c2c:31f0:259a:eb0e, tempFilter.srcPort= A8FB, nDestAddrV6 =2404:6800:4009:806::2002, tempFilter.dstPort=1BB, rest = 0
[ 03-09 11:26:47.662 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 16: 0402052437839594F0312C2C0EEB9A25:A8FB 8028032A80002FF10CB0CEFAA01E0000:01BB 01 00000000:00000000 00:00000000 00000000 10113 0 19649495 1 0000000000000000 27 4 32 10 1400
[ 03-09 11:26:47.663 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: dstAddr.v6.s6_addr does not match addrV6Any Socket: state = 1, nProtocol = 6, front = 16:, nSrcAddrV6 = 2405:204:9495:8337:2c2c:31f0:259a:eb0e, tempFilter.srcPort= A8FB, nDestAddrV6 =2a03:2880:f12f:80:face:b00c:0:1ea0, tempFilter.dstPort=1BB, rest = 0
[ 03-09 11:26:47.663 971: 1035 D/ ]
DpmQmiUtils::parseSocketLine: Now Parsing 17: 0402052437839594F0312C2C0EEB9A25:AFE0 8028032A83002FF10CB0CEFADE250000:01BB 08 00000000:00000000 00:00000000 00000000 10113 0 19494049 1 0000000000000000 29 4 30 10 1400

Auto restart app consecutive ?

I create a App launcher and add CustomActivityOnCrash be like sample.
But when i get error, this app restart consecutive.
Not show the layout error .

I got a quesion.

This library can't catch ANR , I regret to say. Have you studied about it?

Get Error Activity from AndroidManifest.xml

As discussed in #4, it will be great if we can set an error Activity directly from AndroidManifest.xml, so we only need to add this line:

 CustomActivityOnCrash.install(this);

Maybe it can add a custom action in order to be launched from library:

        <activity
            android:name=".view.activity.ErrorActivity">
            <intent-filter>
                <action android:name="cat.ereza.customactivityoncrash.ERROR" />
            </intent-filter>
        </activity>

As discussed, it will work like:

  • Prioritary: CustomActivityOnCrash.setErrorActivityClass(CustomErrorActivity.class);
  • Secondary: Manifest action
  • Less important: Default error activity.

No Logs in google developer console

I have been using this library in my app, after few month i noticed that my app is crashing but i am not getting logs on google play developer console, this library works very well, but i could not detect why and where is my app being crashed?

Thanks

request: Send Intent data to custom Crash Screen

With this library, I have a custom crash screen that displays an activity and sends an email to me. I try to grab one global variable that is stored in my Application class, but the variable is null - it appears the Application class is being destroyed before the custom crash screen is displayed.

Is there a way that you could add support to add intent data or otherwise store a variable in the library so when the application crashes, the custom crash screen has access to this variable (in my case it's just a string that I need)

thank you !

Need Help about CustomCrashActivity

Hi there!,
Im using these configs. I tried each of them but i cant see crash activity. Library only restarting app.
Can you appoint whats wrong?

      CaocConfig.Builder.create()
            .backgroundMode(CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM) //default: CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM
            .enabled(true) //default: true
            .showErrorDetails(true) //default: true
            .showRestartButton(true) //default: true
            .logErrorOnRestart(true) //default: true
            .trackActivities(true) //default: false
            .minTimeBetweenCrashesMs(3000) //default: 3000
            .errorDrawable(R.drawable.launcher) //default: bug image
            .restartActivity(SplashScreen.class) //default: null (your app's launch activity)
            .errorActivity(CustomCrashActivity.class) //default: null (default error activity)
            .apply();

    CaocConfig.Builder.create().apply();

Thnks

Launch activity when in background flag not always working

Hi!

I recently added the flag setLaunchErrorActivityWhenInBackground(false) to avoid showing the error activity when the user is not using the app. For what I've seen it only work sometimes.

If I force a crash in a Receiver and send a broadcast from the terminal with adb, sometimes the error activity shows up and sometimes it doesn't.

I've been trying to understand the code that makes this "background error" flag work and it looks fine, I'm not sure what is going on.

Do you have any knowledge of this issue? If you want we can investigate some more.

Thank!

custom theme

hi, awesome stuff you made.

not an expert on Android, but i'm trying to use this to style the crash activity, mainly its action bar colors but with no success

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <item name="colorAccent">@color/accent</item>
    </style>

    <style name="CustomActivityOnCrashTheme" parent="AppTheme" />

</resources>

my app's activity action bar is styled in red colors, whoever the crash activity action bar is in blue

stacktrace doesn't help sometimes

my app sent me two identical stacktraces from two different units/users coincidentally using the same device type and android 7.0

usually, the stacktraces that come in will have something in it that points me to some part of code in my app that I can goto and debug, but these two stacktraces do not point to any of my own code, its just all android stuff... how can i tell what part of my code caused the nullpointerexception?

Stacktrace: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getVisibility()' on a null object reference at android.widget.FrameLayout.layoutChildren(FrameLayout.java:275) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:18874) at android.view.ViewGroup.layout(ViewGroup.java:5954) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:18874) at android.view.ViewGroup.layout(ViewGroup.java:5954) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:18874) at android.view.ViewGroup.layout(ViewGroup.java:5954) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:18874) at android.view.ViewGroup.layout(ViewGroup.java:5954) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:935) at android.view.View.layout(View.java:18874) at android.view.ViewGroup.layout(ViewGroup.java:5954) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2697) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2413) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1550) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7189) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:959) at android.view.Choreographer.doCallbacks(Choreographer.java:734) at android.view.Choreographer.doFrame(Choreographer.java:670) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:945) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Does this still work?

Been a while since any activity... I'm just wondering whether this library still works.

Build date is zero'd out

Apparently newer gradle versions (possibly 2.2.0+ ?) set the timestamp of all files in the compiled APK to Fri, Nov 30 1979 00:00:00 (312764400000) making the Build date information useless. This can be detected by comparing the build date to 312764400000 and it can be fixed by determining build date using packageInfo.lastUpdateTime (requires API 9+), similar to how the versionName is retreived. Alternatively gradle can be configured to use proper timestamps on files by setting android.keepTimestampsInApk = true in the gradle.properties.

see also:
https://code.google.com/p/android/issues/detail?id=220039
http://stackoverflow.com/questions/7607165

How can i use Listeners which defined on Application class

Hi, Thank you very much for release and supporting this useful library,

i'm using custom activity for show crash report, but i cant use listeners which defined on application class, could you help me? Thanks;

public class SignalCustomCrashActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.signal_custom_crash_activity);

        ButterKnife.bind(this);
    }

    @OnClick(R.id.restart_application)
    public void restart_application(View view) {
    }
}

Applciation class:

public class SignalApplication extends Application {
    private static final String TAG        = "SampleCrashingApp";

    @Override
    public void onCreate() {
        super.onCreate();
        CustomActivityOnCrash.install(this);
        CustomActivityOnCrash.setShowErrorDetails(false);
        CustomActivityOnCrash.setErrorActivityClass(SignalCustomCrashActivity.class);

    }

    static class CustomEventListener implements CustomActivityOnCrash.EventListener {
        @Override
        public void onLaunchErrorActivity() {
            Log.e(TAG, "onLaunchErrorActivity()");
        }

        @Override
        public void onRestartAppFromErrorActivity() {
            Log.e(TAG, "onRestartAppFromErrorActivity()");
        }

        @Override
        public void onCloseAppFromErrorActivity() {
            Log.e(TAG, "onCloseAppFromErrorActivity()");
        }
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.