how to send crashing report on debug on google analytics from android -


i want send crashing report manually. before publishing apk, want test it. when app crashed, tracker send data there no changes on crash report webpage on play developer console. how can test ?

     //      tracker.enableexceptionreporting(true);     tracker.enableadvertisingidcollection(true);     tracker.enableautoactivitytracking(true);     mexceptionparser = new standardexceptionparser(getapplicationcontext(), new arraylist());     analytics.setdryrun(true);     analytics.setappoptout(buildconfig.debug);      thread.setdefaultuncaughtexceptionhandler(new thread.uncaughtexceptionhandler() {         @override         public void uncaughtexception(thread t, throwable e) {              tracker.send(new hitbuilders.exceptionbuilder()                     .setdescription(                             new standardexceptionparser(getapplicationcontext(), null)                                     .getdescription(t.getname(), e))                     .setfatal(true)                     .build());              analytics.dispatchlocalhits();               displaymetrics metrics = getapplicationcontext()                     .getapplicationcontext().getresources()                     .getdisplaymetrics();             if (metrics.densitydpi == displaymetrics.density_low                     || metrics.densitydpi == displaymetrics.density_medium) {                  intent intent = new intent(intent.action_main);                 intent.addcategory(intent.category_home);                 intent.setflags(intent.flag_activity_new_task);                 getapplicationcontext().startactivity(intent);                 system.exit(0);              } else {                  intent intent = new intent(getapplicationcontext(),                         main.class);                 intent.addflags(intent.flag_activity_new_task);                 intent.addflags(intent.flag_activity_clear_task);                 getapplicationcontext().startactivity(intent);                 if (activity != null)                     activity.finish();             }              system.exit(0);             android.os.process.killprocess(android.os.process.mypid());     //     //                thread.uncaughtexceptionhandler googleexception = new      exceptionreporter(     //                        tracker,     //                        null,    //                        getapplicationcontext());      //                googleexception.uncaughtexception(t,e);          }     }); 

you can try "crashlytics" also. using in of apps. here link - https://try.crashlytics.com/. hope you.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -