flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Moreau <paul.mor...@zutec.com>
Subject Re: This call requires CameraRoll permission.
Date Tue, 15 Aug 2017 11:59:08 GMT
Android 7 handles permissions differently, more like iOS where it prompts
the user if they want to grant the permission as and when the app requires
the permission, rather than asking the user to agree to all the permissions
stated in the manifest before download.

To get around this, you need to add something like:

if(File.permissionStatus == PermissionStatus.GRANTED)
{
   instance.sig_Complete.dispatch(true);
}
else
{
   var permissionCheck : File = new File(
Functions.getDeviceStoragePath( ).concat("permissionCheck") );


   permissionCheck.addEventListener(PermissionEvent.PERMISSION_STATUS
, function permissionStatusHandler( e : PermissionEvent ) :void
   {
      permissionCheck.removeEventListener(PermissionEvent.PERMISSION_STATUS
, permissionStatusHandler);
      if(e.status == PermissionStatus.GRANTED)
      {
         instance.sig_Complete.dispatch(true);

      }
      else
      {
         showPermissionError();
      }

   });

   try
   {
      permissionCheck.requestPermission();
   }
   catch(error : Error)
   {

      var currentView : View =
FlexGlobals.topLevelApplication.navigator.activeView as View;

      Functions.showToastPopUp( currentView , "Permission error,
please try again" );
   }
}


On Tue, Aug 15, 2017 at 11:51 AM, agm65 <agm65maverick@gmx.de> wrote:

> Hi all,
>
> i have problems accessing the cameraroll:
>
> PermissionError: 'Error #3800: This call requires CameraRoll permission.'
>
> I added this to the manifest:
>
> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
> <uses-permission android:name="android.permission.WRITE_EXTERNAL_
> STORAGE"/>
>
>
> Any ideas?
> Is there something like this?:
> <uses-permission android:name="android.permission.CAMERAROLL"/>
>
> thx for help!
>
>
>
>
> --
> View this message in context: http://apache-flex-users.
> 2333346.n4.nabble.com/This-call-requires-CameraRoll-
> permission-tp15748.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>



-- 






*DISCLAIMER: This electronic message together with any attachments is
confidential. If you are not the intended recipient, do not copy, disclose
or use the contents in any way. Please also advise us by return e-mail that
you have received the message and then please destroy. Zutec  Ltd is not
responsible for any changes made to this message and / or any attachments
after sending by Zutec. We use virus scanning software but exclude all
liability for viruses or anything similar in this email or any attachment.*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message