Highlighted

geolocation on iphonex not working

Explorer ,
Sep 17, 2018

Copy link to clipboard

Copied

i am using the "show geolocation" snippet on IPHONE X with animate  cc 2018 AIR30 however i keep getting the ""Geolocation is not supported on this device." message.

need help

TOPICS
Development

Views

564

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

geolocation on iphonex not working

Explorer ,
Sep 17, 2018

Copy link to clipboard

Copied

i am using the "show geolocation" snippet on IPHONE X with animate  cc 2018 AIR30 however i keep getting the ""Geolocation is not supported on this device." message.

need help

TOPICS
Development

Views

565

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
Sep 17, 2018 0
Explorer ,
Sep 18, 2018

Copy link to clipboard

Copied

Hi There,

We tried using the "show geolocation" snippet with animate cc 2018 on iPhone X AIR30 (iOS 11.4.1), it is working fine at our end.

Please provide us with more details of the exact steps or sample code you are using.

Thanks,

Rabab | 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...
Sep 18, 2018 0
Explorer ,
Sep 18, 2018

Copy link to clipboard

Copied

thank you

this is the package used.

when test on device via usb i can see only the frame - no content.

 

package

{

    import flash.display.Sprite;

    import flash.display.StageAlign;

    import flash.display.StageScaleMode;

    import flash.events.GeolocationEvent;

    import flash.events.MouseEvent;

    import flash.events.StatusEvent;

    import flash.sensors.Geolocation;

    import flash.text.TextField;

    import flash.text.TextFormat;

   

    public class GeolocationTest extends Sprite

    {

       

        private var geo:Geolocation;

        private var log:TextField;

       

        public function GeolocationTest()

        {           

            super();

            stage.align = StageAlign.TOP_LEFT;

            //stage.scaleMode = StageScaleMode.FULL

//NO_SCALE;

            setUpTextField();

           

            if (Geolocation.isSupported)

            {

                geo = new Geolocation();

                if (!geo.muted)

                {

                    geo.addEventListener(GeolocationEvent.UPDATE, geoUpdateHandler);

                }

                geo.addEventListener(StatusEvent.STATUS, geoStatusHandler);

            }

            else

            {

                log.text = "Geolocation not supported";

            }

        }

       

        public function geoUpdateHandler(event:GeolocationEvent):void

        {

            log.text = "latitude : " + event.latitude.toString() + "\n";

            log.appendText("longitude : " + event.longitude.toString() + "\n");

        }

       

        public function geoStatusHandler(event:StatusEvent):void

        {

            if (geo.muted)

                geo.removeEventListener(GeolocationEvent.UPDATE, geoUpdateHandler);

            else

                geo.addEventListener(GeolocationEvent.UPDATE, geoUpdateHandler);

        }

       

        private function setUpTextField():void

        {

            log = new TextField();

            var format:TextFormat = new TextFormat("_sans", 24);

            log.defaultTextFormat = format;

            log.border = true;

            log.wordWrap = true;

            log.multiline = true;

            log.x = 10;

            log.y = 10;

            log.height = stage.stageHeight - 20;

            log.width = stage.stageWidth - 20;

            log.addEventListener(MouseEvent.CLICK, clearLog);

            addChild(log);

        }

        private function clearLog(event:MouseEvent):void

        {

            log.text = "";

        }

    }

}

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...
Sep 18, 2018 0
Engaged ,
Sep 18, 2018

Copy link to clipboard

Copied

Have you added all of the NSLocation tags in the InfoAdditions section of the application XML for iOS?  I believe if you don't add these, the iPhone will say that it's not supported:

<InfoAdditions>

  <![CDATA[

  <key>NSLocationAlwaysUsageDescription</key>

  <string>Sample description to allow geolocation always</string>

  <key>NSLocationWhenInUseUsageDescription</key>

  <string>Sample description to allow geolocation when application is in foreground</string>

  <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>

  <string>Sample description to allow geolocation always and when application is in foreground</string>

  ]]>

  </InfoAdditions>

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...
Sep 18, 2018 1
Addons LATEST
Explorer ,
Sep 26, 2018

Copy link to clipboard

Copied

Hi There,

Please add all geolocation tags in app.xml, sample code is working fine if you use below tags.

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>

           <string>Sample description to allow geolocation always</string>

<key>NSLocationWhenInUseUsageDescription</key>

           <string>Sample description to allow geolocation when application is in foreground</string>

<key>NSLocationAlwaysUsageDescription</key>

           <string>Always Required</string>

We have verified same on iPhone X with AIR30/31. Please let me know if this works for you.

Thanks,

Rabab | 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...
Sep 26, 2018 0