title: How to change android activity by clicking a button in (ionic) webview?
body: <p>I'm developing a hybrid app using Ionic 4. Ionic just like other html5 based apps runs as a <code>webview</code> in <code>MainActivity</code>. using capacitor I've imported my app to  android studio and I've created a <code>SecondActivity</code>. How can I go to <code>SecondActivity</code> by clicking a button inside first activity(<code>MainActivity</code>) (which is an Ioninc page and for sure an html webview).</p>
  
  <p>So far i've tried different method to achieve this but no luck.
  I've created a cordova plugin following this tutorial:
  <a href="https://stackoverflow.com/questions/40375555/start-android-activity-from-cordova-plugin">Start android activity from cordova plugin</a>
  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.
  <a href="https://capacitor.ionicframework.com/docs/plugins/android" rel="nofollow noreferrer">https://capacitor.ionicframework.com/docs/plugins/android</a> </p>