<ul class="toc">
<li><a href="#initial">Initializing the Geofence Service</a></li>
<li><a href="#status">Getting the Geofence Event State</a></li>
- <li><a href="#alerts">Getting Geofence Alerts</a></li>
<li><a href="#track">Tracking the User for Geofence Alerts</a></li>
<li><a href="#info">Retrieving Geofence Information</a></li>
</ul>
<p>Create the geofence, start the geofence service, and stop it when no longer needed.</p></li>
<li><a href="#status">Getting the Geofence Event State</a>
<p>Get the success or failure state of each event.</p></li>
-<li><a href="#alerts">Getting Geofence Alerts</a>
- <p>Define the geofence and track state changes.</p></li>
<li><a href="#track">Tracking the User for Geofence Alerts</a>
<p>Track the user location and update the geofence state.</p></li>
<li><a href="#info">Retrieving Geofence Information</a>
</li></ol>
- <h2 id="alerts" name="alerts">Getting Geofence Alerts</h2>
-
-<p>To get alerts of the geofence state changes, use the geofence state callback. There is no periodic call, but the callback is invoked if there is a state change. The callback is called only if the geofence service has been started.</p>
-<ol>
-<li><p>Register the callback using the <span style="font-family: Courier New,Courier,monospace">geofence_manager_set_geofence_state_changed_cb()</span> function:</p>
-<pre class="prettyprint">
-geofence_manager_set_geofence_state_changed_cb(manager, geofence_state_changed, NULL);
-</pre></li>
-
-<li><p>When the alert is received, you can use the callback to, for example, update the variables that store the current state:</p>
-<pre class="prettyprint">
-geofence_state_e received_state;
-void
-geofence_state_changed(int geofence_id, geofence_state_e state, void *user_data)
-{
- received_state = state;
-}
-</pre>
-</li></ol>
-
-
<h2 id="track" name="track">Tracking the User for Geofence Alerts</h2>