Skip to content

Android onNewIntent #4118

Closed Answered by Kbz-8
Kbz-8 asked this question in Q&A
Discussion options

You must be logged in to vote

I've managed to do it. If anyone has this need one day here's how I did it

Use a fork of dioxus to be able to override the MainActivity.kt file (this may be added to dioxus hopefully) and implemented it like so

package dev.dioxus.main;

import com.yes.app.BuildConfig;
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.util.Log

typealias BuildConfig = BuildConfig;

class MainActivity : WryActivity() {
    override fun onNewIntent(intent: Intent?) {
        super.onNewIntent(intent)
        intent?.data?.let { notifyOnNewIntent(it.toString()) }
    }

    companion object {
        init {
            System.loadLibrary("dioxusmain")
        }
    }…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Kbz-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant