flutter_background_geolocation_firebase icon indicating copy to clipboard operation
flutter_background_geolocation_firebase copied to clipboard

Can the firebase document ref path be customized without using the function?

Open prasenjitpickcel opened this issue 5 years ago • 8 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

prasenjitpickcel avatar Jun 10 '19 07:06 prasenjitpickcel

No.

christocracy avatar Jun 10 '19 07:06 christocracy

Hi, We are trying to get the gelocation when the app is at background and push the data to firestore without using any cloud functions. (We are not comfortable in using functions is, we had seen issues with cloud functions in large scale, and is an additional failure point for copying the data).From your above answer looks like this is not possible directly. Alternatively, We would like to know if we can access location data from your library using broadcast services every 15 minutes. So that we can write our flutter code to post it to firestore.

basudevs avatar Jun 10 '19 09:06 basudevs

I think it’s unnecessarily paranoid to write off cloud functions.

https://cloud.google.com/functions/docs/bestpractices/retries

Otherwise, see wiki Android Headless Mode

christocracy avatar Jun 10 '19 11:06 christocracy

Automatic retrying is not available for HTTP functions.

A cloud-function to simply re-save the data with a different schema doesn't involve HTTP. And as a result, these invocations are incredibly inexpensive, at about $3.20 / 10M invocations.

christocracy avatar Jun 10 '19 12:06 christocracy

@christocracy how can I pass my usersID along with the geolocation data. Tried doing it like locationsCollection: "/locations/{$usserid}" but I notice it keeps overriding it n the cloud function.pls is there a fix because I want to attach a geolocation record to a userId

ajanieniolasolomon avatar Apr 01 '20 15:04 ajanieniolasolomon

@ajanieniolasolomon Your collection-name needs to have an odd number of parts, yours has two (even).

eg: locationsCollection: "/users/{$userid}/locations"

christocracy avatar Apr 01 '20 15:04 christocracy

Yes I did try this with cloud function no content was created on my users location collection

On Wed, 1 Apr 2020 at 4:45 PM, Chris Scott [email protected] wrote:

@ajanieniolasolomon https://github.com/ajanieniolasolomon Your collection-name needs to have an odd number of parts, yours has two (even).

eg: locationsCollection: "/users/{$userid}/locations"

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/transistorsoft/flutter_background_geolocation_firebase/issues/5#issuecomment-607327951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMVP6NAU53HM5DA5UC3CM3RKNOQLANCNFSM4HWRDRAQ .

ajanieniolasolomon avatar Apr 02 '20 12:04 ajanieniolasolomon

Are you watching the application logs?

christocracy avatar Apr 02 '20 19:04 christocracy