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

  • SEARCH
  • Home
  • 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 8041951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:24:07+00:00 2026-06-05T04:24:07+00:00

I have try much but can not make Qibla compass for my application. I

  • 0

I have try much but can not make Qibla compass for my application. I can’t understand what I do. I need Qibla compass that works perfectly.

  • 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-05T04:24:09+00:00Added an answer on June 5, 2026 at 4:24 am

    You know the location of Mecca and you know the users current location (if you have GPS or some other location provider). The bearing is given by this formula, latitudes and longitudes should be in radians.

    float lonDelta = (lon2 - lon1);
    float y = Math.sin(lonDelta) * Math.cos(lat2);
    float x = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(lonDelta);
    float brng = Math.atan2(y, x).toDeg();
    

    brng is the direction in degrees.

    You could also explore the Location.bearingTo() method, see here.

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

Sidebar

Related Questions

I have spent the whole day trying to make my application use threads but
I have attached my design also to try and explain things Pretty much I
I have tried to understand dependency injection and not quite gotten it, except I
Currently i have an application that reads and writes several properties from one or
I have a very old application that now needs to be friendly to Windows
Can I some how make my non-exception objects become 'throwable' so that any local
I find that my application does not look as good in IE as in
I have a complex function (optimisation) that can potentially enter in a loop or
I have been trying everything to try and solve this myself, but cannot find
I'll try here since the mailing list for DM doesn't seem to have much

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.