In keeping with the idioms established by the Android platform, the Moseycode application uses content providers to expose data to other applications.
There is currently one data set exposed in this way: a history of the barcodes that have been scanned by the user. In the Moseycode parlance these are called portals.
The content provider for portals has the following
Each row returned contains information about a portal that a user has
previously scanned. In keeping with what is understood to be the standard
approach, each row in the data set is uniquely identified by an opaque
long identifier. The
Uri for an individual
portal matches the pattern:
It is intended that future versions of the Moseycode application will support
a larger number of
The following columns can be associated with each portal instance:
_idType: INTEGER (
chamberidType: INTEGER (
shortdataType: INTEGER (
intdataType: INTEGER (
stringType: TEXT (
Stringof space-separated tokens)
typeType: TEXT (
titleType: TEXT (
authorType: TEXT (
firstseenType: INTEGER (
lastseenType: INTEGER (
lastlatType: REAL (
lastlonType: REAL (
lasteleType: REAL (
encountersType: INTEGER (
previewstateType: TEXT (
The Moseycode application generally records a preview image for each barcode it encounters. The quality and nature of this image is highly variable and should not be relied on to provide a consistent thematic appearance. Nevertheless, in most cases it provides a meaningful representation of some aspect of the barcode data.
The preview for a barcode is easily accessed by opening the portal's
Uri using the
on the context's
ContentResolver. The returned
will contain an image using a platform supported encoding (typically PNG), or
will be null if no preview image is available for the portal. An example of how
to access and display preview images is available in the source code for the
Moseycode Harness application.
The default ordering when requesting a set of portals is
lastseen DESC; the last date on which the portal was seen,
most recent first. This reflects the predominant use of the this data set:
providing a barcode history.