android / input-samples

Multiple samples showing the best practices in input on Android.
Apache License 2.0
291 stars 268 forks source link

Cant support the FB messenger #13

Closed Colibrow closed 9 months ago

Colibrow commented 7 years ago

I tried it in FB Messenger and I found that the judgement is acceptable but the doCommit is wrong. So the FB could not receive the photo I shared.

gowthamidommeti commented 7 years ago

Hi, I also have the same issue.Please intimate me if your issue is cleared.

Colibrow commented 6 years ago

@gowthamidommeti sorry to find this now, finally i solve it by a tricky way { i replace the contentUri with the Uri.from local file } for example:

if (Build.VERSION.SDK_INT < 25 && getCurrentInputEditorInfo().packageName.equals(Messengers.FB_MESSENGER)) { contentUri = Uri.fromFile(file); } else { try { contentUri = FileProvider.getUriForFile(getContext(), AUTHORITY, file); } catch (IllegalArgumentException ex) { return; } }

hope it can help you