title: Communication between Native App and Chrome Custom Tab (CCT)
body: <p>When I use Android <code>WebView</code> there are ways to communicate between web-app and native with <code>JS interface</code> call as well as <code>JS Injection</code> call. I wonder if there in any work around to communicate between Android native app and <code>Chrome Custom Tab (CCT)</code> by any mean?</p>
  
  <p>I know for security reason Google does not added bridging feature in <code>CCT</code> and <code>TWA</code>. But in <a href="https://youtu.be/6lHBw3F4cWs?t=563" rel="nofollow noreferrer">Google I/O</a>, they declared that there are limited ways of <code>Web/Native bridging</code> (refer the below figure). I wonder what are the ways as well as where can I find guidelines regarding these limited bridging?</p>
  
  <p><img src="https://camo.qiitausercontent.com/cc1fdba52ca6678359cecf6c80a01da771bf7dcf/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f333338372f35373732666336372d303532652d643030632d383566662d3431356631353836663765652e706e67"></p>
  
  <h2>Update 1</h2>
  
  <pre><code>&lt;activity android:name=".activities.MyResultActivity"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.VIEW" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
          &lt;data android:scheme="abc"
              android:host="abc.oauth.com" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>When I am calling <code>abc://abc.oauth.com</code> in browser it does not open my activity. Its opening google search. </p>
  
  <h2>Update 2</h2>
  
  <p>Finally I got the query params key/value with below code successfully,</p>
  
  <pre><code>override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
  
      Log.d(classTag, "MyResultActivity activity is called")
  
      intent?.data?.let {
  
          for (key in it.queryParameterNames) {
              val value = it.getQueryParameter(key)
              Log.d(classTag, "MyResultActivity param key: $key, value: $value")
          }
      }
  }
  </code></pre>
  
  <p>Thanks a lot @Rahul for guiding me onwards.</p>