Highlighted

I can not set the iOS MicroPhone permission with AIR SDK 24 or higher.

New Here ,
May 14, 2018

Copy link to clipboard

Copied

I can not set the iOS MicroPhone permission with AIR SDK 24 or higher.

I am using AIR 23 and are working on solutions in relation to the following two articles.

Adobe Air SDK 29 is not accepted by Apple

Adobe Air SDK 29 is not accepted by Apple

The application was rejected from the APP store yesterday.

Unable to set iOS camera permissions with AIR SDK 24

Unable to set iOS camera permissions with AIR SDK 24

Camera permissions could be solved in the following way.

12/13/2016 - Release - AIR 24 Runtime and SDK

cam.requestPermission();

However, setting microphone permissions tried up to AIR 24-29, but it does not work.

mic.requestPermission();

I also tested AIR 30 Beta, but it was useless.

The iOS application terminates abnormally with this description.

It seems to be supported by third party ANE, but is there a function with AIR standard ?

https://www.myflashlabs.com/product/native-access-permission-check-settings-menu-air-native-extensio...

TOPICS
Development

Views

2.6K

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

I can not set the iOS MicroPhone permission with AIR SDK 24 or higher.

New Here ,
May 14, 2018

Copy link to clipboard

Copied

I can not set the iOS MicroPhone permission with AIR SDK 24 or higher.

I am using AIR 23 and are working on solutions in relation to the following two articles.

Adobe Air SDK 29 is not accepted by Apple

Adobe Air SDK 29 is not accepted by Apple

The application was rejected from the APP store yesterday.

Unable to set iOS camera permissions with AIR SDK 24

Unable to set iOS camera permissions with AIR SDK 24

Camera permissions could be solved in the following way.

12/13/2016 - Release - AIR 24 Runtime and SDK

cam.requestPermission();

However, setting microphone permissions tried up to AIR 24-29, but it does not work.

mic.requestPermission();

I also tested AIR 30 Beta, but it was useless.

The iOS application terminates abnormally with this description.

It seems to be supported by third party ANE, but is there a function with AIR standard ?

https://www.myflashlabs.com/product/native-access-permission-check-settings-menu-air-native-extensio...

TOPICS
Development

Views

2.6K

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
May 14, 2018 0
Adobe Employee ,
May 14, 2018

Copy link to clipboard

Copied

Hi,

Can you please make sure you're using cocoa key NSMicrophoneUsageDescription with AIR 30 in you application descriptor as:

Let us know if you still face issues.

Thanks!

Pravishti | Adobe AIR Engineering

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...
May 14, 2018 0
New Here ,
May 15, 2018

Copy link to clipboard

Copied

Hi 

>Can you please make sure you're using cocoa key NSMicrophoneUsageDescription with AIR 30 in you application descriptor

I tried it.

The microphone request Permission dialog is not displayed and cannot be attached.

I am testing it with simple sample code.(Animate CC 2015 Air 30+iPad OS 10.0.2 or iphone6 11.3.1)

Animate emulator will work without problems.

When you publish an application to the test device, the microphone does not recognize it.
Disabling "microphone" will work.
--------------------------------------------------------------------------------------

import flash.display.Sprite;

import flash.display.StageAlign;

import flash.display.StageScaleMode;

import flash.events.PermissionEvent;

import flash.media.Camera;

import flash.media.Microphone;

import flash.media.Video;

import flash.permissions.PermissionStatus;

var video:Video;

var cam:Camera;

var microphone:Microphone;

var nc:NetConnection = null;

var nsPublish:NetStream = null;          

             

if (Camera.isSupported)

            {

                cam = Camera.getCamera();

                if (Camera.permissionStatus != PermissionStatus.GRANTED)

                {

                    cam.addEventListener(PermissionEvent.PERMISSION_STATUS, function(e:PermissionEvent):void {

                        if (e.status == PermissionStatus.GRANTED)

                        {

                            connectCamera();

                        }

                        else

                        {

                            // permission denied

                        }

                    });

                    try {

                        cam.requestPermission();

                    } catch(e:Error)

                    {

                        // another request is in progress

                    }

                }

                else

                {

                    connectCamera();

                }

            }

function connectCamera():void

{

nc = new NetConnection();

nc.connect("rtmp://Streaming_Server_name:1935/liveapplication_name");

nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus);

}

function ncOnStatus(infoObject:NetStatusEvent)

