question

Paolo Brandoli avatar image
Paolo Brandoli asked

MediaScannerConnection.scanFile

On a Kindle Fire HD 9.9 emulator I use MediaScannerConnection.scanFile to notify the creation of a new image file. When the callback method onScanCompleted is called the Uri always contain a reference to an external SD card, that is not installed on the emulator and therefore calling the intent ACTION_VIEW with that Uri fails. MediaScannerConnection.ScanFile shouldn't set that Uri, because the external SD card is not present. On a Galaxy S3 the function scanFile correctly specifies the internal storage in the Uri if the SD card is not present. Is this a limitation of the emulator? Best regards, Paolo Brandoli
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Paolo, Can you please raise a contact us with the complete sample code of how you are trying to scan a media? Message was edited by: Sujoy@Amazon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.