Skip to content

Tracking the user interaction before crash occurs and using that data in crash reporting.

License

Notifications You must be signed in to change notification settings

android-Infoedge/tracker

Repository files navigation

tracker

Tracking the user interaction before crash occurs and using that data in crash reporting.

Crash reporting is one of the most important task that help in the improvement of an application. But sometimes even if we have the stacktrace of crash we are not able to track the cause of the crash , as it might have been due to series of user interaction steps that lead to such a result.

So this library is focused towards tracking of user interaction. Basically tracking the method calls that occurred during the whole process.

###Usage

Proguard rules(when proguard enabled) :-

-keep class com.infoedge.trackerBinder** { *; }
-dontwarn com.infoedge.trackerBinder**
-adaptclassstrings

include in build.gradle:-

apply plugin: 'com.infoedge.tracker'

buildscript {
    repositories {
        mavenCentral()
        maven {
            url 'https://dl.bintray.com/android-infoedge/maven/'
        }
    }
    
    dependencies {
        classpath 'com.infoedge.tracker:tracker-plugin:1.3'
    }
}

you can add the annotation on any method or constructor to add the method call in tracking:-

@TracePath
public void methodName(){}

@TracePath(TAG = "QD_CLICK")
public void methodName(){}

@TracePath(TAG = "QD_CLICK" , methodName = "myclick")
public void methodName(){}

@TracePath(TAG = "QD_CLICK" , methodName = "myclick",className = "myclass")
public void methodName(){}

Enabling and disabling logs and tracing dynamically :-

TraceAspect.enableTracking(boolean)
TraceAspect.enableLogging(boolean)

To enable and disable the plugin through gradle file (clean your project if this configuration is changed):-

tracker{
    enabled true
}

Logs will appear as :-

07-27 12:45:14.153 17359-17359/com.example.android V/q: QD_CLICK ⇢ [myclass] myclick(v= id/bt_follow_button )

To print all the event list :-

Log.d("LogTag", CapturedEventsContainer.getInstance().getEventList());

07-27 12:45:25.054 17359-17359/com.example.android D/LogTag: QD_CLICK ⇢ [myclass] myclick(v= id/tv_tag_1 )
                                                             QD_CLICK ⇢ [myclass] myclick(v= id/bt_follow_button )
                                                             QD_CLICK ⇢ [myclass] myclick(v= id/bt_follow_button )

To change the size of CapturedEventsContainer (default 50):-

CapturedEventsContainer.getInstance().setEventListSize(30);

##References

This is an extension to the Hugo library by Jake Wharten

##License

Copyright 2016 Info Edge India Limited

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:https://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.

About

Tracking the user interaction before crash occurs and using that data in crash reporting.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published