Developer

FeatureVectorPolicy Handling and Compatibilty with v2 Registration Service for Android

mobile service for development and operations and SAP Mobile Platform Server version 3.0 SP08 and later provides a registration service and Application Settings structure named v2, that is compatible with SAP Mobile Platform SDK version 3.0 SP09 and later.

The SAP Mobile Platform SDK Logon component attempts to connect to the v2 registration service and if it is not available (for example, an older server version) it falls back to the v1 registration service. The ApplicationSettings subcomponent uses the service version for which the registration succeeded to get the application settings. The ApplicationSettings provides access to feature vector policy settings from SP09 on all platforms, which can be accessed through the ApplicationSettings class. The policy is provided as a dictionary (platform dependent) of a string and FeatureVectorPolicy key value pairs.

The properties of a FeatureVectorPolicy are:
  • Properties:
    • AdditionalParameters : IReadOnlyDictionary<string, IReadOnlyProperty>
    • Description : string
    • DisplayName : string
    • Id : string
    • JsModule : string
    • Name : string
    • PluginName : string
    • Version : string
    • Whitelist : string
  • Methods: FeatureVectorPolicy()
ApplicationSettings also provides a simple property to get all Usage related Settings from the IUsageSettings object. Properties are:
  • IsAppSpecificClientUsageKeysEnabled : bool?
  • ShouldCollectClientUsageReports : bool?
  • Usage3GUploadTime : uint?

Android FeatureVectorPolicy API Usage

ApplicationSettings API:
class AppSettings
          /**
          * Returns the feature vector policy items
          * @return HashMap<String, FeatureVectorPolicy>
          */
         public HashMap<String, FeatureVectorPolicy> getFeatureVectorPolicies()
                
          /**
          * Returns the usage related setting values
          * @return AppSettingsUsageSettings instance
          * @throws LogonCoreException
          */
public AppSettingsUsageSettings getUsageSettings()       
FeatureVectorPolicy:
class FeatureVectorPolicy
/**
       * Returns the Name attribute of the FeatureVectorPolicy
       */
       public String getName() 
       
       /**
       * Returns the PluginName attribute of the FeatureVectorPolicy
       */
       public String getPluginName() 

       /**
       * Returns the ID attribute of the FeatureVectorPolicy
       */
       public String getId() 

       /**
       * Returns the jsModule attribute of the FeatureVectorPolicy
       */
       public String getJsModule() 

       /**
       * Returns the version attribute of the FeatureVectorPolicy
       */
       public String getVersion() 

       /**
       * Returns the displayName attribute of the FeatureVectorPolicy
       */
       public String getDisplayName() 

       /**
       * Returns the whitelist attribute of the FeatureVectorPolicy
       */
       public String getWhitelist() 

       /**
       * Returns the additionalProperties attribute of the FeatureVectorPolicy
       */
       public HashMap<String, AppSettingsReadOnlyProperty> getAdditionalProperties() 
       
       /**
       * Returns the description attribute of the FeatureVectorPolicy
       */
       public String getDescription() 
Usage configuration Settings provided by ApplicationSettings:
class AppSettingsUsageSettings
               /**
       * Returns the isAppSpecificClientUsageKeysEnabled value.
       * This value indicates whether the application specific client usage keys are enabled or not.
       */
       public boolean getIsAppSpecificClientUsageKeysEnabled() 
       
       /**
       * Returns the shouldCollectClientUsageReports value.
       * This value shows if the client usage reports should be collected or not.
       */
       public boolean getShouldCollectClientUsageReports()
       
       /**
       * Returns the usage3GUploadTime value.
       * This value indicates how many days Usage should wait before trying to send data on 3G.
       */
       public int getUsage3GUploadTime()