Testing deeplinks using ki


Qi Kotlin interactive shell Developed by the JetBrains people..

Recently shared by one of my colleagues A neat little Ruby script Launch an ad hoc localhost web page and run it on all deep link URLs.

Do the same exercise with care.

for example this A popular option in this article just for simplicity (number of modules to load to get things working), I use Javalin As the web framework of your choice.

using :paste In mode, assign an HTML string to a variable val html

When Javalin You can create a server to serve endpoints by making the imported HTML strings available. /deeplink Provides an ad hoc web page.

next, javalin.start() Start the localhost server using the desired port (7000 in this case).

Use your system’s IP address (using ifconfig on Mac) to access the web page from your device’s browser.

In the example

  • running ifconfig give away As the IP address of the system.
  • After starting Javalin on port 7000
  • Google outside has Open the web page as a URL and therefore.
  • Twitter links twitter://user?id=monsterhunter URL that is a deep link of the Twitter app. Therefore, open the Twitter app instead.

This script Javalin An object that can be used to start the localhost server.

use :l Commands to use after loading the script :ls Check the variables and methods exposed by the script.

Well, we already have a way to test using deep links adb.. Apart from notifications, web pages are another popular source for invoking deep links.So I wanted you to introduce some simple utilities Qi Kotlin-I hope Shell and this article bring justice to it 😄


Leave a Reply

Your email address will not be published. Required fields are marked *