语言

Menu
Sites
Language
Xamarin.forms recorder privilege denied forever

Hello Guys,

this is my very first time to ask something in a forum, so please tell me if I don't provide you with enough informations to my question/project.

I'm trying to make a crossplatform app for a tizen and android watch. Both should use a speech-to-text client. I got the tizen one to work in a tizen-only project, but as soon as I use a crossplatform project I can't get it to work. The problem seems to be that I can't ask the user of the app for any permission to use the microphone. 
With the tizen-only project I saw a pop-up which asked the user for permission, but this does not happen with this crossplatform project. 
When calling "PrivacyPrivilegeManager.CheckPermission(recorderPrivilege)" the checkresult says "Deny" and when I request permission via the PrivacyPrivilegeManager and use the RequestResponseEvent its RequestResult is "DenyForever"...

I really don't know what to do. Does anyone have experience with making a crossplatform-project?

Would appreciate any help.

Kindest regards,
Ebru

编辑者为: Ebru Demir 13 1月, 2020

响应

2 回复
Tizen .NET

Hi,

In fact, there's no difference to call "PrivacyPrivilegeManager.CheckPermission(recorderPrivilege)" for tizen-only project and cross-platform project.

Could you check again to see if you request recorder privacy privilege well after reinstalling(uninstall->install) your application?

https://samsung.github.io/Tizen.NET/wearables/how-to-use-the-GalaxyWatch-sensors/#checking-permission-for-hr-sensor

https://developer.tizen.org/development/guides/.net-application/security/privacy-related-permissions

https://developer.tizen.org/development/training/.net-application/security-and-api-privileges#dotnet-api-privileges

Sample code : https://github.com/Samsung/Tizen-CSharp-Samples/blob/master/Wearable/FindPlace/src/FindPlace/FindPlace.Tizen.Wearable/FindPlace.Tizen.Wearable.cs

Please let us know if your problem is not solved.

Thanks.

 

 

Ernest Borowski

All privileges that app want to use should be in it`s manifest file under privileges section, sample below:

    <privileges>
        <privilege>http://tizen.org/privilege/contact.read</privilege>
        <privilege>http://tizen.org/privilege/contact.write</privilege>
        <privilege>http://tizen.org/privilege/location</privilege>
    </privileges>

After you include privilege in manifest file

PrivacyPrivilegeManager.CheckPermission("http://tizen.org/privilege/location")

should return:

Tizen.Security.CheckResult.Ask

state not in

Tizen.Security.CheckResult.Deny

Application can request privileges only when they are in Ask state.

For API reference please take a look at:

https://developer.tizen.org/dev-guide/csapi/api/Tizen.Security.PrivacyPrivilegeManager.html