0 purchases
advanced background locator
# Advanced Background Locator
**`advanced_background_locator`** is a Flutter plugin for advanced background location tracking. This package provides functionalities to track user location even when the app is running in the background.
## Features
- Track user location in the background.
- Customizable settings for notifications and location updates.
- Support for different location clients.
## Installation
To use this package, add `advanced_background_locator` as a dependency in your `pubspec.yaml` file:
```yaml
dependencies:
advanced_background_locator: ^0.0.3
copied to clipboard
Run flutter pub get to install the package.
Usage #
Setup #
Configure AndroidManifest.xml
Add the following permissions to your AndroidManifest.xml file:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
copied to clipboard
Ensure you add the required service and receiver declarations as well.
Initialize the Plugin
Initialize the plugin in your Flutter app. You can do this in your main entry file (main.dart or Application.kt).
import 'package:advanced_background_locator/advanced_background_locator.dart';
void main() {
AdvancedBackgroundLocator.initialize();
runApp(MyApp());
}
copied to clipboard
Configuration #
Configure the plugin using the PreferencesManager class:
import 'package:advanced_background_locator/advanced_background_locator.dart';
void configureSettings() {
final settings = {
'channelName': 'Your Channel Name',
'channelTitle': 'Your Channel Title',
'notificationMessage': 'Your Notification Message',
// other settings
};
PreferencesManager.saveSettings(context, settings);
}
copied to clipboard
Start Tracking #
Start tracking the location using the following method:
import 'package:advanced_background_locator/advanced_background_locator.dart';
void startLocationTracking() {
AdvancedBackgroundLocator.startTracking();
}
copied to clipboard
Stop Tracking #
Stop location tracking when it's no longer needed:
import 'package:advanced_background_locator/advanced_background_locator.dart';
void stopLocationTracking() {
AdvancedBackgroundLocator.stopTracking();
}
copied to clipboard
Example #
An example of using this package can be found in the example directory of this repository.
Contributing #
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request.
License #
This package is licensed under the MIT License. See the LICENSE file for more details.
Contact #
For any inquiries or issues, please contact the maintainer:
Name: Abdurrahman Karaoğlu
Email: [email protected]
Feel free to modify this README according to your specific needs or additional features your package may have. If you have any other requirements or questions, just let me know!
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.