How to enable SD card for Android Automotive OS emulator?

71 Views Asked by At

When creating an AVD, I am unable to activate the SD card in the steps below.

  • Device manager -> Create Device -> Automotive(1024p landscape) -> Sv2 API 32 (system image) -> Show Advanced Settings(Button) -> Memory and Storage -> Default value is No SD card.

enter image description here

When creating an AVD, the SD card cannot be activated in the case of Automotive OS. But the SD card category is enabled in Device Explorer. So I added mp3 or ogg files to SD card area. It seems that the external area cannot be accessed in the code.

[code] ` String[] selectionArgsMp3 = new String[{MimeTypeMap.getSingleton().getMimeTypeFromExtension("mp3")};

Uri baseUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;

cursor = context.getContentResolver().query(contentUri, projection,
    selectionMimeType, selectionArgsMp3, null);`

[log] 2023-08-21 14:44:49.749 23045-23092 MusicListWorker com.example.samplemediaplayer D getCursor:**content://media/external/audio/media**

0

There are 0 best solutions below