Re: Android permissions
On 8/24/18 5:46 PM, Andrew Ferguson via use-livecode wrote: Or even just have the blockedPermissions, which would be checked by the app when using a device feature. That could be useful. +1 I couldn't see "androidRequestPermission" in the dictionary It's in the latest 9.0.1(rc 2). Brand new. -- 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
Re: Android permissions
That's good to hear. I was worried it might either be a design decision or a technical limitation. Is there an open bug/enhancement report I can subscribe to to be notified of progress on this (and if not, should I open one)? It also might be nice (and apologies if this already exists) to have a function of some sort called the givenPermissions or something similar, that lists all the permissions that have been granted. A similar function, say the blockedPermissions could maybe list ones that have been asked before but not granted. Or even just have the blockedPermissions, which would be checked by the app when using a device feature. If that feature has been explicitly blocked by the user, do something else, otherwise use the feature as intended and let the underlying system deal with permission requests. Just a thought, really. I couldn't see "androidRequestPermission" in the dictionary so I am not sure what is/isn't available at the moment. On 24/08/18 23:11, Monte Goulding via use-livecode wrote: Yes it hasn’t been done yet but adding a similar api to the new handlers to the android-utils module is probably the most sensible so it can be reused easily. ___ 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
Re: Android permissions
> On 25 Aug 2018, at 7:56 am, Andrew Ferguson via use-livecode > wrote: > > Is there any particular reason it cannot be altered for LCB as well? I'm all > for the "it just works" approach. Otherwise it would seem a bit of a > limitation in LCB. Yes it hasn’t been done yet but adding a similar api to the new handlers to the android-utils module is probably the most sensible so it can be reused easily. Cheers Monte ___ 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
Re: Android permissions
Is there any particular reason it cannot be altered for LCB as well? I'm all for the "it just works" approach. Otherwise it would seem a bit of a limitation in LCB. On 24 August 2018 22:32:04 BST, "J. Landman Gay via use-livecode" wrote: >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 >, >> you have to explicitly ask for permission to record audio, so you'll >need >> to call . >> >> 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 ___ 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
Re: Android permissions
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 , you have to explicitly ask for permission to record audio, so you'll need to call . 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
Re: Android permissions
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 , you have to explicitly ask for permission to record audio, so you'll need to call . 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
Android permissions
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