{

trace("nc: "+infoObject.info.code+" ("+infoObject.info.description+")");

if (infoObject.info.code == "NetConnection.Connect.Success"){

nsPublish = new NetStream(nc);

cam.setMode(640,360, 30);

cam.setQuality(0, 70);

video = new Video(640, 360);

video.attachCamera(cam);

addChild(video);

microphone = Microphone.getMicrophone();

trace("microphone="+Microphone.names);

microphone.codec=SoundCodec.NELLYMOSER;

microphone.rate=44;

microphone.gain=60;

microphone.setSilenceLevel(0);

nsPublish.attachCamera(cam);

nsPublish.attachAudio(microphone);

nsPublish.publish("myStream");

trace("TEST LIVE");

}

}

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...
May 15, 2018 0
Adobe Employee ,
May 15, 2018

Copy link to clipboard

Copied

Hi,

From the code you've attached, mic.requestPermission() is missing. Add this line to your code and let us know if you still face issues.

Thanks!

Pravishti | Adobe AIR Engineering

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...
May 15, 2018 0
New Here ,
May 15, 2018

Copy link to clipboard

Copied

Thank you for quick answer.

Great!
As you said, I added a source as below and it worked.

Action Script modification from AIR 23 to AIR 30 seems to be OK.

One problem was found.

*Animate CC 2015 Air 30+iPad OS 10.0.2

The application icon is displayed on the test device. Camera and microphone were detected.

*Animate CC 2015 Air 30+iPhone OS 11.3.1

The application icon does not appear on the test device. Camera and microphone have been detected.

Application icon does not display properly on test device iOS 11.3.1. Will this be fixed in the future?

----------------------------------------------

import flash.display.Sprite;

import flash.display.StageAlign;

import flash.display.StageScaleMode;

import flash.events.PermissionEvent;

import flash.media.Camera;

import flash.media.Microphone;

import flash.media.Video;

import flash.permissions.PermissionStatus;

var video:Video;

var cam:Camera;

var microphone:Microphone;

var nc:NetConnection = null;

var nsPublish:NetStream = null;        

           

if (Camera.isSupported)

            {

                cam = Camera.getCamera();

                if (Camera.permissionStatus != PermissionStatus.GRANTED)

                {

                    cam.addEventListener(PermissionEvent.PERMISSION_STATUS, function(e:PermissionEvent):void {

                        if (e.status == PermissionStatus.GRANTED)

                        {

                            connectCamera();

                        }

                        else

                        {

                            // permission denied

                        }

                    });

                    try {

                        cam.requestPermission();

                    } catch(e:Error)

                    {

                        // another request is in progress

                    }

                }

                else

                {

                    connectCamera();

                }

            }

function connectCamera():void

{

nc = new NetConnection();

nc.connect("rtmp://Streaming_Server_name:1935/liveapplication_name");

nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus);

}

function ncOnStatus(infoObject:NetStatusEvent)

{

//trace("nc: "+infoObject.info.code+" ("+infoObject.info.description+")");

if (infoObject.info.code == "NetConnection.Connect.Success"){

nsPublish = new NetStream(nc);

cam.setMode(640,360, 30);

cam.setQuality(0, 70);

video = new Video(640, 360);

video.attachCamera(cam);

addChild(video);

if (Microphone.isSupported)

{

microphone = Microphone.getMicrophone();

if (Microphone.permissionStatus != PermissionStatus.GRANTED)

{

microphone.addEventListener(PermissionEvent.PERMISSION_STATUS, function(e:PermissionEvent):void {

if (e.status == PermissionStatus.GRANTED)

{

rtmp_publish();

}

else

{

// permission denied

}

});

try {

microphone.requestPermission();

} catch(e:Error)

{

// another request is in progress

}

}

else

{

rtmp_publish();

}

}

}

}

function rtmp_publish()

{

trace("microphone="+Microphone.names);

microphone.codec=SoundCodec.NELLYMOSER;

microphone.rate=44;

microphone.gain=60;

microphone.setSilenceLevel(0);

nsPublish.attachCamera(cam);

nsPublish.attachAudio(microphone);

nsPublish.publish("myStream");

trace("TEST LIVE");

}

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...
May 15, 2018 0
Adobe Employee ,
May 15, 2018

Copy link to clipboard

Copied

Hi,

For icons to be visible on iOS 11 and above, you need to package Assets.car along with the application descriptor and swf as any other resource. For details on creating Assets.car, please refer Release Notes Flash Player 28 AIR 28​.

Thanks!

Pravishti | Adobe AIR Engineering

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...
May 15, 2018 0
New Here ,
May 16, 2018

Copy link to clipboard

Copied

The icon of iOS 11 was solved.

The camera and microphone permissions are resolved.

This time, I have trouble with Geolocation's permission.

Added the following to InfoAdditions of app.xml.

<key>NSLocationWhenInUseUsageDescription</key>

<string>You need GPS permission to display location information on the map.</string>

geo_location.requestPermission does not work.

Please look at the Sample Code.

geo_location.locationAlwaysUsePermission=false;

I set to use GPS when using the application.

It seems that it was added from AIR 29, but is there any problem?

--------------------------------Sample----------------------------

