Veecheck 2.0

If you are currently using an older version of the Veecheck library please read the Changes section.

Veecheck is a small library that can be configured to periodically retrieve a small XML document and issue a Notification based on the current version of the application and the versions listed in the document.

It is designed to be used to notify users when new versions of an application are available.


Veecheck is distributed under the Apache Version 2.0 licence with the exception of the source code for the sample application which is public domain. Please consult the terms of this licence before using the software. Previous versions of Veecheck were licensed under the GPL v2 licence

For alternative licencing please email me at tomgibara dot com.


Sample Screenshots

The screenshots below are from the Veecheck Sample application.


How to use Veecheck

By far the simplest way to start using the Veecheck library, is to download the source code for the sample application and modify it to meet your needs.

  1. Download the jar file.
  2. Add it as a dependency to you Android project.
  3. Create a concrete extension of the VeecheckReceiver class.
  4. Create a concrete extension of the VeecheckService class.
  5. If using the DefaultNotifier class create a concrete extension of the VeecheckActivity class.
  6. Put entries in your AndroidManifest.xml file for these components so that the receiver receives intents with actions <your app package name>.VEECHECK_RESCHEDULE_CHECKS and <your app package name>.VEECHECK_CONSIDER_CHECK and the service receives intents with the action <your app package name>.VEECHECK_PERFORM_CHECK (see the sample application).
  7. Ensure that your application has the android.permission.INTERNET permission.
  8. If using the PrefSettings convenience class, add code to your application that will initialize the settings for your application (see the sample application).
  9. If everything works as planned, your application should be making periodic requests to a server of your choosing. When an intent that is relevant to your application is found within the returned document, an appropriate notification will be generated and displayed to the user.

The "versions" document format

The document that is parsed by this library is an XML document in which:

The only elements recognized by the parser are:

This represents a possible version of the application. Each element is, in turn, matched against the version information for the current application. As soon as a match is found an appropriate action is determined and the rest of the document is ignored. Each version element should contain zero or one intent elements. If a version element contains no intent element, this is interpreted as meaning "do not notify the user", otherwise the application may take the opportunity to notify the user that some action should be taken regarding this version of the application.
This represents an action that the application should undertake when the user 'activates' a notification. Intent elements should be contained within version elements otherwise they will be ignored.

If no matching version elements are found in the document, the user is not notified.

Version Attributes

The attributes on the version element are used to specify values for the application version to match. Every supplied attribute must exactly match the current application version otherwise the element will be ignored. A version element with no attributes will match any application version.

The package name of the application.
The version code of the application.
The version name of the application.
The brand associated with the device's build.
The ID of the device's build.
The device model.

Intent Attributes

The attributes on an intent element closely model the key properties of the Android Intent class. There is no requirement that the attributes of this element be mapped directly onto the corresponding Intent properties – this is under the control of the application which uses the veecheck library (though the default VeecheckNotifier implementation does this).

A nominal action.
A nominal data URI.
A nominal content type.
A nominal extras bundle. Bundle properties are declared in this attribute using a similar format to that used by CSS style attributes; a semicolon delimited list of colon separated key/value pairs. Whitespace is automatically trimmed from keys and there is no support for escaping semicolons or colons.

Sample "versions" Documents

Direct users of the application versioned 1.0.0 to a (eg. an upgrade activity)

<versions xmlns=""> <version versionName="1.0.0" > <intent action="" /> </version> </versions>

Direct the user of any application without version code 4 to a webpage:

<versions xmlns=""> <version versionCode="4"></version> <version> <intent action="android.intent.action.VIEW" data="" type="text/html" /> </version> </versions>

Use extras to communicate the type and importance of an upgrade:

<versions xmlns=""> <version versionCode="1"> <intent extras="importance: urged; type: security" /> </version> <version versionCode="2"> <intent extras="importance: recommended; type: fixes" /> </version> <version versionCode="3"> <intent extras="importance: optional; type: cosmetic" /> </version> </versions>

Providing upgrade information for more than one application:

<versions xmlns=""> <version packageName="com.example.app1" versionCode="1"> <intent ... /> </version> <version packageName="com.example.app2" versionCode="1"> <intent ... /> </version> </versions>


The first release of Veecheck contained a significant (and rather stupid bug) which causes multiple applications that use the Veecheck library to interfere with each other's update checks. This issue is fixed by this version and it is strongly recommended that applications be upgraded to use this new version.

Changes since 1.0