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.
A very useful feature of ki is that you can import the library on the fly.Let’s import javalin using
:dependsOn function.After downloading, import
io.javalin.Javalin In your shell.
:paste In mode, assign an HTML string to a variable
Javalin You can create a server to serve endpoints by making the imported HTML strings available.
/deeplink Provides an ad hoc web page.
javalin.start() Start the localhost server using the desired port (7000 in this case).
Start with javalin
localhost:7000 Now check the ad hoc web page in the emulator.
Use your system’s IP address (using ifconfig on Mac) to access the web page from your device’s browser.
In the example
172.20.10.3As the IP address of the system.
- After starting Javalin on port 7000
- Google outside has
https://www.google.comOpen the web page as a URL and therefore.
- Twitter links
twitter://user?id=monsterhunterURL that is a deep link of the Twitter app. Therefore, open the Twitter app instead.
You can also use ki to load the created
.kts Insert the script file into the shell. Therefore, you can save time and effort by integrating all the above code into.
.kts File instead.
Javalin An object that can be used to start the localhost server.
: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 😄