/// </summary>
/// <since_tizen>3</since_tizen>
/// <exception cref="ArgumentException">Thrown when an invalid argument is used.</exception>
- /// <exception cref="NotSupportedException">Thrown when the location is not supported.</exception>
public int Interval
{
get
/// </summary>
/// <since_tizen>3</since_tizen>
/// <exception cref="ArgumentException">Thrown when an invalid argument is used.</exception>
- /// <exception cref="NotSupportedException">Thrown when the location is not supported.</exception>
public int StayInterval
{
get
/// </summary>
/// <since_tizen>3</since_tizen>
/// <exception cref="ArgumentException">Thrown when an invalid argument is used.</exception>
- /// <exception cref="NotSupportedException">Thrown when the location is not supported.</exception>
public int BatchInterval
{
get
}
/// <summary>
- /// The time interval between batch callback updates. The BatchPeriod should be greater than or equal to the BatchInterval. If BatchPeriod is zero or smaller than BatchInterval, then batch mode will not working.
+ /// The time interval between batch callback updates. The BatchPeriod should be greater than or equal to the BatchInterval. If BatchPeriod is zero or smaller than BatchInterval, then batch mode will not working. In addition, sometimes the period may not work as you intended, the maximum permissible value for batch_period is device specific.
/// Should be in the range [0~60000] seconds.
/// </summary>
/// <since_tizen>3</since_tizen>
/// <exception cref="ArgumentException">Thrown when an invalid argument is used.</exception>
- /// <exception cref="NotSupportedException">Thrown when the location is not supported.</exception>
public int BatchPeriod
{
get
/// </summary>
/// <since_tizen>3</since_tizen>
/// <exception cref="ArgumentException">Thrown when an invalid argument is used.</exception>
- /// <exception cref="NotSupportedException">Thrown when the location is not supported.</exception>
public double Distance
{
get
/// </summary>
/// <since_tizen>3</since_tizen>
/// <exception cref="ArgumentException">Thrown when an invalid argument is used.</exception>
- /// <exception cref="NotSupportedException">Thrown when the location is not supported.</exception>
public void Dispose()
{
Dispose(true);
add
{
Log.Info(Globals.LogTag, "Adding LocationChanged EventHandler");
- if (_locationChanged == null)
+ if (_batchPeriod > 0 && _batchPeriod > _batchInterval)
{
- if (_batchPeriod > 0 && _batchPeriod > _batchInterval)
- {
- Log.Info(Globals.LogTag, "Calling function SetLocationBatchCallback");
- SetLocationBatchCallback();
- }
- else
- {
- Log.Info(Globals.LogTag, "Calling function SetLocationChangedCallback");
- SetLocationChangedCallback();
- }
+ Log.Info(Globals.LogTag, "Calling function SetLocationBatchCallback");
+ SetLocationBatchCallback();
+ }
+ else
+ {
+ Log.Info(Globals.LogTag, "Calling function SetLocationChangedCallback");
+ SetLocationChangedCallback();
}
_locationChanged += value;
}