Search Unity

Geofencing / Geolocatin based push notifications on background

Discussion in 'General Discussion' started by FoxApoGames, Aug 5, 2019.

Thread Status:
Not open for further replies.
  1. FoxApoGames

    FoxApoGames

    Joined:
    Jul 8, 2019
    Posts:
    1
    Hello Unity community,

    I have a task from our client to implement a way to notify users, basically players of simple unity game whenever they are nearby a specific place.

    I have about 10K+ gps locations stored on remote mysql database, mostly those locations are bars around cities in the country so they have quite short radius between each other. The location services runs and triggering some conditions when the app is on, but on the level of C# and basic logic functionality of the game, unfortunately I cannot imagine, how it should work, when the app is off and no native code is implemented. I used only basic unity scheduled notifications to notify i.e. daily reward to pickup after one day of inactivity. But with i have no clue how to implement geo based notification without use of 3rd party apps/marketing tools.

    I am afraid there is no simple solution for unity, neither at all.

    Simple use case:

    - I play the game, turn it off when i'm dome with some stuff.
    - I go around bar, which location is stored on the server.
    - I should receive a notification that I'm nearby and can play the game. (even if the app is off)

    I have minimal knowledge of how push notifications in such usage should work.
    We have really short time to implement, approx. 1-2 weeks.

    I'm very concerned about this way of solution, when I'm limited by time and with almost no knowledge at this field and said to our project manager this is not possible to do without more time and research.

    I would be really happy for all the reactions and possible tips to solve such an issue.

    Thanks :)
     
    Ikaro88 likes this.
  2. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Implement all the geofencing / location updates in as a background service in Android Studio and export it as a Unity plugin. Here's how to make a Unity plugin using android studio. Here's the the Unity doc on how to access native plugin.

    Can't help you with iOS since I've barely done any native app for it.
     
Thread Status:
Not open for further replies.