From: Young-Ae Kang Date: Mon, 7 Sep 2015 08:59:29 +0000 (+0900) Subject: [TNEF-5182] Fixed mistakes of Geofence. X-Git-Tag: tizen_3.0/TD_SYNC/20161201~570 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=509b466f6e955c66dcca21eaea28258478543d71;p=sdk%2Fonline-doc.git [TNEF-5182] Fixed mistakes of Geofence. Signed-off-by: Young-Ae Kang Change-Id: Ie59f953a70303f0251ab757734b77f324538323e --- 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 31c4592..444929e 100644 --- a/org.tizen.tutorials/html/native/location/geofence_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/location/geofence_tutorial_n.htm @@ -91,7 +91,7 @@ geofence_manager_add_place(manager, "place_name", &place_id);
  • Create the geofences:
    -Geopoint geofence:
    +// Geopoint geofence:
     double latitude = 12.756738;
     double longitude = 77.386474;
     int radius = 100;
    @@ -99,11 +99,11 @@ char* address = "India";
     geofence_h fence_h;
     geofence_create_geopoint(place_id, latitude, longitude, radius, address, &fence_h);
     
    -Wi-Fi/BT geofence:
    +// Wi-Fi/BT 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);
    +geofence_create_bluetooth(place_id, bssid, ssid, &fence_h);
     

    Add the geofence to the manager:

    @@ -114,12 +114,12 @@ geofence_manager_add_fence(manager, fence_h, &geofence_id);
     
  • Start the geofence service using the geofence_manager_start() function.

    This call is asynchronous and only initiates the process of starting the service. Once the service is started, the registered callbacks are invoked when their corresponding events take place. To know when the service becomes enabled, use the geofence_manager_set_geofence_state_changed_cb() callback.

    -geofence_manager_start(manager);
    +geofence_manager_start(manager, geofence_id);
     
  • Using the geofence service for geopoints is power consuming, so if the service is not used, you can stop the status alerts using the geofence_manager_stop() function. Call the geofence manager_start() function again if the alerts are needed.

    -geofence_manager_stop(manager);
    +geofence_manager_stop(manager, geofence_id);
     
  • Destroy all used resources, such as the geofence manager handle, using the geofence_manager_destroy() function:

    @@ -235,7 +235,7 @@ geofence_status_get_duration(status_h, &duration);
     geofence_type_e type;
     int place_id;
    -geofence_get_geofence_type(fence_h, &type);
    +geofence_get_type(fence_h, &type);
     geofence_get_place_id(fence_h, &place_id);
     
  • Retrieve the geopoint geofence information: