Closed sseide closed 6 years ago
created pull request #3454 to fix this two issues
Thanks @sseide, please include either a full debug log or the version of TS and Android in bug reports.
@sseide I'm unable to reproduce this when sharing audio and video from TS 2.18.0 tested on my gingerbread phone, and unable to reproduce this when sharing video from TS 2.19.0 tested on my Nexus 5 Lollipop device.
what apps did you use to share the audio and video with TextSecure?
for reference, to test 2.18.0 on GB I used the default gallery app to share video with TS and the included file manager app to share the audio. to test 2.19.0 on Lollipop I used the new Google Photos app to share the video and had no apps installed that would allow me to share audio, lol music labels.
The default gallery app wont work. I believe the import thing here is the point that the audio or video file you want to share must not be indexed by the media scanner. And all pictures from the gallery are...
I discovered this crash when creating an new audio or video file at the sdcard and tried to share this via Android default Intent with the audio/video file name as EXTRA_STREAM.
Tested with last official version from store and master branch from git. Booth crash with an NPE on video files, no crash but error message that file cannot be attached on audio. Android Versions 4.2 and 4.4 testet.
To test for example "adb push" an video file onto the sdcard and send this file from an little helper app to textsecure with code like this:
private void sendIntent(File file) {
Intent intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setType("audio/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
getContext().startActivity(intent);
}
Files not indexed by the media scanner cannot be queried from the contentresolver (in AudioShare and VideoShare) but will be found with the code you already had used in the ShareActivity.
@sseide thanks for the context, this makes sense to me now :)
GitHub Issue Cleanup: See #7598 for more information.
whenever an intent to share video files is send to TextSecure, the app crashes (NullPointerException) sending the message to the recipient.
An similiar problem exists with audio files. They cannot be added, at least TextSecure does not crash here: