Closed mattdw closed 2 years ago
Unfortunately I'm a bit strapped for time, otherwise I'd try to work up a minimal test case for you – appreciate your work on this!
Hey @mattdw this is a known issue. Android doesn't report when the user cancels the share action. We will be adding a way to cancel the task, but not in the next release. Gonna keep this issue open till we add the workaround.
This will be fixed in NatShare 1.2.7.
On multiple Android devices (but not iOS):
If you pop up the sharing panel with
await payload.Commit()
, then dismiss it without choosing a sharing action, the task never returns, the await never completes, and the containing task is deadlocked.On iOS, the task completes as expected, returning a bool.
Unity 2021.3.x, OPPO w/ Android 12 (among others.)
We've found that this plugin: https://github.com/yasirkula/UnityNativeShare doesn't have the same problem, but it returns a three-way enum (Shared, Not Shared, Unknown) – which makes me wonder if it's just an unhandled case on the Android side.