View Issue Details

IDProjectCategoryView StatusLast Update
0012299MMAGeneralpublic2015-09-08 16:14
Reporterrusty Assigned To 
PriorityimmediateSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.1.0 
Target Version1.1.3Fixed in Version1.1.3 
Summary0012299: Improved external storage handling on Android L
DescriptionAndroid L allows for directories on external storage locations to be shared across multiple apps. If MediaMonkey detects Android L, it should:

a) support this on new installations
b) migrate content from the old App-specific directory to a shared directory
Additional Informationhttp://www.androidauthority.com/lollipop-microsd-card-app-access-564168/
http://developer.android.com/preview/api-overview.html#Storage
TagsNo tags attached.
Attached Files
layout-2015-05-20-235015.png (135,364 bytes)   
layout-2015-05-20-235015.png (135,364 bytes)   
Fixed in build458

Relationships

related to 0012828 resolvedpeke MMA Warn user that Destination folder is not cleared for writing and that default location will be used 
related to 0012927 closedmarek MMA 'Grant access' dialog is confusing and seems to be never ending 
related to 0012962 closedLudek MMW v4 MMA fails to update playlists synced via USB 

Activities

marek

2015-02-24 13:37

developer   ~0042174

http://stackoverflow.com/questions/26744842/how-to-use-the-new-sd-card-access-api-presented-for-lollipop

marek

2015-05-14 15:57

developer   ~0042538

Implemented new Storage Access Framework (SAF):
 - User has to allow folder so MMA can write to it
 - Otherwise the file is still written to /Android/com....mediamonkey/files
 - it is transparent to user whether the tracks are stored to app specific folder or to root dir
 - activity with request to permit paths is shown on startup and user can ignore it. It is also accessible from Options
 - there are changes in Library folders activity. Now there is a list of scanned folders and user can add folder for each storage. Storages that use SAF use system activity that is quite similar to our activity for adding folders.

There are few things to implement:
 a) USB sync has to be done according the permissions too - MMW can get the permitted paths from storageInfo.xml
 b) when user allows some folder - the content should be moved to it from app specific folder
 c) Add quick guide how to use system SAF dialog so user will know how to add permissions. I need to discuss the text with Rusty.

marek

2015-05-20 08:42

developer   ~0042552

Last edited: 2015-05-21 19:08

a) I have added the info about the storage to storageInfo.xml. Here is example:

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<storages version="1.1" storageGuid="e393ad43.0.87a6e8ce-2195-48f7-9abd-abec8b524428">
  <storage>
    <title>Pam?? za?ízení
    </title>
    <path>/storage/emulated/0
    </path>
    <info>/storage/emulated/0/MediaMonkey/files/storageInfo.xml
    </info>
    <type>read-write
    </type>
    <current>1
    </current>
  </storage>
  <storage>
    <title>SD card
    </title>
    <path>/storage/extSdCard
    </path>
    <info>/storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/files/storageInfo.xml
    </info>
    <type>read-write limited
    </type>
    <current>0
    </current>
    <appFolder>/storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files
    </appFolder>
    <folder>/storage/extSdCard/Playlists
    </folder>
    <folder>/storage/extSdCard/Music
    </folder>
  </storage>
</storages>

Writable folders are specified in <folder> tag. MMW can sync directly to them (Example: /storage/extSdCard/Music/Album/Track.mp3).
Other files has to be synced to application specific dir that is specified in <appFolder> tag (Example: /storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/Videos/Album/Track.mp3)

b) implemented

marek

2015-05-20 21:53

developer   ~0042555

Last edited: 2015-05-21 09:30

