Android permissions

Andrew Ferguson andrewferguson500 at gmail.com
Fri Aug 24 17:56:43 EDT 2018


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" <use-livecode at lists.runrev.com> 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
><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 at 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         |     jacque at hyperactivesw.com
>>> HyperActive Software           |     http://www.hyperactivesw.com
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at 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 at 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         |     jacque at hyperactivesw.com
>HyperActive Software           |     http://www.hyperactivesw.com
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list