Forum Documentation Showcase Pricing Learn more

Surface content based on user's location?

I’m pretty sure this is all possible, but would like to double check before starting on building. Also, any tips on the best way/workflow to do this are much appreciated. I’d like users to be able to create a card tied to a location and then have that card surface when a user is at or near that location.

Here’s the user behavior I’m hoping to create:

  1. User A creates a “Card” with information on it such as a cafe’s wifi password;
  2. User A is able to enter location by using Google places and selecting the location (as a fallback I assume a user can just enter an address and Google will map with correct coordinates?);
  3. User A saves the Card with the description info and location;
  4. User B opens app on mobile or computer while at the cafe;
  5. The card pops up when User B opens the app saying “There’s an Info Card for this location” (understanding the user would have to accept the site accessing their location).

Basically, this is a very similar behavior to Foursquare, but my purposes are actually much different.

  1. Is this possible?
  2. Any tips on where to start and the best way to achieve this?

Thanks so much!

Yes, it is certainly possible. My app does something fairly similar.

For User A - You can do a Google Places search as you say, alternatively you can query “current position” which will return a lat/long and you can save this into a field of type Address. Bubble always saves a lat/long along with an address as well. But you don’t NEED the address to do a lat/long type address. Or you can enter an address directly.

For User B, you would need to know their location, but then you can easily do a search for cards saved within x miles of the Current Position (or you can allow the user to set a current position using an address).

That would be the simplest thing, return cards with x radius and not worry too much about the name of the “location”.

But if you want to avoid duplicates in the future, you would need to save the card against a specific google place.

1 Like