From c30a988d482478b26d6bb1c8a656d08141ac39fa Mon Sep 17 00:00:00 2001 From: jomui Date: Tue, 12 Jan 2016 10:16:07 +0900 Subject: [PATCH] fix TNEF-6681 Signed-off-by: jomui Change-Id: Ie26baf30f14fadb18fce6c3e8a7e5dcea53960aa --- .../html/native/location/geofence_tutorial_n.htm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/org.tizen.tutorials/html/native/location/geofence_tutorial_n.htm b/org.tizen.tutorials/html/native/location/geofence_tutorial_n.htm index 2bb99be..e0399e1 100644 --- a/org.tizen.tutorials/html/native/location/geofence_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/location/geofence_tutorial_n.htm @@ -90,21 +90,22 @@ geofence_manager_add_place(manager, "place_name", &place_id);
  • Create the geofences: +
    1. Geopoint geofence
      -// 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
      +
    2. +
    3. Wi-Fi/Bluetooth geofence +
       char* bssid = "82:45:67:7E:4A:3B";
       char* ssid = "Cafeteria";
       geofence_h fence_h;
       geofence_create_bluetooth(place_id, bssid, ssid, &fence_h);
      -
      +

    Add the geofence to the manager:

     int geofence_id = -1;
    @@ -142,7 +143,7 @@ geofence_manager_set_geofence_event_cb(manager, geofence_event, NULL);
     
  • Get the success or failure state of the event in the callback:

     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)
    @@ -249,13 +250,20 @@ geofence_get_latitude(fence_h, &latitude);
     geofence_get_longitude(fence_h, &longitude);
     geofence_get_radius(fence_h, &radius);
     geofence_get_address(fence_h, &address);
    +
    +//after use
    +free(address);
     
  • Retrieve the Wi-Fi or Bluetooth geofence information:
     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);
     
  • -- 2.7.4