Property – sleepBool

  • Property

    sleepBool

    A boolean which tells the tracker that it should sleep.


    Declaration

     

    Discussion

    The default state of this feature is false. When set to true, certain activities within the tracker will be suspended until such time as this boolean is returned to false.

    NOTE: This is an advanced feature which should not be regarded as required. Most integrations will not use this feature.

    This feature serves the following purposes:

    • You may hold the tracker from moving forward with sending information to the server, such as an install record, until such time as permissions may be granted. One such example would be location services. You may want to hold sending an install record until the user’s location may be gatherable. This is the primary purpose for this feature.
    • You may reduce background activities associated with the tracker during a period of cpu intensive user interaction. The background activities associated with the SDK are specifically engineered to minimize cpu pressure; however, this feature could be used to effectively shut down certain activities over a finite period of time.

     

    The list of affected activities includes, but is not limited to:

    • The refreshing of tracker configurations from the server.
    • The sending of an install to the server.
    • The sending of updates to the server.
    • The sending of events to the server.
    • The retrying of incomplete network transactions.

     

    Activities in progress at the time the sleepBool is set to true may be allowed to complete, as opposed to being interrupted. Activities initiated from the host will be allowed to execute up to a certain point, but may be held prior to reaching completion.

    The burden on the system when toggling this boolean is minimal. It may be toggled at any time, and may be toggled many times in rapid succession. For performance reasons it is recommended that it not be toggled in a tight loop. In general this feature should be used over periods of time expected to exceed about one second.

     

    Sample Code:

  • Property

    sleepBool

    A boolean which tells the tracker that it should sleep.


    Declaration

     

    Discussion

    The default state of this feature is false. When set to true, certain activities within the tracker will be suspended until such time as this boolean is returned to false.

    NOTE: This is an advanced feature which should not be regarded as required. Most integrations will not use this feature.

    This feature serves the following purposes:

    • You may hold the tracker from moving forward with sending information to the server, such as an install record, until such time as permissions may be granted. One such example would be location services. You may want to hold sending an install record until the user’s location may be gatherable. This is the primary purpose for this feature.
    • You may reduce background activities associated with the tracker during a period of cpu intensive user interaction. The background activities associated with the SDK are specifically engineered to minimize cpu pressure; however, this feature could be used to effectively shut down certain activities over a finite period of time.

     

    The list of affected activities includes, but is not limited to:

    • The refreshing of tracker configurations from the server.
    • The sending of an install to the server.
    • The sending of updates to the server.
    • The sending of events to the server.
    • The retrying of incomplete network transactions.

     

    Activities in progress at the time the sleepBool is set to true may be allowed to complete, as opposed to being interrupted. Activities initiated from the host will be allowed to execute up to a certain point, but may be held prior to reaching completion.

    The burden on the system when toggling this boolean is minimal. It may be toggled at any time, and may be toggled many times in rapid succession. For performance reasons it is recommended that it not be toggled in a tight loop. In general this feature should be used over periods of time expected to exceed about one second.

     

    Sample Code:

 
 

Last Modified: Jul 12, 2018 at 10:29 am