geolite_flutter_sdk 0.0.1
geolite_flutter_sdk: ^0.0.1 copied to clipboard
Flutter package for Geolite SDK integrating native Android and iOS implementations
Geolite Flutter SDK #
A Flutter package that provides access to the Geolite SDK native functionality for both Android and iOS platforms.
Features #
- Initialize the Geolite SDK with an API key
- Start and stop location tracking
- Get the SDK version
Getting Started #
To use this plugin, add geolite_flutter_sdk as a dependency in your pubspec.yaml file:
dependencies:
geolite_flutter_sdk:
path: path/to/geolite_flutter_sdk
Android Setup #
The Android implementation requires the following permissions in your Android manifest:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
Make sure to request these permissions at runtime for Android 6.0 (API level 23) or higher.
iOS Setup #
The iOS implementation requires the following entries in your Info.plist:
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when in use to track your position.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs access to location when in use and in background to track your position.</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
Usage #
import 'package:geolite_flutter_sdk/geolite_flutter_sdk.dart';
// Initialize the SDK
bool initResult = await GeoliteFlutterSdk.initialize('your_api_key_here');
// Start tracking
bool startResult = await GeoliteFlutterSdk.startTracking();
// Stop tracking
bool stopResult = await GeoliteFlutterSdk.stopTracking();
// Get SDK version
String version = await GeoliteFlutterSdk.getVersion();
Example App #
Check the example directory for a sample app demonstrating the usage of this plugin.
Additional Information #
Dependencies #
- Flutter
- Android Geolite SDK (included as AAR)
- iOS Geolite SDK (included as Framework)
License #
This project is proprietary and for use only by authorized parties.