import flash.display.Sprite;

import flash.display.StageAlign;

import flash.display.StageScaleMode;

import flash.events.PermissionEvent;

import flash.media.Camera;

import flash.media.Microphone;

import flash.media.Video;

import flash.permissions.PermissionStatus;

var video:Video;

var cam:Camera;

var microphone:Microphone;

var nc:NetConnection = null;

var nsPublish:NetStream = null;       

var geo_location;

function connectGPS(){

if (Geolocation.isSupported)

{

geo_location = new Geolocation();

geo_location.locationAlwaysUsePermission=false;

//geo_location.setRequestedUpdateInterval(10000);

//geo_location.addEventListener(GeolocationEvent.UPDATE,gps_event);

if (Geolocation.permissionStatus != PermissionStatus.GRANTED)

{

geo_location.addEventListener(PermissionEvent.PERMISSION_STATUS, function(e:PermissionEvent):void {

if (e.status == PermissionStatus.GRANTED)

{

   rtmp_publish();

}

else

{

// permission denied

}

});

try {

geo_location.requestPermission();//No Good!

} catch(e:Error)

{

// another request is in progress

}

}

else

{

rtmp_publish();

}

}

}

///////////I am correcting the previous sample  /////////////////////////////    

if (Camera.isSupported)

            {

                cam = Camera.getCamera();

                if (Camera.permissionStatus != PermissionStatus.GRANTED)

                {

                    cam.addEventListener(PermissionEvent.PERMISSION_STATUS, function(e:PermissionEvent):void {

                        if (e.status == PermissionStatus.GRANTED)

                        {

                            connectCamera();

                        }

                        else

                        {

                            // permission denied

                        }

                    });

                    try {

                        cam.requestPermission();//OK!

                    } catch(e:Error)

                    {

                        // another request is in progress

                    }

                }

                else

                {

                    connectCamera();

                }

            }

function connectCamera():void

{

nc = new NetConnection();

nc.connect("rtmp://Streaming_Server_name:1935/liveapplication_name");

nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus);

}

function ncOnStatus(infoObject:NetStatusEvent)

{

//trace("nc: "+infoObject.info.code+" ("+infoObject.info.description+")");

if (infoObject.info.code == "NetConnection.Connect.Success"){

nsPublish = new NetStream(nc);

cam.setMode(640,360, 30);

cam.setQuality(0, 70);

video = new Video(640, 360);

video.attachCamera(cam);

addChild(video);

if (Microphone.isSupported)

{

microphone = Microphone.getMicrophone();

if (Microphone.permissionStatus != PermissionStatus.GRANTED)

{

microphone.addEventListener(PermissionEvent.PERMISSION_STATUS, function(e:PermissionEvent):void {

if (e.status == PermissionStatus.GRANTED)

{

connectGPS();

}

else

{

// permission denied

}

});

try {

microphone.requestPermission();    //OK!

} catch(e:Error)

{

// another request is in progress

}

}

else

{

connectGPS();

}

}

}

}

function rtmp_publish()

{

trace("microphone="+Microphone.names);

microphone.codec=SoundCodec.NELLYMOSER;

microphone.rate=44;

microphone.gain=60;

microphone.setSilenceLevel(0);

nsPublish.attachCamera(cam);

nsPublish.attachAudio(microphone);

nsPublish.publish("myStream");

trace("TEST LIVE");

}

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...
May 16, 2018 0
Adobe Employee ,
May 16, 2018

Copy link to clipboard

Copied

Hi,

Can you please specify whether you're using iOS 10 or 11 and what is the exact problem you're facing i.e. permission dialog not popping up or app crashing etc.

Thanks!

Pravishti | Adobe AIR Engineering

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...
May 16, 2018 0
New Here ,
May 16, 2018

Copy link to clipboard

Copied

*Animate CC 2015 Air 30+iPad OS 10.0.2

The GPS dialog will be displayed.

However, the defined character string is not displayed.

<string>You need GPS permission to display location information on the map.</string>

The reason is 'Required by Apple'

*Animate CC 2015 Air 30+iPhone OS 11.3.1

There are the following problems.

A dialog is not displayed.

The application will not crash.

Processing seems to stop there.(geo_location.requestPermission();)

Thank you.

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...
May 16, 2018 0
New Here ,
May 16, 2018

Copy link to clipboard

Copied

GPS was always allowed in iOS 10 iPad application.

It can not be allowed only when used.

Thank you.

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...
May 16, 2018 0
Adobe Employee ,
May 17, 2018

Copy link to clipboard

Copied

Hi,

Can you please check once with adding the cocoa key NSLocationAlwaysUsageDescription and let us know if you still face issues.

Thanks!

Pravishti | Adobe AIR Engineering

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...
May 17, 2018 0
New Here ,
May 17, 2018

Copy link to clipboard

