Reads QR codes that have a URL in them, and expects a JSON response formatted like this example:
{
data: {
ImageKey: {
type: "picture",
data: "base64 encoded image string",
subdata: "jpeg"
},
HeaderKey: {
type: "text",
data: "Some Person",
subdata: "Some Subdued Text"
},
AvatarKey: {
type: "picture"
data: "base64 encoded image string",
subdata: "png"
},
ActionKey: {
type: "action",
subtype: "call",
data: "Call Person",
subdata: "1234567890"
},
TextKey: {
type: "text",
data: "Person Name",
subdata: "Person Date of Birth"
},
TitleKey: {
type: "text",
data: "List Title"
}
},
display: [
{
cardType: "glance",
image: "ImageKey",
header: "HeaderKey",
avatar: "AvatarKey",
footerActions: [
"ActionKey"
],
footerTexts: [
"TextKey"
]
},
{
cardType: "list",
title: "TitleKey",
data: [
"LiteralString",
"LiteralString2"
]
}
]
}
Data Objects (eg, those in data) have this general format:
{
type (required)
subtype
data (required)
subdata
}
-
typeis one ofpicture,text,action, orlist. -
subtypecurrently only applies toaction, and it can beemailorcall. The contact information is stored insubdata. -
dataandsubdataare arbitrary strings.subdataonly currently applies totext,action, andpicture. Fortextit is some subdued text shown beneath. Forpictureit is the image type (ie,png, orjpeg).actionis described above.
Card Objects (eg, those in display) vary in format based on the card type. Currently, there are two card types: glance and list.
glance follows this format:
{
cardType (required)
image
header
avatar
footerActions
footerTexts
}
cardTypeis"glance".imageis a key to a Data Object (with the typepicture).headeris a key to a Data Object (with the typetext).avataris a key to a Data Object (with the typepicture).footerActionsis an array of keys to Data Objects (with the typeaction).footerTextsis an array of keys to Data Objects (with the typetext).
list follows this format:
{
cardType (required)
title
data
}
cardTypeis"list".titleis an arbitrary string.datais a key to a Data Object (with the typelist).