-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Request permissions #524
Comments
more progress needs some way to request for permissions at runtime see reflex-frp/reflex-platform#524
The behavior used to be that when you tried to use a permission that had not been granted, the authorization modal would appear. Somewhere along the way that must have stopped working, probably due to changes in how the android sdk. Relevant code in android-activity I'll look into this. Is the app you're building open source? Perhaps I can use that as a test. |
Oh, I see. kaleidogen. Is there a particular branch I should build? |
This was just an experiment so far, but yeah, check branch You should be able to build the app using |
Maybe I shouldn’t worry about writing to storage, and instead write to the app-internal storage and then use the “send intent” to share the file. But I fear that accessing the API to invoke intents from Haskell is no easier than asking for extra permissions (and I guess in general using any feature of the Android API from Haskell, without writing Java and JNI stuff, is going to be too tricky). |
I wonder if http://hackage.haskell.org/package/jvm would work on Android… |
Doesn’t look like it (yet): tweag/inline-java#92 |
Coming back to this (every few months I am trying to make small improvements). Did your investigation lead to anything? Do you have any apps that save files? |
My Android app should write some files to
/sdcard
. It seems that if I addto the call to
buildApp
and then manually in the App’s settings enable these permissions, I can access the/sdcard
. So that’s a start.But clearly, the proper way is to ask the system at runtime to give the app these permissions.
Is that supported from Haskell (somehow)?
The text was updated successfully, but these errors were encountered: