Question
I'm developing a Tizen TV application (Tizen 4.0) using Xamarin and need to check if the user has permission to access external storage. I'm using the standard PrivacyPrivilegeManager API:
CheckResult result = PrivacyPrivilegeManager.CheckPermission(permissionname);
switch (result)
{
case CheckResult.Allow:
break;
case CheckResult.Deny:
break;
case CheckResult.Ask:
PrivacyPrivilegeManager.RequestPermission(permissionname);
break;
}
(where permissionname is for mediastorage)
However, when calling CheckPermission, I get this exception:
System.DllNotFoundException: Unable to load shared library 'libcapi-privacy-privilege-manager.so.0' or one of its dependencies...
at Interop.PrivacyPrivilegeManager.CheckPermission(String privilege, CheckResult& result)
at Tizen.Security.PrivacyPrivilegeManager.CheckPermission(String privilege)
The same exception occurs when calling RequestPermission. I've already added the permission in the manifest file but the issue persists. How can I resolve this?
Answer
Problem Understanding
The issue occurs because Samsung Smart TVs (Tizen TV platform) don't support the privacy privilege management system that's available on mobile devices. The required shared library (libcapi-privacy-privilege-manager.so.0) is not present on TV devices.
Solution Methods
- For Samsung Smart TV applications, you don't need to request user consent for storage access permissions.
- Simply access the external storage directly without using PrivacyPrivilegeManager APIs.
- Ensure your application has the proper privileges declared in the manifest file.
Additional Tips
- This limitation is specific to Samsung Smart TV platform (Tizen TV)
- For mobile applications (wearable, mobile), you should continue using PrivacyPrivilegeManager as normal
- Always verify platform-specific API availability when developing for different Tizen profiles