Thank you for your reply. 

Unfortunately I am not familiar enough with program text sourcecode to 
unterstand what I should do now to solve the problem. 

All my other apps manage to write on my SD card.

Some of them after explicit confirming writing rights.

Only K-9 ignores every permittion granted and refuses to write on my SD card.

My Sony Xperia Z5 Premium has a built in storage memory named "emulated SD 
storage" of only 7 GB left.

And I have a 128 GB Micro SD installed which is called "external SD".

I would like K-9 to write on this external SD, but K-9 permanently fails to do 
so.

So, what should I do now?


-------- Ursprüngliche Nachricht --------
Von: sjb <[email protected]>
Gesendet: 26. Dezember 2018 21:43:50 MEZ
An: [email protected]
Betreff: Re: [k-9-mail] Re: K9 doesn't write to sd card

On 26/12/2018 20:19, Uwe Deutscher wrote:
> No, definitly not!
> 
> I have a Sony Xperia Z5 Premium under Android 7.2 and the latest version of 
> K-9.
> 
> The problem started immediately with my migration from HTC Sensation under 
> Android 4.x to this smartphone.
> 
> K-9 refuses to write to the external SD although all necessary rights have 
> been granted.

DISCLAIMER: I'm not a k-9 dev. I'm not even a Java dev.

https://github.com/k9mail/k-9/blob/master/app/core/src/main/java/com/fsck/k9/mailstore/StorageManager.java#L380

"Environment.getExternalStorageDirectory();"

https://developer.android.com/reference/android/os/Environment#getExternalStorageDirectory()

"Note: don't be confused by the word "external" here. This directory can 
better be thought as media/shared storage. It is a filesystem that can 
hold a relatively large amount of data and that is shared across all 
applications (does not enforce permissions). Traditionally this is an SD 
card, but it may also be implemented as built-in storage in a device 
that is distinct from the protected internal storage and can be mounted 
as a filesystem on a computer.

On devices with multiple users (as described by UserManager), each user 
has their own isolated shared storage. Applications only have access to 
the shared storage for the user they're running as."

Multiple user profiles were introduced in 4.2 .. which I presume 
coincides with the recommendation to use getExternalStorageDirectory()

So it seems to me (see the disclaimer above) that K-9 is "doing the 
right thing" here as per Android's own developer guidelines. Maybe it's 
time to remove the references to external SD cards from the UI.

sjb


-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

-- 
You received this message because you are subscribed to the Google Groups "K-9 
Mail" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to