📍Geolocation

How to set up geolocation?

Turn on the Geolocation feature:

  • Enable Geolocation for iOS if needed.

  • Permission description for iOS - The permission description text should explain to the user why your app needs that permission. Refer to Apple's guidelines to avoid potential rejection.

How to set up background location tracking?

To start using background location tracking. You need to enable a Geolocation and fill out the Permission description for iOS (If you're planning to use iOS).

  • Permission description for iOS or/and Android - The permission description text should explain to the user why your app needs that permission. Refer to Apple's guidelines and Google's guidelines to avoid potential rejection.

To make background location tracking work correctly, you need to ask the user to give Always allow permission. The system will handle that for you, but make sure you specify it in the permission description for Android. For iOS OS will ask users to allow background tracking automatically once they collapse that app.

  • Webhook URL - This is your endpoint URL where we will send a user's geolocation. A few requirements for an endpoint:

    • HTTPS (HTTP is not supported)

    • POST method

    • JSON in a body

// JSON of what you should expect to be received from a device 
// Example
{
	"latitude": 50.000001,
	"longitude": 50.000001,
	// Identifier that will be passed later (Check Integration for more details)
	"identifier": "TEST", 
	// Error can be null or string (which will contain an error message)
	"error": null // "Data Discarded", "Timeout", "Authorization Needed", "Internal Server Error", "Parsing Error", "User Cancelled", "Invalid/Missing API Key", "Quota limit reached", "Not Found", "Reserved IP", "Not Supported", "Invalid polygon. Must be 1 or more points", "Network error: \(statusCode)"
}
  • Header Name & Value (Optional) - In case you have authorization on your webhook endpoint. This header will be sent to your endpoint from a device.

How to create a webhook with Bubble?

How to use geolocation?

📍Geolocation

I'm already utilizing geolocation permissions on my website. Is it necessary to implement a native geolocation API in my app?

Yes, we advise using the native geolocation API for an enhanced user experience, but the web geolocation API is also an option, albeit with repeated permission prompts each time the app is accessed.

Last updated