Google Awareness API on iOS

1k Views Asked by At

I want to know if anyone used the Google Awareness API on an iOS device. I know it's possible to implement on Android but I need to work on iOS as well, I haven't find any documentation on it so far. Is it possible and how do you implement it?

https://developers.google.com/awareness/android-api/get-started

2

There are 2 best solutions below

2
On

You can use the NumberEight SDK, which can do a lot more than Google's Awareness API today (although no regioning is available at the time of writing).

It performs a wide variety of context recognition tasks on both iOS and Android including:

  • Real-time physical activity detection
  • Current place categories
  • Motion detection
  • Reachability
  • Local weather

It can also record user context for reports and analysis via the online portal.

For example, to record user activity in iOS, you would do:

let ne = NumberEight()

ne.activityUpdated { (glimpse: Glimpse<NEXActivity>) in
    let activity = glimpse.mostProbable.value

    if activity.major == .running {
        print("User is running!")
    }
}

Here are some iOS and Android example projects, and you can sign up for free via the online portal.

Disclosure: I'm one of the developers.

0
On

I had done some researches on google awareness APIs for iOS. It's not available for iOS for now. You can use region monitoring APIs of Apple to register custom fences and monitor if someone enters/exits that region.

You can also notify user locally per region and engage him/her in your app. Apple provides APIs for updating user locally based on location, weather etc.

APIs are simple to use in app.