Introducing Hyperion-Android

takahirom
2 min readApr 7, 2018

--

Hyperion-Android is very useful library. I believe it will become an essential plug-in for debugging like Facebook Stetho.

You can check annoucement blog post for a feature showcase.

And you can basic usage of this library in GitHub

Useful features

Measurement Inspector

I think that the Measurement Inspector is killer feature. You can check the margins of all Views in the application.

Crash plugin

The crash plugin is displayed automatically when the application crashes during development, so you can view the crash log without checking logcat.

There are also many useful functions, such as being able to dynamically change preferences.

I will show you where It did not work and how I solved it.

Check the dependency of Hyperion

You will add this dependencies.

debugImplementation 'com.willowtreeapps.hyperion:hyperion-core:0.9.21'
debugImplementation 'com.willowtreeapps.hyperion:hyperion-attr:0.9.21'
debugImplementation 'com.willowtreeapps.hyperion:hyperion-measurement:0.9.21'
debugImplementation 'com.willowtreeapps.hyperion:hyperion-disk:0.9.21'
debugImplementation 'com.willowtreeapps.hyperion:hyperion-recorder:0.9.21'
debugImplementation 'com.willowtreeapps.hyperion:hyperion-phoenix:0.9.21'
debugImplementation 'com.willowtreeapps.hyperion:hyperion-crash:0.9.21'
debugImplementation 'com.willowtreeapps.hyperion:hyperion-shared-preferences:0.9.21'

Probably your application will fail to build. Because Hyperion-Android uses the latest support library.

+--- com.willowtreeapps.hyperion:hyperion-core:0.9.21
| +--- com.willowtreeapps.hyperion:hyperion-plugin:0.9.21
| +--- com.android.support:appcompat-v7:27.1.0 (*)
| +--- com.android.support:recyclerview-v7:27.1.0 (*)
| \--- com.google.dagger:dagger:2.15
| \--- javax.inject:javax.inject:1

If you don’t want to update that library, you can exclude it.

["hyperion-core", "hyperion-attr", "hyperion-measurement", "hyperion-disk", "hyperion-recorder","hyperion-phoenix","hyperion-crash"].forEach {
debugImplementation ("com.willowtreeapps.hyperion:$it:0.9.20"){
exclude group: 'com.android.support'
exclude group: 'com.google.dagger'
}
}

If DebugMenu is already implemented in your application

If DebugMenu is already implemented in your app, you do not want to erase its implementation, do you?

You can create a Hyperion-Android plugin and add it to the menu.

But that is a little hard. Therefore, I made plugins that can be easily added to Menu.

So I made a plugin to make it easy. You can customize Hyperion-Android’s Menu.

Hyperion-Simple-Item
DebugApp.java

You can check Introduce Hyperion-Android Pull Request.

Have a good debug life!

--

--