Skip to content

Conversation

atsushieno
Copy link

First of all, java.io.File.createtempFile() causes "permission denied"
error unless it is explicitly passed a path that is known to be writable.
http://stackoverflow.com/questions/3660572/android-createtempfile-throws-permission-denied

To fix this, we need Android's Context instance, which is expected to
be supplied by AndroidSuppport.setApplication() method (which is specific
to Android version build).
However, this File.createTempFile() is called by Platform, and Platform
class is already initialized when AndroidSupport is getting initialized.

So, the entire Platform initialization cycle is broken for Android now.

To fix this issue, I had to make API breaking change to add another
room for Android's Application (Context) outside this Platform loop
so that it can be safely initialized.

First of all, java.io.File.createtempFile() causes "permission denied"
error unless it is explicitly passed a path that is known to be writable.
http://stackoverflow.com/questions/3660572/android-createtempfile-throws-permission-denied

To fix this, we need Android's Context instance, which is expected to
be supplied by AndroidSuppport.setApplication() method (which is specific
to Android version build).
However, this File.createTempFile() is called by Platform, and Platform
class is already initialized when AndroidSupport is getting initialized.

So, the entire Platform initialization cycle is broken for Android now.

To fix this issue, I had to make API breaking change to add another
room for Android's Application (Context) outside this Platform loop
so that it can be safely initialized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant