Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7783637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:53:50+00:00 2026-06-01T19:53:50+00:00

I recently tried out the Compass inside Androids 4.0 API-Demos. It works as long

  • 0

I recently tried out the Compass inside Androids 4.0 API-Demos. It works as long as you hold your phone in portrait-mode, but as soon as you put it into landscape, the “North” is pointing in another direction than before. I thought that it was clearly stated here that

The coordinate-system is defined relative to the screen of the phone in its default orientation. The axes are not swapped when the device’s screen orientation changes.

But thats exactly what happens!

Why the Compass is pointing to a wrong direction? Is the above statement untrue, or is it just a bug inside the computation of the data by the API-samples?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:53:52+00:00Added an answer on June 1, 2026 at 7:53 pm

    the compass demo is indeed incomplete. You need to take the device orientation into account when drawing a compass on the screen.
    Have a look at this question for more details.

    This is also a nice discussion of the subject.

    I also have a working example on my github you can use. (its too much code to paste in here) The relevant classes are CompassSensorListener.java and CompassHelper.java.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently tried to work out how the solution to a ThreadPool class works
I recently tried to figure out how to use freeglut with NetBeans 7. I
I recently tried to pull some results and was struggling to work out the
I have been recently digging into Mobile Programming, I practically tried out the J2ME
I recently obtained the l0pht-CD for windows and tried it out on my PC
I recently tried out a Free-To-Play MMORPG game called AIKA While trying the game
I have recently tried to use the php mail function to send out confirmation
I use VS10 and recently NuGet1.6 came out and I tried to do normal
I recently tried to combine SEAM and GWT in a project - but failed
I recently tried using the Cloud9 online IDE . It starts by creating a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.