Hi Frederick,
You are not using the access mode when calling permissions.get() and I
think you need to. Take a look at what the settings app is doing to get
the app's permissions.
Fabrice
On 07/29/2014 07:31 AM, Frederik Braun wrote:
> Some additional notes:
> Here's what I did, for others to reproduce always getting an "unknown":
> https://github.com/mozfreddyb/permissions-app/blob/master/js/app.js#L26
>
> I *do* get a proper return value (e.g. "allow) when I execute the code
> from the debugger (app-manager).
>
>
>
> On 29.07.2014 13:05, Frederik Braun wrote:
>> Hi,
>>
>> I am sketching a permissions control app. The app is meant for privacy
>> nuts like myself, who are willing to shoot their foot knowing that
>> disabling certain permissions might cause some apps not to work :)
>>
>> Thus, the app will list all permissions. Even the ones we consider not
>> to be very useful for end users in the settings app.
>>
>> I am currently using the Permissions API snippet as documented in
>> MDN[1], but it always yields "unknown".
>>
>> (I managed to work around the typos on MDN and edited the article
>> (manifest.permission instead of manifest.permissions. And "origine"
>> instead of "origin".))
>>
>>
>> Any clues?
>>
>>
>> Thanks,
>> Frederik
>>
>>
>> [1]
>> <https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API#Reading_permission>
>> _______________________________________________
>> dev-b2g mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-b2g
>>
>
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
>
--
Fabrice Desré
b2g team
Mozilla Corporation
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g