3

I've searched all around for something that will do a simple action : disable wifi when user leaves home, and enable wifi when arriving home.
I want to do so, since it could potentially save me battery usage from searching wifi network when i'm outside.

Here's what i thought about :

  1. For enabling and disabling wifi, i can use this suggestion.
  2. For detecting home, i can use FenceApi and set a specific coordinate for this. Something like :

    AwarenessFence fence = LocationFence.entering(55.683491, 12.101225, 25);
    Awareness.FenceApi.updateFences(mGoogleApiClient, new FenceUpdateRequest.Builder...);
    

This is done with the FenceApi, which overall works fine, but sometimes its missing notifying enter the coordinates i've specified.

The issue is, i don't want to implement my own home, since i don't have a server side implementation for my application, and it'll be very hard to save all of the home data of my users. Just wandering if anyone know of any open source sdk which can be useful for my usage.

Community
  • 1
  • 1
John Bristow
  • 156
  • 1
  • 5

1 Answers1

2

You can use this open source git project, which uses Neura sdk(which is free).

Bassically, this is exactly what you need, since it detects leaving and arriving home.

  1. When user left home, the wifi is disabled.
  2. When user arrive to work, the wifi is enabled.
Dus
  • 4,052
  • 5
  • 30
  • 49
  • I saw your example, but how am i receiving event for 'arriving home' from this sdk ? i don't have a server side as i mentioned above – John Bristow Sep 02 '16 at 13:54
  • 1
    In the description of the git, you can see that there's a request for passing server key and project number for your project's gcm. So, you provide that data and the event is sent to a receiver you define from Neura's servers. – Dus Sep 02 '16 at 14:57
  • Yes, thank you, i missed that section in the git documentation.. sorry. – John Bristow Sep 03 '16 at 11:04