Daily life with Jetpack Compose part 1

How to achieve simple tasks with Jetpack Compose series. Simple tasks with plain Android stayed mostly the same with minor API changes, but there are no official documentation on this subject.

How to display a web web in a Composable

In your code

import android.webkit.WebView
import android.webkit.WebViewClient

fun createWebView(article: Post, modifier: Modifier) {
    val context = ContextAmbient.current
    val webViewClient = WebViewClient()
        viewBlock = {
            WebView(context).apply {
                this.webViewClient = webViewClient
        modifier = modifier

Don’t use the androidx version – it’s useless

How to share a URL with Jetpack Compose

In your code

import android.content.Intent

fun ArticleView(
    article: Post
) {
    val context = ContextAmbient.current
    val shareIntent = Intent(Intent.ACTION_SEND)
    shareIntent.type = "text/plain"
    shareIntent.putExtra(Intent.EXTRA_TEXT, "https://hanquoc.kr/${article.slug}")
    shareIntent.putExtra(Intent.EXTRA_SUBJECT, article.title.rendered)
        Intent.createChooser(shareIntent, null),


Splash screen

Splash screen

Is the name of my latest school project in cryptography; possibly the fastest project ever: only 10 hours from concept to realization with all the functionality in place. It would be great if I were in the mood to document it. But unfortunately that is not the case right now. Other than some problem with XML Serialization (specifically serialization order control and serialize to stream), the project went smoothly. The version below is a little more polished than the version I turned in.

So what does this do? In short: It let you encrypt files and send to friends who also used this application. Upon account creation, you are given a key pair (which you can access using the export function); you are free to give your key to others and vice versa. If you want to send a file to someone, just encrypt the files choosing that one as the recipient, send the file to (s) he, the receiver logins to his/her account, hit decrypt and BOOM! Files appear!

Though the process is simple, way too simple that you don’t even have to enter a password to encrypt files, it is still not cryptographically feasible for anyone to decrypt the encrypted file. Even you, the one who encoded that file(s) to send wouldn’t be able to decode it without knowing the recipient’s account detail.

If that sounds interesting, give it a try

(If you are confused, read the Vietnamese usage instruction in the PDF file)