package example.chia.partner import android.content.Context import android.content.Intent import android.net.Uri object ChiaHandoff { // Call only from the exact JIT action's click listener. fun openChosenUrl(context: Context, value: String) { val uri = Uri.parse(value) if (uri.scheme != "https") return context.startActivity(Intent(Intent.ACTION_VIEW, uri)) // OS browser; never WebView. } // Optional generic App Link: do not inspect or retain query/fragment. fun handleGenericReturn(uri: Uri, showMarketplaceHome: () -> Unit) { if (uri.host == "return.example-partner.invalid") showMarketplaceHome() } }