aFileChooser icon indicating copy to clipboard operation
aFileChooser copied to clipboard

Whatsapp file sharing and local download file sharing bug fixed

Open nieldeokar opened this issue 8 years ago • 6 comments

  1. Fixed when you share file from whatsapp file path is inside "_display_name" column and not in default "_data".
  2. Fixed when you share file from local downloads you get NumberFormatException.

I was getting this errors on SDK 25,26.

nieldeokar avatar Jan 05 '18 11:01 nieldeokar

This does not work

nik910 avatar Jan 25 '18 06:01 nik910

Hey, Thanks for testing. Can you please let me know which part is not working? whatsapp file sharing or local downloads file sharing ?

nieldeokar avatar Jan 25 '18 07:01 nieldeokar

@nieldeokar The whatsapp part is not working. The file.canRead method gives false and hence the path returned is null. Do we have to add any permissions in manifest for the above code to work?

nik910 avatar Jan 25 '18 08:01 nik910

I will update you on this after testing it once again. Thanks!

nieldeokar avatar Jan 25 '18 08:01 nieldeokar

Actually in my app I am using FileUtils class for detecting incoming file Uri's from other apps. In which files coming from whatsapp were failing to resolve into their actual Uri. Anyone using FileUtils for same purpose would get benefited from it so I made the pull request.

But since FileChooserExample doesn't allow us to browse files from whatsapp it doesn't make any sense here. If you still want to test this feature you can add this intent-filter to FileChooserExampleActivity and check if you are able to resolve the Uri of whatsapp files.

<intent-filter>
              <action android:name="android.intent.action.SEND_MULTIPLE" />
              <action android:name="android.intent.action.SEND" />
              <category android:name="android.intent.category.DEFAULT" />
              <data android:mimeType="image/*" />
</intent-filter>

nieldeokar avatar Jan 25 '18 08:01 nieldeokar

@nieldeokar its already included but it still does not work

nik910 avatar Jan 25 '18 09:01 nik910