Highlighted

No longer able to take screenshots, despite permissions

New Here ,
Nov 07, 2018

Copy link to clipboard

Copied

I have a domotics related app that is able to take still images from a video-stream (surveillance) and store them on your phone.
This used to work.
Testers and early adopters have informed me that the new release just throws an error that the app is unable to store the picture.

I looked into it and came across this similar question: AIR 24 beta "Error #3800: This call requires CameraRoll permission."

The accepted answer seems to be to include WRITE_EXTERNAL_STORAGE permission in the manifest.
This is my current manifest:

<android>

  <colorDepth>16bit</colorDepth>

        <manifestAdditions><![CDATA[      

<manifest android:installLocation="auto" >

    <!--See the Adobe AIR documentation for more information about setting Google Android permissions-->

    <!--Removing the permission android.permission.INTERNET will have the side effect of preventing you from debugging your application on your device-->

    <!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->

    <!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>-->

    <!--The DISABLE_KEYGUARD and WAKE_LOCK permissions should be toggled together in order to access AIR's SystemIdleMode APIs-->

    <!--<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>-->

    <!--<uses-permission android:name="android.permission.WAKE_LOCK"/>-->

    <!--<uses-permission android:name="android.permission.CAMERA"/>-->

    <!--<uses-permission android:name="android.permission.RECORD_AUDIO"/>-->

    <!--The ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE permissions should be toggled together in order to use AIR's NetworkInfo APIs-->

       

    <uses-permission android:name="android.permission.INTERNET"/>

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

   

    <uses-feature android:name="android.software.leanback" android:required="false" />

    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />

   

    <uses-sdk android:minSdkVersion="26" />

   

    <application>

                    <activity>

                        <intent-filter>

                            <action android:name="android.intent.action.MAIN"/>

                            <category android:name="android.intent.category.LAUNCHER"/>

                            <!--<category android:name="android.intent.category.LEANBACK_LAUNCHER" />-->

                        </intent-filter> 

                    </activity>

                </application>

</manifest>

]]></manifestAdditions>

</android>

Yet it does not work.
When I check on my (android) phone (App permissions > App permissions > Storage > {NAME OF APP}) I see that the slider is in the 'off' position.
Turning the Storage permissions on makes this problem go away.

What am I missing?

TOPICS
Development

Views

137

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

No longer able to take screenshots, despite permissions

New Here ,
Nov 07, 2018

Copy link to clipboard

Copied

I have a domotics related app that is able to take still images from a video-stream (surveillance) and store them on your phone.
This used to work.
Testers and early adopters have informed me that the new release just throws an error that the app is unable to store the picture.

I looked into it and came across this similar question: AIR 24 beta "Error #3800: This call requires CameraRoll permission."

The accepted answer seems to be to include WRITE_EXTERNAL_STORAGE permission in the manifest.
This is my current manifest:

<android>

  <colorDepth>16bit</colorDepth>

        <manifestAdditions><![CDATA[      

<manifest android:installLocation="auto" >

    <!--See the Adobe AIR documentation for more information about setting Google Android permissions-->

    <!--Removing the permission android.permission.INTERNET will have the side effect of preventing you from debugging your application on your device-->

    <!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->

    <!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>-->

    <!--The DISABLE_KEYGUARD and WAKE_LOCK permissions should be toggled together in order to access AIR's SystemIdleMode APIs-->

    <!--<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>-->

    <!--<uses-permission android:name="android.permission.WAKE_LOCK"/>-->

    <!--<uses-permission android:name="android.permission.CAMERA"/>-->

    <!--<uses-permission android:name="android.permission.RECORD_AUDIO"/>-->

    <!--The ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE permissions should be toggled together in order to use AIR's NetworkInfo APIs-->

       

    <uses-permission android:name="android.permission.INTERNET"/>

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

   

    <uses-feature android:name="android.software.leanback" android:required="false" />

    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />

   

    <uses-sdk android:minSdkVersion="26" />

   

    <application>

                    <activity>

                        <intent-filter>

                            <action android:name="android.intent.action.MAIN"/>

                            <category android:name="android.intent.category.LAUNCHER"/>

                            <!--<category android:name="android.intent.category.LEANBACK_LAUNCHER" />-->

                        </intent-filter> 

                    </activity>

                </application>

</manifest>

]]></manifestAdditions>

</android>

Yet it does not work.
When I check on my (android) phone (App permissions > App permissions > Storage > {NAME OF APP}) I see that the slider is in the 'off' position.
Turning the Storage permissions on makes this problem go away.

What am I missing?

TOPICS
Development

Views

138

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 07, 2018 0
Adobe Community Professional ,
Nov 07, 2018

Copy link to clipboard

Copied

With Android prior to version 6 you would have declared all of your permissions up front, and the user approves them when the app is installed. From Android 6 onwards it started to work in the way that iOS does, that is, at the time you use the feature the user is prompted for permission.

If you have code that assumes the older way of working, but you're publishing for Android 6 and later, it won't work. See this article on how to change your code so that it asks permission at the time the feature is needed:

http://fpdownload.macromedia.com/pub/labs/flashruntimes/shared/air24_flashplayer24_releasenotes.pdf

Up until a week ago you could work around this issue by setting the minimum SDK version to something older than 22:

<uses-sdk android:minSdkVersion="14"/>

for example. But, since November 1st Google require that you support the later SDK, so now you'll have to make the changes shown in that article.

If it's just an internal app, or it's just for the Amazon Appstore, you could use the line I gave, and then the permissions would be accepted when the app is installed.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 07, 2018 0