Um adaptador Firebase para o plugin flutter_background_geolocation. Sincroniza automaticamente as localizações registradas com seu banco de dados Firestore.
Orientação gerada a partir de informações públicas. Apenas para referência.
Um adaptador Firebase para o plugin flutter_background_geolocation que sincroniza automaticamente os dados de localização gravados no Firestore. Projetado para funcionar sem problemas com o serviço de geolocalização em segundo plano, permite rastreamento em tempo real e armazenamento persistente das localizações do dispositivo em um banco de dados Firebase. Ideal para aplicações que exigem monitoramento contínuo da localização, como gestão de frota, rastreamento de entregas ou registro de atividades. O pacote gerencia a sincronização de dados de forma eficiente, garantindo confiabilidade nas plataformas Android e iOS.
Casos de uso
Rastreamento em tempo real da frota
Monitoramento de rota de entrega
Registro de atividades e jornadas
Análise baseada em localização
Rastreamento de atividade do usuário
Principais recursos
Sincronização automática do Firestore
Suporte multiplataforma (Android/iOS)
Integração sem interrupções com flutter_background_geolocation
Transferência confiável de dados offline para online
Intervalos de upload configuráveis
Indicado para
Aplicativos de frota e logística
Aplicativos de rastreamento de fitness e ao ar livre
Gestão de serviços em campo
Aplicações que exigem histórico de localização persistente
Considerações
Requer configuração do Firebase Firestore
Pode incorrer em custos de armazenamento em nuvem
Depende do plugin de fundo background_geolocation
A conectividade de rede afeta o tempo de sincronização
Permissões necessárias para acesso à localização em segundo plano
README original
Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.
background_geolocation_firebase
Firebase Proxy for Flutter Background Geolocation. The plugin will automatically post locations to your own Firestore database, overriding the flutter_background_geolocation plugin's SQLite / HTTP services.
If you prefer, you can instruct the plugin to update a single document in Firebase rather than creating a new document for eachlocation / geofence. In this case, you would presumably implement a Firebase Function to deal with updates upon this single document and store the location in some other collection as desired. If this is your use-case, you'll also need to ensure you configure your locationsCollection / geofencesCollection accordingly with an even number of "parts", taking the form /collection_name/document_id, eg:
BackgroundGeolocationFirebase.configure(BackgroundGeolocationFirebaseConfig(
locationsCollection: '/locations/latest'// <-- 2 "parts": even
));
// orBackgroundGeolocationFirebase.configure(BackgroundGeolocationFirebaseConfig(
locationsCollection: '/users/123/routes/456/the_location'// <-- 4 "parts": even
));
// Don't use an odd number of "parts"BackgroundGeolocationFirebase.configure(BackgroundGeolocationFirebaseConfig(
locationsCollection: '/users/123/latest_location'// <-- 3 "parts": odd!! No!
));
License
The MIT License (MIT)
Copyright (c) 2018 Chris Scott, Transistor Software
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.