This GitHub repository contains the source code for an Android Compass App developed by Yaxan. The app utilizes Kotlin and Jetpack Compose to create a simple yet functional compass that provides real-time heading information.
- Real-time compass heading display.
- Smooth and responsive compass needle animation.
- Integration with sensors to provide accurate heading data.
- Hilt for dependency injection.
- Utilizes Android's sensor framework for orientation data.
- Clean and well-structured codebase.
To get started with this app, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/YOUR_USERNAME/android-compass-app.git
-
Open the project in Android Studio.
-
Build and run the app on an Android emulator or a physical device.
The app provides a compass view on the home screen, along with the current heading displayed in degrees. The compass needle rotates to reflect the device's orientation, giving you a real-time compass reading.
The app uses the following dependencies and libraries:
- Kotlin
- Jetpack Compose
- Hilt for dependency injection
- Android's Sensor framework for sensor data
- Android's Material Design components for UI elements
Make sure to check the build.gradle
files for specific versions of these dependencies.
HomeScreen.kt
: The main screen of the app, displaying the compass view and current heading.CompassView.kt
: Custom Composable that draws the compass view.HomeViewModel.kt
: ViewModel responsible for managing sensor data and compass heading.SensorDataManager.kt
: Class for handling sensor data and filtering.Compass.kt
: Class for managing compass functionality and sensor integration.
If you would like to contribute to this project, please follow these guidelines:
-
Fork the repository.
-
Create a new branch for your feature or bug fix:
-
Make your changes and commit them with clear and concise messages.
-
Push your changes to your fork:
-
Create a pull request to the main repository.
This Android Compass App is open-source and available under the MIT License. See the LICENSE file for details.
For any questions or feedback, feel free to visit my GitHub profile at github.com/YazanAesmael.
Enjoy using the Compose Compass App!