</table>
</li>
<li>Create the geofences:
+<ol type="a"><li>Geopoint geofence
<pre class="prettyprint">
-// Geopoint geofence
double latitude = 12.756738;
double longitude = 77.386474;
int radius = 100;
char* address = "India";
geofence_h fence_h;
geofence_create_geopoint(place_id, latitude, longitude, radius, address, &fence_h);
-
-// Wi-Fi/BT geofence
+</pre></li>
+<li>Wi-Fi/Bluetooth geofence
+<pre class="prettyprint">
char* bssid = "82:45:67:7E:4A:3B";
char* ssid = "Cafeteria";
geofence_h fence_h;
geofence_create_bluetooth(place_id, bssid, ssid, &fence_h);
-</pre>
+</pre></li></ol>
<p>Add the geofence to the manager:</p>
<pre class="prettyprint">
int geofence_id = -1;
<li><p>Get the success or failure state of the event in the callback:</p>
<pre class="prettyprint">
geofence_manage_e user_action;
-geofence_error_e user_error;
+geofence_manager_error_e user_error;
void
geofence_event(int place_id, int geofence_id, geofence_manager_error_e error,
geofence_manage_e manage, void *user_data)
geofence_get_longitude(fence_h, &longitude);
geofence_get_radius(fence_h, &radius);
geofence_get_address(fence_h, &address);
+
+//after use
+free(address);
</pre></li>
<li>Retrieve the Wi-Fi or Bluetooth geofence information:
<pre class="prettyprint">
char *bssid;
char *ssid;
geofence_get_bssid(fence_h, &bssid);
-geofence_get_sssid(fence_h, &ssid);
+geofence_get_ssid(fence_h, &ssid);
+
+//after use
+free(bssid);
+free(ssid);
</pre></li></ul>