Thanks Panos, that helps a lot. I like the automatic dialog, very LC-esque. :)

On 8/24/18 4:23 PM, panagiotis merakos via use-livecode wrote:
Hello Jacque,

Currently all the commands/functions that do stuff which will require
special permissions will trigger the permission dialog automatically.

Then only exception is commands/functions that exist in a LCB library.
Currently the only example that falls into this category is the Android
Audio Recorder Library. So before you call <androidRecorderStartRecording>,
you have to explicitly ask for permission to record audio, so you'll need
to call <androidRequestPermission "android.permission.RECORD_AUDIO">.

The same holds for LCB libraries that we might add in the future, or for
any other APIs you might have wrapped in LCB using FFI, i.e. you have to
explicitly ask for any special permissions.

*>>>>>>>Also, should I check a permission before every usage to be sure
it's enabled? Or do I get an error message?*
If the app tries to do something that requires permission X for the first
time, a dialog will be shown asking for permission X. If the user chooses
to not grant permission X, the dialog will be shown again next time the app
tries to do something that requires permission X, I think the dialog has a
checkbox "Do not ask me again". So in this case, it might be useful to add
a check if permission X has been granted, and if not, show an appropriate
message.

Hope this helps,
Panos
--



On Fri, Aug 24, 2018 at 11:22 PM J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

I was happy to see the new functions for working with Android
permissions. The release notes say:

"Apps built with LC 9.0.1 do support this new permissions model, and
request permissions automatically when the app actually requires the
services or data protected by the services."

It sounds like the permissions dialog will happen without any scripting.
Does this mean the associated commands aren't usually necessary? When
would I need to use AndroidRequestPermission()? Also, should I check a
permission before every usage to be sure it's enabled? Or do I get an
error message?

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to