DecodedResult
The DecodedResult object will provide the result of the scanned object. It will contain:
// A string containing the scanned content. Might be null if the content can't be represented as a string
String resultString;
// Raw bytes containing the scanned content
byte[] resultByte;
// Type of the decoded code
long codeType;
// Subtype of the decoded code
long codeSubType;
// Only used in qr code for now.
// If the warning isn’t null, there has been an issue while trying convert the data into text.
// You might want to use the resultByte if there is warning.
boolean errorParsingQrCode;
// Map containing metadata about the result
HashMap<String, String> metadata
Note on the DecodedResult.metadata
All decoders:
- type: a text description of the type of code found in the image.
Code 39 and Code ITF decoders:
- ValidCRC: indicates whether the barcode's optional check digit is valid. It is
truewhen the scanned value matches the calculated check digit.
Theia decoder:
- score: plate recognition score (between 0.0 and 1.0).
- color: color of the plate (not the car).
- country: if determined, the origin of the plate.
- stage_number: the number of stages of the plate.
- plate_type: the plate category. See Plate categories for the possible values.
Plate categories
Categories the plate reader can return for each country. New categories may be added in later versions: make sure your implementation handles values not listed here.
Categories by country
| Country | Categories |
|---|---|
| Switzerland (CHE) | Regular, Diplomatic, Military, Agricultural, Rear carrier, Exceptional, Garage, Slow vehicle, Temporary, Work vehicle, Moped, Segway, Moped/Segway |
| Liechtenstein (LIE) | Regular, Agricultural, Rear carrier, Exceptional, Garage, Short-term, Temporary, Work vehicle, Unknown |
| Germany (DEU) | Regular, Diplomatic, Military, Police, Government, Moped |
| Austria (AUT) | Regular, Diplomatic, Consular, Military, Police, Fire brigade, Government |
| Italy (ITA) | Regular, Motorcycle, Moped, Trailer, Diplomatic, Military, Firefighter |
| United Kingdom (GBR), Isle of Man (GBM), Gibraltar (GIB) | Regular |
| Jersey (GBJ) | Regular, Special |
| France (FRA) | Unknown |
| Any other country | Unknown |
Category descriptions
| Category | Description |
|---|---|
| Regular | Standard plate for private vehicles. |
| Diplomatic | Diplomatic missions and their staff (CD, CC, AT...). |
| Military | Army vehicles (e.g. M in Switzerland, Y in Germany, BH in Austria). |
| Agricultural | Light green plate of agricultural and forestry vehicles (Switzerland, Liechtenstein). |
| Rear carrier | Third, red plate on a rear carrier such as a bike rack (Switzerland, Liechtenstein). |
| Exceptional | Light brown plate of exceptional vehicles, outside the size or weight rules (Switzerland, Liechtenstein). |
| Garage | Dealer plate, marked with the letter U (Switzerland, Liechtenstein). |
| Slow vehicle | Yellow plate that matches no other Swiss format; no "slow vehicle" plate exists in law. |
| Temporary | Provisional plate, ending in Z in Switzerland (vehicles in the country for a limited time). |
| Work vehicle | Light blue plate of work vehicles (Switzerland, Liechtenstein). |
| Moped | Moped plate (Switzerland, Italy), including fast e-bikes in Switzerland, or German insurance plate. See Moped and Segway plate types. |
| Segway | Despite its name, the yellow Swiss plate of small motorcycles and light motor vehicles. See Moped and Segway plate types. |
| Moped/Segway | Three-line yellow Swiss plate, moped or Segway, when the reader cannot tell which. |
| Short-term | Liechtenstein day plate, valid 24 to 96 hours. |
| Unknown | No category could be determined (no matching format, French plates, some Liechtenstein plates). |
| Police | Police vehicles (BP in Germany and Austria). |
| Government | Federal or state authority vehicles (e.g. BD in Germany, A in Austria). |
| Consular | Austrian consular plates (e.g. WK). |
| Fire brigade | Austrian fire brigade plates (FW). |
| Motorcycle | Square Italian motorcycle plate. |
| Trailer | Italian trailer plate, starting with X. |
| Firefighter | Italian fire corps plates (VF). |
| Special | Jersey JSY plates. |
Moped and Segway plate types
Moped and small two-wheeler plates recognized since version 4.1.9:
| Type | Country | Description |
|---|---|---|
Moped | Switzerland (CHE) | Yellow 100 × 140 mm plate for light motorcycles (Motorfahrräder): mofas, fast e-bikes (pedal assistance above 25 km/h), motorized wheelchairs faster than 20 km/h and Segway-type self-balancing scooters. Three lines: the canton code at the top, then the number. An insurance sticker showing the year is placed next to the canton and must be renewed every year. |
Segway | Switzerland (CHE) | Yellow plate of the same format, with the Swiss and cantonal coats of arms on either side of the canton, and no sticker. It has been the plate of Kleinmotorräder since July 2013: two- or three-wheelers with an engine up to 45 km/h, 4 kW and 50 cm³, such as 50 cm³ scooters. Segway self-balancing scooters carried it until June 2015, hence the type name; in practice it is only seen on scooters. |
Moped/Segway | Switzerland (CHE) | One of the two yellow plates above, when the reader cannot tell which. |
Moped | Germany (DEU) | Insurance plate (Versicherungskennzeichen) for mofas, mopeds and scooters, on two lines: three digits at the top that identify the insurer, and three letters at the bottom, for example 261 / TUB. It is valid for one year, until the end of February, and its color changes every year (black, blue or green). |
Moped | Italy (ITA) | Plate for ciclomotori, mandatory since July 2006: square (142 × 122 mm), white background, six black characters on two lines of three, for example X7T86P. The leading X distinguishes these plates from the former small plates (targhini). |