plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

[v2-rc] [android] ActivityCallback from startActivityForResult in Kotlin/Java may not call.

Open aiueo13 opened this issue 5 months ago • 2 comments

The sentences may be vague because of my not good English :(

Description

This is an issue when creating and using mobile plugins. When retrieving selected data from other applications in Android Kotlin / java, startActivityForResult is used, but this result, function with @ActivityCallback, is sometimes not returned or reflected with a delay.

Reproduction

This can be verified with Function of FileDialogBuilder::pick_file of tauri-plugin-dialog.

The results may not be returned when using this on Android to call the file picker, select or cancel a file and return to its own application. Sometimes they succeed, sometimes they fail continuously as it.

If it fails, no matter how long you wait, it will not get the result, but if you call the same command again and it succeeds, the results that have not returned so far will also be reflected with delayed. When it, the calling order is maintained and the results are returned. Act as if thread had stopped then restarted.

Info

Confirmed at least on Android 13 (Both Dev and Release Build).

aiueo13 avatar Sep 05 '24 21:09 aiueo13