Inspiration
Push notifications sent at the most relevant times will perform the best. To maximize this, we can use location services to send pushes to customers while they are shopping for furniture.
What it does
We've hardcoded 2 well-furnished locations in the office which will make the app display a push notification - when clicked, those push notification will open up a new deeplink to Android's Search With Photo experience. Users will then be in a prime spot to take a photo of the furniture, so that they can compare it with the things that are currently for sale on wayfair.
How we built it
Our prototype uses Google's Geofencing API which allows us to register for events to occur when we arrive at a predefined location. Up to 100 of these locations can be stored in the LocationManager at a time, though we're only leveraging a small set for the demo. We're hooking into the deeplinking and permissions logic which is already present in the Android app - the demo will actually allow for users to add "Location" permissions when the app is opened. Search With Photo is something which is was merged very recently, so we just had to implement a new deeplink to arrive at the flow and ask for the proper permissions.
Challenges we ran into
Location, unsurprisingly, is hard to test indoors. The API that we are using is actually fairly accurate, but still gave us false positives when location accuracy was bad. We also ran into problems with Android 8 (Oreo), which limits location activity to protect users' battery life. On an Oreo device, location is only queried a couple of times an hour under normal circumstances, so for the demo we used an Android 7 (Nougat) device.
Accomplishments that we're proud of
Deeplinking to Search With Photo went really smoothly, and we were able to get a working demo together for something neither of us had worked with before.
What we learned
Location helps users to connect with your app, but it's also very hard to test. Location services' API makes it much easier to implement this than we thought though.
What's next for Location-based push notifications on Android
We'd like to get this working as a background service, and be able to query the server for a list of the 20 nearest locations, instead of hardcoding them into the app. Identifying other areas where geofencing may be useful would let us apply this in more ways as well.
Built With
- android
- android-studio
- location
Log in or sign up for Devpost to join the conversation.