Configuration Settings |
The BlackBerry Workspaces SDK has several settings which control the behavior of the SDK. These settings are specified in your applications configuration. If a particular setting is not specified in an application's configuration the SDK will use a default value for that setting.
The BlackBerry Workspaces SDK uses the following settings for handling configuration files which will be configured in the App.config of the specific project.
First define a section for BlackBerry.Workspaces.Settings in configSection of the App.config like this:
<configSections> <section name="BlackBerry.Workspaces.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> </configSections>
Then add the list of settings inside the section defined for BlackBerry.Workspaces.Settings:
<BlackBerry.Workspaces.Settings> <setting name="DefaultServerURL" serializeAs="String"> <value>www.watchdox.com</value> </setting> <setting name="DownloadBufferSize" serializeAs="String"> <value>4000</value> </setting> <setting name="DownloadToTmp" serializeAs="String"> <value>True</value> </setting> </BlackBerry.Workspaces.Settings>
The following snippet shows how to get or set the settings using BlackBerry.Workspaces.Settings.Portable:
//set BlackBerry.Workspaces.Settings.Portable["DownloadBufferSize"] = 5000; //get int bufferSize = BlackBerry.Workspaces.Settings.Portable.GetInt("DownloadBufferSize"); byte[] buffer = new byte[bufferSize];
These are the types and default values used in the BlackBerry.Workspaces.Settings.
AutoSignInEmail
used to set or get auto signIn email.
Type: string
DefaultServerURL
used to set or get auto signIn email.
Type: string Default value: www.watchdox.com
DownloadBufferSize
used to set or get the download buffer size.
Type: int Default value: 4000
DownloadToTmp
used to set or get whether to download a file to a temporary location.
Type: bool Default value: true
MaximumTimeoutForUpload
used to set or get the maximum time out when downloading a file.
Type: double Default value: 6000
OAuthRedirectUrl
used to set or get Ouath redirect URL.
Type: string Default value: www.google.com