I'm developing a hybrid app using Ionic 4. Ionic just like other html5 based apps runs as a `webview` in `MainActivity`. using capacitor I've imported my app to android studio and I've created a `SecondActivity`. How can I go to `SecondActivity` by clicking a button inside first activity(`MainActivity`) (which is an Ioninc page and for sure an html webview).

So far i've tried different method to achieve this but no luck.
I've created a cordova plugin following this tutorial:
[Start android activity from cordova plugin](https://stackoverflow.com/questions/40375555/start-android-activity-from-cordova-plugin)
it works prefect in cordova application but I was not successful to import it into Ionic.
also I've tried Capacitor and apparently accessing native code using capacitor should be very easy but unfortunately I've had no luck so far.
<https://capacitor.ionicframework.com/docs/plugins/android>