Skip to content
Pierre-Emmanuel Altieri edited this page Apr 25, 2017 · 7 revisions

Android DebugKit

DebugKit lib for Android allows you to use a fancy hovering debug tool to trigger some actions directly in the app. This tool is very useful to trigger some event at runtime, and to have a written feedback directly on your testing phone screen.

Requirements

  • Android SDK 15+

Installation

repositories {
jcenter()
}
dependencies {
compile 'com.hulab.android:debugkit:1.0.3'
}

Usage

finalDevTool.Builderbuilder = newDevTool.Builder(mContext);
builder.addFunction(newDebugFunction() {
@OverridepublicStringcall() throwsException {
log("doing some stuff...");
doSomeStuff();
return"Some stuff was done.";
}
}).addFunction(newDebugFunction() {
@OverridepublicStringcall() throwsException {
log("doing some other stuff...");
doSomeStuff();
return"Some stuff was done.";
}
}).addFunction(newDebugFunction() {
@OverridepublicStringcall() throwsException {
log("doing some stuff again and again...");
doSomeStuff();
return"Some stuff was done.";
}
}); // optional, DevToolFragment.DevToolTheme.DARK is set by defaultbuilder.setTheme(DevToolFragment.DevToolTheme.DARK)
.build();

Result

Here we have 3 debug tools, from top to bottom:

  • LIGHT theme with 5 defined functions
  • Minified mode (clicking on the top left corner arrow)
  • DARK theme with 3 defined functions and the logged text when clicking on each F1, F2 and F3

Screenshot.png


dark themelight theme


Have fun!

Clone this wiki locally