c) added. Rusty please check this text:


    <string name="storage_permission_paths_intro">Please grant MediaMonkey access to the following folders in order to sync or edit media content within:</string>
    <string name="storage_permission_hint_intro">Please read the following instructions before continuing.</string>
    <string name="storage_permission_hint_1">1. After clicking on CONTINUE button. You will see following dialog. Please click on three dots menu icon.</string>
    <string name="storage_permission_hint_2">2. Select \"Show SD card\" to enable showing all device content.</string>
    <string name="storage_permission_hint_3">3. Select navigation drawer icon on the left side to see all storages.</string>
    <string name="storage_permission_hint_4">4. Now select storage you want to permit, typically \"SD card\".</string>
    <string name="storage_permission_hint_5">5. At this point, you have two options:</string>
    <string name="storage_permission_hint_5a">a) You can click directly on SELECT button at the bottom and permit MediaMonkey access to whole storage. This is the simplest solution.</string>
    <string name="storage_permission_hint_5b">b) This is a bit of a hassle, but you can permit MediaMonkey access to specific folder. Browse the folder (like \"Music\") and then click on SELECT button. NOTE: You will have to repeat this process for each folder you want to permit.</string>

rusty

2015-05-21 15:57

administrator   ~0042559

Last edited: 2015-05-21 17:16

I would suggest the following.

 <string name="storage_permission_paths_intro">MediaMonkey needs access to the following folders in order to sync or edit media content within:</string>
    <string name="storage_permission_hint_intro">To grant access:</string>
    <string name="storage_permission_hint_1">Click the 3 dots menu icon on the following dialog.</string>
    <string name="storage_permission_hint_2">Select "Show SD card" to allow SD card locations to display.</string>
    <string name="storage_permission_hint_3">Tap the navigation icon on the left to display all storage locations.</string>
    <string name="storage_permission_hint_4">Choose the location you want to grant access to, typically \"SD card\" and tap 'Select'.</string>
    <string name="storage_permission_hint_5">If you prefer to grant access to specific folders rather than the entire SD card, browse to individual folders (e.g. \Music\) and Tap 'Select'. Then repeat the process for other folders such as '\Movies\', etc.</string>
    
Note:
- on the first screen, it might be better to show 'Continue' instead of 'Allow', and as discussed, it should include some addition information regarding what happens if access isn't granted:

MediaMonkey needs access to the following folders in order to sync or edit media content within:

..folders..

Without access to these folders, MediaMonkey will sync content to an application-specific folder on the SD card that will be deleted when MediaMonkey is uninstalled. It will also be unable to edit/sync any content in SD card folders such as /Music that are shared with other media applications.

[Cancel] [Continue]

- I've removed step numbers in case the steps change (it complicates localization)

- I would suggest that rather than showing a single 'help' page, that you pop up the hints on top of an animated dialog (or perhaps that's already what you planned).

marek

2015-06-08 11:19

developer   ~0042604

The wizard text is fixed. It is made the easier way with screenshots for now. It is the same way as other apps use for this task too.

I have added a request for allowing the folders before wifi sync too.

User can ignore the dialog and it won't show up till the set of scanned folders is not changed. But it is always accessible from Options too.

Now implementation on MMW side is needed.

Ludek

2015-06-16 12:52

developer   ~0042634

Added in MMW 4.1.8.1748 + merged into 5.0.0

rusty

2015-06-28 20:23

administrator   ~0042674

Last edited: 2015-06-28 20:30

In build 457, as soon as I try to 'select SD card' in the permissions dialog, MMA crashes and sends debug logs (note: this did not occur with build 455). In addition, the 'Tracks' node loads endlessly.

Reproduced as follows:
1 Uninstall MMA and delete MediaMonkey directories
2 Power off / power on the device
3 Install build 457 and run
--> MMA prompts to grant permissions. For some reason, there's no need to enable the SD Card to be shown (presumably because it had been enabled on a previous install).
4 Select the SD card
5 Click the 'select sd card' button
--> debug logs are auto sent and MMA closes.
6 Restart MMA
--> debug logs are auto sent again
7 At this point I manually generated an additional set of logs: X39HMB3E1J
8 Click the 'Tracks' node --> 'loading' appears endlessly.

Tested on alcatel idol 3.

marek

2015-06-29 08:17

developer   ~0042675

Fixed in build 458

1. No need to enable SD card
  - yes, because it is OS driven, it remembers the recent location
2. Crash on button click
  - it was crash during moving files from app specific folder to SD card folder
  - I have added skipping of /files and /artworks dir
  - added better failure management - logs will be sent in case something will go wrong again
3. This is bug from 0012766
  - loading state was not always switched to empty state - fixed

rusty

2015-09-07 04:50

administrator   ~0042907

Build 468 cannot sync to SD card. All tracks fail to sync even after I've deleted the profile and recreated a new one. Tested on Samsung Tab Pro 8.4 running kitkat.

Log: A77AHO7KFD

rusty

2015-09-08 15:01

administrator   ~0042923

Update: the problem is worse than originally described. Synchronization worked correctly for _internal_ storage, but at one point MM crashed, and all data was lost (the db appeared empty after the crash)!!

rusty

2015-09-08 16:14

administrator   ~0042924

Re-resolving and opening a new bug.