Change The status of user to offline in firestore - flutter

I have Taxi App, And I need add when the driver closed the app, the status of the driver changed to offline in firestore
how I can do that?
plz explain for me

Firestore has no built-in capability to write something in the database after the client has disconnected.There's a solution but that uses the Firebase Realtime Database and Cloud Functions to store presence information in Firestore too, which is documented here Build presence in Cloud Firestore.Found this blog you can also check this which might help.
Depending on the type of app you're building, you might find it useful
to detect which of your users or devices are actively online —
otherwise known as detecting "presence."
Cloud Firestore doesn't natively support presence, but you can
leverage other Firebase products to build a presence system.
You can refer this stackoverflow thread1 & thread2

Related

How to create flutter app's offline and online

i am just looking for ideas about how to make the app work in online and offline modes(it is a todo app and it should work online and offline both)
I have a todo app that stores the data in sqflite database(locally on the phone) when the app goes online I want the data to be synced with my online database for online database i am using from mongodb. i am just looking for suggestions and also i want to ask which offline database is fine beside of mongode, Hive or sqflite.
you can use a shared_prefernce library and create a function if phone not connected to wifi return null else if connected use socket emit and clear local storage
MongoDB's Realm supports the sync feature, however this would lock your application to the MongoDB's Atlas hosted Database.

Can I pre-cache data to work offline in mobile app using AppSync?

I am developing an Android and iOS app that could be used in areas that have a very poor or no data connection. It is a requirement for the app to be pre-loaded with all of the data so it will work even if the app never communicated with the server, but it also needs to be able to update and sync when a connection is made. Is it possible to manually populate the AppSync (Apollo) cache database with data on launch and query and mutate it later? The app also contains several search and filter queries. Our backend API is currently using GraphQL.
I have seen this question, Is it possible to build offline-first mobile apps using AWS AppSync?, but it is a little different that what I'm asking.
The recommendation would be to hydrate (read: pre-load with data) a local SQLite database after install. SQLite is what the 'local cache' uses to persist data on the device.
Refer to this github issue for a code example of how to do this:
https://github.com/awslabs/aws-mobile-appsync-sdk-js/issues/160

Cloud Data Storage across devices without Login (iCloud, CloudKit)

I do have a background as a native iOS software developer.
We had a couple of apps for iPhones and iPads that used CloudKit to sync data between the same App installed on different devices of a single user.
It was used for simple things like favorited items within apps that did not have any login or account mechanisms.
How would I achieve such a functionality in flutter?
Havent found any iCloud related plugins for dart/flutter.
Thank you!
I do not believe there is a direct way to access the CloudKit from dart/flutter, however, there is nothing stopping you from trying this architecture.
Build a (PHP?)/CloudJS application on a webserver to serve REST-ful API calls that send/retrieve data from CloudKit Containers (CloudKit Web Service Reference). You'll want to set up some server-to-server authentication for this to work.
Posting/Fetching data via the REST API calls from dart/flutter. There are many libs that facilitate this and author (BRIJESH) over on androidkt.com offers an interesting walkthrough of some options.

Firestone offline capabilities flutter

I know that Firestone will store data if the user is offline and I saw that there is a way to do this with native code, but is it possible to enable these offline capabilities in flutter itself?
Firebase firestore support full offline. I’m using it myself. So long as you’ve read the data at least once before going offline. If using firebase authentication - the custom option also works offline. Google sign-in does not.
The downside to firebases offline capabilities is that it’s only firestore (not counting the older firebase db) and not the other products like cloud storage.
So for example I’ve written an app and the document side of it is fully offline enabled however you can take photos in the app and I had the write the offline capabilities to sync this photos with firebase cloud storage myself.
(I basically just keep them in a pending folder and try to sync them when the device has connectivity.)

How can I make Firebase analytics COPPA compliant using Unity?

How do I make Firebase Analytics COPPA compliant for Unity plugin?
Firebase Support:
The collection of analytics about children is not what's disallowed by COPPA, but rather the targeting of children based on analytics. If children are targeted based on Ads, the developers need to make sure to set up their ad-targeting appropriately. AdMob has a flag for this, for example. The developer will be the one to control what they do with the analytics data they collect, and they need to make sure to comply with COPPA if their app is child-directed.
Firebase is not COPPA compliant as of today.
You can send a feature request to Firebase Support with details here.
I think the answers above are outdated. You may now configure Firebase to disable all device identifiers and/or delay data collection until you received legal consent. This should allow you your app to maintain COPPA compliance.