Skip to content

keens007/fonelocator

Repository files navigation

PhoneLocator - GPS Location Tracker

A React Native mobile application that shows your current GPS location with real-time tracking capabilities.

Features

  • Real-time GPS Tracking: Continuously monitor your current location
  • Location History: View your movement history with timestamps
  • Map Integration: Interactive map display with your current position
  • Battery Monitoring: Track device battery level
  • Customizable Update Intervals: Set location update frequency (10 seconds to 5 minutes)
  • Background Location: Works in background with proper permissions
  • Device Information: View device specs and battery status
  • Google Maps Integration: Quick access to full Google Maps view

Screenshots

Home Screen Main dashboard showing current location and device information

Settings Screen Settings panel for configuring location intervals and device management

Map View Interactive map with current location marker

Installation

Prerequisites

  • Node.js (version 16 or higher)
  • Expo CLI
  • iOS Simulator or Android Emulator (for development)
  • Physical device with Expo Go app (for testing)

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd fonelocator
  2. Install dependencies:

    npm install
  3. Start the development server:

    npx expo start
  4. Run on device/emulator:

    • Scan the QR code with Expo Go app on your mobile device
    • Or press 'i' for iOS simulator, 'a' for Android emulator

Configuration

Location Update Intervals

The app supports different update intervals:

  • 10 seconds: Fast updates for real-time tracking
  • 30 seconds: Balanced performance and battery life
  • 1 minute: Moderate updates
  • 5 minutes: Battery-saving mode

Permissions Required

  • Location Access: Required for GPS tracking
  • Background Location: For continuous tracking when app is minimized
  • Battery Information: To display battery level

Usage

Starting Location Tracking

  1. Open the app
  2. Grant location permissions when prompted
  3. The app will automatically start tracking your location
  4. View your current position on the map

Viewing Location Details

  • Current Coordinates: Displayed in decimal format
  • Place Name: Automatically resolved using reverse geocoding
  • Timestamp: Shows when the location was last updated
  • Battery Level: Real-time battery status

Accessing Google Maps

  • Tap the navigation button (bottom right)
  • Opens your current location in Google Maps
  • Provides full navigation capabilities

Managing Settings

Access the Settings tab to:

  • Configure location update intervals
  • View device information
  • Monitor battery status
  • Revoke access if needed

Technical Details

Architecture

  • Framework: React Native with Expo
  • Navigation: Expo Router with bottom tabs
  • State Management: React hooks and AsyncStorage
  • Location Services: Expo Location API
  • UI Components: Custom components with Material Design

Key Components

  • Home Screen: Main dashboard with map and location info
  • Settings Screen: Configuration and device management
  • Location Service: Background location tracking
  • Map Integration: Static map display with Google Maps API

Dependencies

Core dependencies include:

  • expo-location: GPS location services
  • expo-battery: Battery level monitoring
  • @react-native-async-storage/async-storage: Local data storage
  • react-native-maps: Map display functionality

Development

Project Structure

fonelocator/
├── app/                    # Main application code
│   ├── (tabs)/            # Tab navigation screens
│   │   ├── index.tsx      # Home screen with location tracking
│   │   └── settings.tsx   # Settings and configuration
│   └── _layout.tsx        # Main app layout
├── assets/                # Static assets (images, fonts)
├── components/            # Reusable UI components
├── constants/             # App constants and configurations
├── hooks/                 # Custom React hooks
└── scripts/               # Development scripts

Adding New Features

  1. Create new components in the components/ directory
  2. Add new screens in the app/ directory following Expo Router conventions
  3. Update navigation in app/_layout.tsx if needed
  4. Add any new dependencies to package.json

Troubleshooting

Common Issues

Location permissions not working:

  • Ensure location services are enabled on the device
  • Check app permissions in device settings
  • Restart the app after granting permissions

Background tracking not working:

  • Enable background location permissions
  • Check battery optimization settings
  • Ensure the app is not force-closed

Map not displaying:

  • Check internet connection
  • Verify Google Maps API key is configured
  • Ensure location services are active

Getting Help

  • Check the Expo documentation for general React Native issues
  • Review Expo Location API documentation for location-specific problems
  • Consult the project's GitHub issues for known problems

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions:

  • Create an issue on the GitHub repository
  • Check the troubleshooting section above
  • Review Expo documentation for platform-specific issues

Version History

1.0.0

  • Initial release
  • Real-time GPS tracking
  • Map integration
  • Battery monitoring
  • Settings configuration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors