Ane [original] flexmobile IOS/Android Electronic Compass azimuth (1)

Source: Internet
Author: User

 

Ane air native extension local expansion airProgramSource and local environmentCodeInteractive Technology.

This article mainly analyzes the application of ANE technology by obtaining the Electronic Compass data of mobile devices.

 

Azimuth: The moving direction relative to the positive North (in integer ).

 

==========================================

Overview:

I. iOS Azimuth

2. Android Azimuth

1. Android Library

2. ActionScript Library

3. ADT Packaging

4. Demo program

3. Download source code

==========================================

 

IOS Azimuth

When I write xcode code in a VM and encounter the heading attribute of cllocationmanager, Adobe has encapsulated the azimuth data in IOS in the flex API. In essence, it is called by Ane, but Android is not supported.

Geolocationevent

Event. Heading attributes

The moving direction relative to the positive North (in integer ).

Note:Heading is not supported on Android devices.HeadingThe attribute value is alwaysNan(Not a number ).

Call code:

If (geolocation. issupported ){

VaR GEO: geolocation = new geolocation ();

Geo. addeventlistener (geolocationevent. Update, function (Event: geolocationevent): void {

Trace ("Heading --->" + event. Heading); // Azimuth

});

}

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.