I faced an issue in Hyperion github. I want to add my custom item into Hyperion menu.
As I figure out if I remove something from core-libs they would be removed successfully and vice versa. But if I add custom Plugin
- nothing happens.
I've tried different versions of Hyperion it also does not affect the result.
Also, here what I've checked additionally:
@AutoService
annotationminifyEnabled false
Plugin:
import com.google.auto.service.AutoService
import com.willowtreeapps.hyperion.plugin.v1.Plugin
import com.willowtreeapps.hyperion.plugin.v1.PluginModule
@AutoService(Plugin::class)
class TestPlugin : Plugin() {
override fun createPluginModule(): PluginModule? {
return TestPluginModule()
}
}
Module:
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.willowtreeapps.hyperion.plugin.v1.PluginModule
class TestPluginModule : PluginModule() {
override fun createPluginView(layoutInflater: LayoutInflater, parent: ViewGroup): View? {
return layoutInflater.inflate(R.layout.htest_plugin_item, parent, false)
}
}
Dependencies:
def hyperionVersion = '0.9.27'
debugImplementation "com.willowtreeapps.hyperion:hyperion-core:$hyperionVersion"
debugImplementation "com.willowtreeapps.hyperion:hyperion-attr:$hyperionVersion"
debugImplementation "com.willowtreeapps.hyperion:hyperion-crash:$hyperionVersion"
debugImplementation "com.willowtreeapps.hyperion:hyperion-measurement:$hyperionVersion"
debugImplementation "com.willowtreeapps.hyperion:hyperion-recorder:$hyperionVersion"
debugImplementation "com.willowtreeapps.hyperion:hyperion-shared-preferences:$hyperionVersion"
debugImplementation "com.willowtreeapps.hyperion:hyperion-timber:$hyperionVersion"
NOTE: on screenshots v0.9.26. But I've tested also v0.9.27, v0.9.25, v0.9.24.
Hyperion#open (Activity) will have no affect if Hyperion has not been enabled. You can reenable for future Activities with Hyperion.enable (). To embed the Hyperion Plugin Menu into your own Activity, acquire a PluginViewFactory from Hyperion#getPluginViewFactory and call create (Activity):
Hyperion is a hidden plugin drawer that can easily be integrated into any app. The drawer sits discreetly under the app so that it is there when you need it and out of the way when you don't. Hyperion plugins are designed to make inspection of your app quick and simple. Please see our announcement blog post for a feature showcase.
Once Hyperion is integrated into your app, simply shake your phone to activate. If you are running your app on an emulator, you can manually open the menu by calling Hyperion.open (Activity activity). You can also open the menu by selecting the foreground notification that appears while the client app is in the foreground.
To disable for specific Activities, annotate them with @HyperionIgnore. To disable for all Activities, set a meta-data field in your AndroidManifest.xml: Hyperion#open (Activity) will have no affect if Hyperion has not been enabled.
it looks like the problem is related to the processing of @AutoService
annotation. Make sure that you have added an annotation processor to the project.
You should add the following annotation processor to the build.gradle
file.
for Kotlin project:
kapt 'com.google.auto.service:auto-service:1.0-rc6'
for Java project:
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc6'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With