Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishan739/locationapp
LocationApp is a Kotlin-based Android app using Jetpack Compose to fetch real-time locations via Google’s Fused Location Provider. It reverse-geocodes coordinates into addresses, manages location permissions smoothly, and provides a modern UI. Features include high-accuracy location updates, intuitive permission handling, and responsive Compose-bas
https://github.com/ishan739/locationapp
Last synced: about 1 month ago
JSON representation
LocationApp is a Kotlin-based Android app using Jetpack Compose to fetch real-time locations via Google’s Fused Location Provider. It reverse-geocodes coordinates into addresses, manages location permissions smoothly, and provides a modern UI. Features include high-accuracy location updates, intuitive permission handling, and responsive Compose-bas
- Host: GitHub
- URL: https://github.com/ishan739/locationapp
- Owner: ishan739
- Created: 2024-12-26T13:15:31.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-26T13:30:14.000Z (about 2 months ago)
- Last Synced: 2024-12-26T14:25:56.185Z (about 2 months ago)
- Language: Kotlin
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LocationApp
LocationApp is an Android application built with Kotlin and Jetpack Compose, designed to provide users with real-time location tracking and address details. It leverages Google’s Fused Location Provider for accurate location updates and reverse-geocodes coordinates into human-readable addresses using the Geocoder API.
**Features**
**1. Real-Time Location Tracking**
Fetches the user's current location with high accuracy using Google’s Fused Location Provider.
Updates location in real-time based on user interaction or movement.**2. Reverse Geocoding**
Converts latitude and longitude into detailed addresses.
Displays location coordinates and their corresponding address to the user.**3. Permission Management**
Dynamically handles runtime permissions for location access.
Provides user-friendly prompts when permissions are denied or require manual enabling.**4. Modern UI with Jetpack Compose**
Fully responsive and intuitive UI built using Jetpack Compose.
Organized and clean interface for seamless user interaction.**Technology Stack**
Programming Language: Kotlin
UI Framework: Jetpack Compose
Location Services: Google Fused Location Provider API
Reverse Geocoding: Geocoder API
Architecture: MVVM (Model-View-ViewModel)
**Code Structure**
**1. MainActivity.kt**
Entry point of the app, sets up the UI and integrates the LocationViewModel with the Compose theme.
**2. LocationUtils.kt**
Handles location-related operations, such as requesting location updates and performing reverse geocoding.
Manages permission checks and interactions with the Fused Location Provider API.
**3. LocationViewModel.kt**
Manages the app's state for location data using Jetpack Compose’s state management.
Ensures reactive UI updates when location data changes.
**4. LocationData.kt**
Data class representing the user's location with latitude and longitude fields.
**How It Works**
The app checks for location permissions upon user interaction.
If permissions are granted, it fetches the current location using the Fused Location Provider.
The latitude and longitude are displayed and reverse-geocoded into an address.
If permissions are denied, the app provides helpful prompts for enabling them.
**Installation**
Clone the repository:
Copy code : git clone https://github.com/your-repo/LocationApp.git
Open the project in Android Studio.
Sync Gradle and run the app on an emulator or physical device.
**Future Enhancements**
Add support for background location tracking.
Implement a map-based UI using Google Maps API.
Include a history of visited locations.