Turkcell Updater for Windows Phone is developed to help developers easily handle new versions of their apps. Easily show new version Popups in ForceUpdate, ForceExit and Optional categories or you can show Messages to users by defining them in a remote Turkcell Updater configuration file.
This documents describes usage and structure configuration files used by Turkcell Updater library. { "packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}", "updates": [ { "descriptions": { "*": { "message": "New version available" } }, "targetVersionCode": "1.1.0.0" } ] }
{
"packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}",
"updates": [
{
"descriptions": {
"*": {
"message": "Service wont be available anymore!"
}
},
"forceExit": true
}
]
}
{
"packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}",
"updates": [
{
"filters": {
"deviceOsVersion": "9.*"
},
"descriptions": {
"*": {
"message": "New version available"
}
},
"targetWebsiteUrl": "http://www.windowsphone.com/tr-tr/store/app/turkcell-online-%C4%B0%C5%9Flemler/671f8ed8-7072-4980-9cc4-6da646f0d9fd",
"forceUpdate": true
},
{
"filters": {
"deviceOsVersion": "8.*"
},
"descriptions": {
"*": {
"message": "WP versions earlier than 9.0 are not supported."
}
},
"forceExit": true
}
]
}
{
"packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}",
"updates": [
{
"descriptions": {
"*": {
"message": "New version available"
}
},
"targetPackageName": "{64b25472-6635-4a78-bee5-84374d437134}",
"targetVersionCode": "2.3",
"forceUpdate": true
}
]
}
{
"packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}",
"updates": [
{
"filters": {
"appVersionCode": "<2.0",
"deviceOsName": "wp"
},
"descriptions": {
"tr": {
"message": "Uygulamanın yeni sürümü yayınlandı.",
"whatIsNew": "Hata düzeltildi",
"warnings": "Yeni sürüm ek yetkiler gerektirir"
},
"*": {
"message": "New version available",
"whatIsNew": "Minor bug fixes",
"warnings": "New version requires additional privileges"
}
},
"targetVersionCode": 10
}
]
}
Configuration files are UTF-8 encoded JSON documents and should be served with
"application/json"
content type.
Since configurations may contain vulnerable information like URL of update package they should be only accessible via HTTPS.Root element of files should conform to Configuration Root specifications below.
Documents may contain additional keys but Updater library ignores any other key that is not referred in this document.
Property name | Type | Default value | Platforms | Description | Required | Since |
---|---|---|---|---|---|---|
packageName | String | null | All | Platform specific unique identifier of application which configuration is created for. Package Id for Windows Phone applications. | Yes | 1 |
updates | Array | null | All | List of update entries with 0 or more elements. See Update Entry | No | 1 |
messages | Array | null | All | List of messages with 0 or more elements. See Message Entry | No | 2 |
{
"packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}",
"updates": [
{
"descriptions": {
"*": {
"message": "New version available",
"whatIsNew": "Minor bug fixes",
"warnings": "New version requires additional privileges"
}
},
"targetWebsiteUrl": "http://www.windowsphone.com/tr-tr/store/app/turkcell-online-%C4%B0%C5%9Flemler/671f8ed8-7072-4980-9cc4-6da646f0d9fd",
"forceUpdate": false
}
],
"messages": [
{
"descriptions": {
"*": {
"title": "Offer",
"message": "New application is available!",
"imageUrl": "http://example.com/app2-icon.png"
}
},
"targetWebsiteUrl": "http://www.windowsphone.com/tr-tr/store/app/turkcell-online-%C4%B0%C5%9Flemler/671f8ed8-7072-4980-9cc4-6da646f0d9fd",
"maxDisplayCount": 3
}
]
}
Property name | Type | Default value | Platforms | Description | Required | Since |
---|---|---|---|---|---|---|
filters | Array | null | All | See Filter Entry | No | 1 |
descriptions | Object | null | All | Map of update description entries. Keys (property names) are two letter language codes (see: ISO 639-1) and values are Update Description Entries.
If empty strings ("") or asterisk("*") is used as key, it matches with any language. For iOS : If device language is English but the application language is Turkish asterisk("*")language code is suggested for displaying Turkish descriptions. |
Yes | 1 |
targetVersionCode | Number | -1 | WP | Target version number. See Note #1 |
Yes for WP application, unless forceExit is true |
1 |
targetPackageName | String | Current application's package id. | WP | Package Id of new version. See Note #2 | No | 1 |
forceUpdate | Boolean | false | All | true if user should not skip this update and continue to use application. When true "Exit application" option will be displayed to user instead of "Remind me later" option. |
No | 1 |
forceExit | Boolean | false | All | true if user should not have any option other than exiting application. When true only "Exit application" option will be displayed to user. |
No | 2 |
targetWebsiteUrl | String | null | All | Windows Phone Marketplace link of the target application. | See Note #2 | 1 |
targetUriSchema | String | null | WP | Uri schema to launch target application if it is already installed. Please note that Updater sdk can only check installations from the same publisher. If the target apps' and current apps' publishers are different then probably Store application will be launched to show the details page of the target application. | See Note #2 | 1 |
- Version entries will be omitted if
targetPackageName
is same with current applications package name andtargetVersionCode
is same with current applications version code. This check is performed in order avoid updates to existing version. - Any update entry should meet at least one of the following conditions, Otherwise current applications details page will be opened in Store application.
forceExit
istrue
targetPackageName
is notnull
or emptytargetWebsiteUrl
is notnull
or emptytargetUriSchema
is notnull
or empty
</li> </ol>
{ "packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}", "updates": [ { "descriptions": { "*": { "message": "New version available" } }, "targetPackageName": "{50282631-ff07-49f8-a313-de06022ca461}", "targetVersionCode": "1.0", "targetUriSchema": "updatersample://helloworld", "forceUpdate": true } ] }
Property name | Type | Default value | Platforms | Description | Required | Since |
---|---|---|---|---|---|---|
filters | Array | null | All | See Filter Entry | No | 2 |
descriptions | Object | null | All | Map of message description entries. Keys (property names) are two letter language codes (see: ISO 639-1) and values are Message Description Entries. If empty strings ("") or asterisk("*") is used as key, it matches with any language. | Yes | 2 |
id | Number | For WP, Auto generated value using targetWebsiteUrl , targetPackageName and descriptions . |
All | Unique ID of message. ID is used when determining last display date and total display count of message. | No | 2 |
targetPackageName | String | null | WP | WP: Target applications' (offered application) package id. | No | 2 |
targetWebsiteUrl | String | null | All | URL of web page that contains offered application. | No | 2 |
maxDisplayCount | Number | 2147483647 | All | Maximum display count of message | No | 2 |
displayBeforeDate | String | null | All | If not null, message should not be displayed after this date. For date format details see Note #1 | No | 2 |
displayAfterDate | String | null | All | If not null, message should not be displayed before this date. For date format details see Note #1 | No | 2 |
displayPeriodInHours | Number | 0 | All | Minimum duration in hours that should pass before displaying this message again | No | 2 |
- Following date formats from ISO 8601 are supported:
- "yyyy-MM-dd" example: "1969-12-31" "1970-01-01"
- "yyyy-MM-dd HH:mm" example: "1969-12-31 16:00", "1970-01-01 00:00"
{
"packageName": "{1fa4c550-7e08-4dae-b3e2-bd2ab24761f3}",
"messages": [
{
"descriptions": {
"*": {
"title": "Offer",
"message": "New application is available!",
"imageUrl": "http://technology.inquirer.net/files/2013/10/Microsoft-Windows-8.1.jpg"
}
},
"targetPackageName": "{64b25472-6635-4a78-bee5-84374d437134}",
"targetGooglePlay": true,
"displayAfterDate": "2013-01-01",
"displayBeforeDate": "2013-12-01",
"maxDisplayCount": 20
}
]
}
Filter entries consist of key and value pairs. Keys are property names and values are filtering rules.
Filtering rules format applies to all values of filter entry:
- Rules are sequences of rule parts joined with ","
- Both rule parts and values are converted to lower case and trimmed before comparison
- Order of rule parts doesn't change the result, example: "!b,a" is same with "a,!b"
"*"
,null
or empty string matches with any value includingnull
"''"
matches withnull
or empty string"!''"
matches with any value exceptnull
or empty string"![rule part]"
excludes any value matches with [rule]"[value]"
matches with any value equals to [value]"[prefix]*"
matches with any value starting with [prefix]"*[suffix]"
matches with any value ending with [suffix]"[prefix]*[suffix]"
matches with any value starting with [prefix] and ending with [suffix]">[integer]"
matches with any value greater than [integer]">=[integer]"
matches with any value greater than or equals to [integer]"<[integer]"
matches with any value lesser than [integer]"<=[integer]"
matches with any value lesser than or equals to [integer]"<>[integer]"
matches with any value not equals to [integer]
<tr>
<td>appVersionCode</td>
<td>String</td>
<td>null</td>
<td>WP</td>
<td>Application version. Major and Minor numbers are mandatory.<br />
Example: 1.1.0.0 or 2.3<br />
</td>
<td>No</td>
<td>1</td>
</tr>
Property name | Type | Default value | Platforms | Description | Required | Since |
---|---|---|---|---|---|---|
appPackageName | String | null | All | Filter rule for package name of application. Example value: "com.sample.app". |
No | 1 |
deviceOsName | String | null | WP | Name of operating system of device. Values: "android", "ios", "wp". |
No | 1 |
deviceOsVersion | String | null | All | Version name of operating system of device. Example value: "2.3.3". |
No | 1 |
deviceBrand | String | null | WP | Brand name of device. Example value: "NOKIA" |
No | 1 |
deviceModel | String | null | All | Model name of device. | No | 1 |
deviceIsTablet | String | null | All | For Windows Phone this value is false |
No | 1 |
deviceLanguage | String | null | All | Two letter language code of device
(see: ISO 639-1). Example values: "en", "tr", "fr". |
No | 1 |
x-<Application defined key> | String | null | WP | "x-" is prefix for application defined keys of arbitrary properties. Applications may define and add own custom property key-value pairs for application specific filters. Example values: "x-foo", "x-bar". |
No | 1 |
deviceMcc | String | null | WP | For Windows Phone, only operators in Turkey are available. See Mobile country code Example value: "286" for Turkey. |
No | 1 |
deviceMnc | String | null | WP | For Windows Phone, only operators in Turkey are available. Mobile network code of device. See Mobile country code Example value: "01" for Turkcell. |
No | 1 |
updaterLevel | String | null | WP | An integer number that is used to define updater version used by application. Example value: "1" for initial version of updater sdk. |
No | 1 |
{
"deviceOsName": "wp",
"deviceOsVersion": "8.*",
"appVersionCode": "2.4.3, 2.4.4, 2.5.*, 3.*, 4.*, 5.*",
"deviceIsTablet": "false"
}
See Update Entry
Type: Object
Property name | Type | Default value | Platforms | Description | Required | Since |
---|---|---|---|---|---|---|
message | String | null | All | Summary information describing update contents. | Yes | 1 |
whatIsNew | String | null | All | Describes changes and new features of new version. | No | 1 |
warnings | String | null | All | Warning text about the update. Any important issues that user should know before updating should be described here. | No | 1 |
{
"message": "New version available",
"whatIsNew": "Minor bug fixes",
"warnings": "New version requires additional privileges"
}
See Message Entry
Type: Object
Property name | Type | Default value | Platforms | Description | Required | Since |
---|---|---|---|---|---|---|
title | String | null | All | Text that will be displayed at title of message dialog. | No | 2 |
message | String | null | All | Text displayed inside message dialog. | Yes | 2 |
imageUrl | String | null | All | Fully qualified URL of image file that is displayed in message dialog. It should refer to a square PNG or JPEG with preferably at 100x100 pixels size. | No | 2 |
{
"title": "Offer",
"message": "New application is avaliable!",
"imageUrl": "http://example.com/app2-icon.png"
}