We have vehicle positions for over 10,000 vehicles currently coming into a Firebase Realtime database. Each vehicle is updated every 5 seconds on average.
I have been tasked with setting up a notification system with an app that allows these vehicles to be tracked.
If a user loads the app and begins tracking a vehicle by tapping on it, and then the app goes into the background, they should receive notifications every time the vehicle moves.
My Proposal
When a user begins tracking a vehicle, have them subscribe to a FCM topic with the topic name being the vehicle registration.
When our vehicle parsing script processes an update for a vehicle, if it has moved from its last location, send a notification to the topic.
When the user stops tracking the vehicle, unsubscribe from the topic.
Is this the best way of managing notifications for a Firebase setup?
Topics are optimized for having a reasonable small number of topics with a reasonably large number of subscribers. While your use-case seems a bit different, having a topic per vehicle should technically work fine.
Related
I have an email application where you can see mails in threads view or mail view. I would like to provide information to the business whether users are using mail client with threads view or mail view. The problem is mail application can run for days and weeks before any user interaction. if I send GA event when the user switch to thread/mail view that event can be registered for the day it was sent (lets say it is 1st of January) but the client can keep looking at the mail list for a month. Lets say business guys make a query for the last week of January the event won't be counted and they won't know there was an active user.
My solution is to send this event every day by some time service which will monitor for day changes but I think there could be better solution to this problem and you can tell me about it
I'm a bit confused on how activating the use of Google Signals in GA4 affects the reporting and raw data. One thing that is obvious is that after activation the demographics data becomes available (gender, age, interests) inside GA. But what about cross-device users stitching?
On the net I saw a couple of articles which have mentioned that turning Google Signals on would affect the overall number of users in the reports (basically reduce it by identifying one user across several devices when it is possible). Does it mean that there will be cross-device users stitched under one Google Client IDs (cid)? Exploring the device overlap I could see a small segment of such users in user explorer who were registered from different devices and have same Client ID on both devices.
This also means that these joint cross-device users data would actually be exported to Google BigQuery, right? By data I mean that we would see this same cross-device user under one and same Client ID in Bigquery.
Bonus question:
How does Google Client ID is actually persisted from the previous device? Does GA4 Configuration Tag sends a dedicated request to Google server on first page load to check if there is user data (Client ID) available from other devices and assigns an old cid to this new visit if match is found in the database?
Or would we see a new cid in real time, but it would be replaced later with the cid from other device when Google renders and aggregates the data on the server side before pushing it into our GA4 account reports?
* we are not currently using any internal User ID of our own to track users across devices
I'm using Firebase Analytics and User Properties in my app to collect some data and to see how the users are using the app etc.
My app has both Free Version and Pro version. Before hire the Pro version, the user can use the Pro Version as a Trial of 1 month. When the user starts the Free Trial, I'm creating a event named "started_free_trial" and with this event I'm sending a "created_at" event attribute equal to System.currentTimeInMillis().
Now I want to send the cloud notifications from the Firebase console to the users who are using the trial period of Pro version at intervals of 15 days, 25 days and 30 days from the free trial start.
So here are the points what i want to do exactly
Create a Audience of users who started the Trial 15, 25 and 30 days ago. Can I do that? As Firebase provides an option to create audiences but I don't know how to create such type of audience to filter according to my requirement.
I want to send notification to that above created audiences.
I need your help to complete/perform above 2 points.
Looking for positive response.
Thanks
You can't really create an audience based on time the user started using your app, since the audiences are sticky, once a user is in the audience she will remain there forever.
However, instead of targeting to an audience, you can use user property directly to target your notification to users that registered after certain time or before certain time.
Just make you app to store the first start time to user property and the use that as the condition. You can also create other relatewd conditions and combine them.
I am a React Native developer currently working on a vehicle tracking app.
We want to develop a feature that allows users to exit the app, but continually be updated in the form of notifications when the vehicle moves (on average every 60 seconds).
I have been tasked with coming up the best way of integrating this. Our app already has push notifications set up with Firebase and we do use this to push out generic messages to the app.
My thinking is as follows:
When a user begins tracking a vehicle, the app should subscribe to a Firebase topic identified as the vehicle's registration. On the server side, each time an update comes in for a vehicle, send out a Firebase notification to that vehicle registration's topic, and then any users tracking it will be updated. When a user returns to the app and presses 'Stop tracking', the app unsubscribes from the topic.
In theory I think this would work. The reason I'm posting is I'm not sure it's the most efficient way. Our server received updates for over 1,000 vehicles every minute.
Any help/ideas would be gratefully received!
I am developing an addon for Shopify platform and using the Shopify NET library I have managed to authorize the user shop and gather some data.
Now I need to charge the usage of the Addon with a monthly fee (providing 7 days trial) but I cannot figure out the flow I must follow.
I guess that I have to call Recurring Application Charge API after the user authenticates (at the callback from the authorization URL) and if the user declines the charge then I have to log him out. Is that correct?
Do I have to care for providing 7 days trial by myself or the Shopify RACharge API with manage it by itself?
What do I have to do when the user cancel the subscription or freeze it?
Can anyone point me out a document that analyze the charging flow except the Shopify Billing API which is not that helpful after all?
First question, you're right. You either have to log out the user or you just let him authed without permission to see some views or all of them.
There's a propperty on Recurring Application which allows you to define the days of the trial: "Number of days that the customer is eligible for a free trial.", so Shopify handles this for you.
When user cancels a subscription or his store is put on "frozen" status, you should make sure he doesn't have access to your App functionalities, though if it's frozen, he won't even be able to log into his store.