Troubleshooting Overriding Personalization Key Settings with SetOverridePersonalization

Problem: If you override a personalization key using the SetOverridePersonalization API, it stays in effect for the lifetime of the current device application session.

Solution: Restart the device application to reset the SetOverridePersonalization setting.

  1. Use the SetOverridePersonalization API as this code snippet illustrates:
    /// Set OverridePersonalization of the 
    /// <seecref="Sybase.CsClient.personalization"/>. 
    /// </summary>
    /// <remarks> </remarks> 
    public static voidSetOverridePersonalization(string[] paramNames) 
    { 
    try 
    {
    Sybase.UnwiredPlatform.Data.MobileApplication application =
    Sybase.UnwiredPlatform.Data.ApplicationManager.Instance.GetApplication("personalization");
    Sybase.UnwiredPlatform.Data.ParameterCollection parameterCollection
    = application.Parameters; for (int I = 0; I < paramNames.Length;
    I++) {
    parameterCollection[paramNames[i].ToString()].IsOverridePersonalization
    = true; } }
    

  2. Restart the device application to reset SetOverridePersonalization.


Created September 17, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com