Copied

<key>NSLocationAlwaysUsageDescription</key>

<string>You need GPS permission to display location information on the map.</string>

Added to XML.

*Animate CC 2015 Air 30+iPad OS 10.0.2

The GPS dialog will be displayed.

geo_location.locationAlwaysUsePermission=true;(Last Time it was false.)

<string>You need GPS permission to display location information on the map.</string>

The reason is 'You need GPS permission to display location information on the map.'

It was the same message as XML.

iOS 10 recognized that GPS is always used.

*Animate CC 2015 Air 30+iPhone OS 11.3.1

There is no change in behavior.

 There are the following problems.

 A dialog is not displayed.

 The application will not crash.

 Processing seems to stop there.(geo_location.requestPermission();)

It is the same even if "NSLocationWhenInUseUsageDescription" is deleted.(Case iOS11.3.1)

Thank you.

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...
May 17, 2018 0
New Here ,
May 17, 2018

Copy link to clipboard

Copied

Updated to AIR SDK : 30.0.0.96(May 17, 2018), but it is the same.

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...
May 17, 2018 0
Adobe Employee ,
May 18, 2018

Copy link to clipboard

Copied

Hi,

We tried at our end with your code and cocoa keys NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription and geolocation permission dialog is popping up for us. Could you please provide your application descriptor so that we can look into the issue further.

Thanks!

Pravishti | Adobe AIR Engineering

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...
May 18, 2018 0
New Here ,
May 20, 2018

Copy link to clipboard

Copied

I will post a part.

<iPhone>

    <requestedDisplayResolution>high</requestedDisplayResolution>

    <assetsCar>Assets.car</assetsCar>

   <InfoAdditions><![CDATA[

<key>CFBundleIconName</key>

<string>AppIcon</string>

<key>NSCameraUsageDescription</key>

<string>You need camera permission to start broadcasting.</string>

<key>NSMicrophoneUsageDescription</key>

<string>You need microphone permission to start broadcasting.</string>

<key>NSLocationAlwaysUsageDescription</key>

<string>You need GPS permission to display location information on the map.</string>

<key>NSLocationWhenInUseUsageDescription</key>

<string>You need GPS permission to display location information on the map.</string>

<key>UIDeviceFamily</key>

<array><string>1</string><string>2</string></array>

]]></InfoAdditions>

</iPhone>

Thank you.

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...
May 20, 2018 0
New Here ,
Jul 06, 2018

Copy link to clipboard

Copied

I have done the latest Adobe AIR 30.0.0.107 SDK Mac, but this problem could not be solved.

No error will occur.

geo_location.requestPermission ();

This command is ignored.

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...
Jul 06, 2018 0
New Here ,
Jul 06, 2018

Copy link to clipboard

Copied

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...
Jul 06, 2018 0
New Here ,
Mar 29, 2019

Copy link to clipboard

Copied

Hi

If I still confirm that this problem has been solved

NSLocationWhenInUseUsageDescription and  NSLocationAlwaysAndWhenInUseUsageDescription  By writing two,it works with ios12.1.

Was it necessary for Apple to let them choose two?

<key>NSLocationWhenInUseUsageDescription</key>

<string>You need GPS permission to display location information on the map.</string>

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>

<string>You need GPS permission to display location information on the map.</string>

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...
Mar 29, 2019 0
Community Beginner ,
Mar 28, 2019

Copy link to clipboard

Copied

I have an app that is calling Microphone.requestPermission, and the alert is never shown.

The permission status callback handler is called and the status is "denied".

We also define this key in our info.plist:

key>NSMicrophoneUsageDescription</key>

<string>iRead requires microphone access to record students reading.</string>

Must I use the ANE above?

I am currently using AIR 31.

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...
Mar 28, 2019 0
Advocate ,
Mar 29, 2019

Copy link to clipboard

Copied

I don't know how that works with microphones, but for notifications on iOS, if the user rejects to give the permission the first time he was asked, you can not show the popup again. The only way to enable notifications is then to tell the user to go to system settings and give the permission there. Apple will only show the popup once, not the second or third time you ask the user. Maybe it is similar with the microphone permission?

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...
Mar 29, 2019 0
Community Beginner ,
Mar 29, 2019

Copy link to clipboard

Copied

In my case, the alert has *never* been shown.

I'm trying to determine how to get it to be shown ever.

Apparently, it should be shown the first time we get requestPermission().

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...
Mar 29, 2019 0
Community Beginner ,
Apr 01, 2019

Copy link to clipboard

Copied

My problem (with seeing the Microphone permission alert) was solved. I had misplaced my addition of NSMicrophoneUsageDescription in info.plist as part of another embedded dictionary (NSAppTransportSecurity) instead of being part of the top-level list of keys/values.

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...
Apr 01, 2019 1