Difference between revisions of "Optical code"
(→Searching for objects) |
|||
(17 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | In order for the users to find objects more efficiently, {{UBIK}} | + | In order for the users to find objects more efficiently, {{UBIK}} objects can be marked with values for optical codes. Whenever a user scans an optical code, the resulting code value can be used to find all matching objects, namely objects that have the [[#Technical_background|right property]]. |
== Types of optical codes == | == Types of optical codes == | ||
Line 11: | Line 11: | ||
The following scanners are used for scanning: | The following scanners are used for scanning: | ||
− | * ZXing Barcode Scanner | + | * ZXing Barcode Scanner (for barcodes and QR codes) |
− | * ID Marker Scanner - based on Metaio. (for ID Markers) | + | * ID Marker Scanner - based on Metaio. (for ID Markers) This is now obsolete. |
+ | * Getac Z710 integrated barcode/qr-code scanner (from version 2.4.4 on) | ||
+ | |||
+ | |||
== Searching for objects == | == Searching for objects == | ||
− | {{UBIK}} provides two | + | {{UBIK}} provides two mechanisms for searching objects: [[Sync Mode#Possible sync modes|online and offline]]. |
=== Searching offline === | === Searching offline === | ||
Line 24: | Line 27: | ||
=== Searching online === | === Searching online === | ||
− | When the Internet is | + | When the Internet is available and {{UBIK}} is not running under offline mode, the search result is enhanced by online search. This means any objects that match the scanned results can be found even if they don't yet exist locally. |
== Presenting results of a search == | == Presenting results of a search == | ||
Once the objects are found, they are displayed in a list. The users can then browse to any of the objects for more information by clicking on the objects. | Once the objects are found, they are displayed in a list. The users can then browse to any of the objects for more information by clicking on the objects. | ||
+ | |||
+ | == Multiple codes on a single object {{Version/WinXSince|4.4}}{{Version/XamarinSince|4.4}} == | ||
+ | It's possible have multiple optical codes on a single object. This allows the same object to be found when you scan any of those codes. | ||
+ | For [[SYSCLS_OBJECTWITHIDMARKERS|such objects]], the general scan and potentially the search behaviors are exactly the same as those with only a single code. For example, if an object with multiple codes is found when you scan one of the codes, it could also get unlocked. | ||
+ | |||
+ | |||
+ | == Scan with code affixes {{Version/WinXSince|4.6}}{{Version/XamarinSince|4.6}} == | ||
+ | Sometimes it's necessary to use the same physical marker (like a printed out QR marker plate) to find multiple objects. {{UBIK}} provides a possibility to start scanning from a context object (classified by the ScanCodeAffixClassification). The object can carry a scan code prefix and a suffix which are taken into account in the search. | ||
+ | |||
+ | For example, if you scan a code "A00100" in a regular scan session, only objects with that code will be found. But if you do the same scan from a context object carrying a scan code prefix "P0" and a suffix "S1", only objects with "P0A00100S1" will be found. | ||
+ | {{Hint|This option is available as "Scan from here" in the context menu of a content page. If the context object is not classified, the option is disabled.}} | ||
+ | {{Attention|The code affixes are strings and only affect barcodes and QR codes.}} | ||
+ | |||
+ | == Unlocking objects == | ||
+ | In some scenarios where topics such as security, regulations etc. are of higher importance, some objects can often be locked by default until certain codes are scanned. | ||
+ | |||
+ | {{Attention|The unlock codes are always compared case sensitive.}} | ||
+ | |||
+ | === Unlock after a search === | ||
+ | By default, a search is started for every scanned code. If an object is found, it is presented in the UI and [[SYSCLS_UNLOCK_BY_SCAN|unlocked]]. [[SYSCLS_UNLOCK_GROUP_BY_SCAN|A group of objects sharing the same unlock code]] are unlocked as well. | ||
+ | |||
+ | === Unlock mode {{Version/XamarinSince|1.2}} === | ||
+ | [[File:Client_UWP_UnlockCodeNotification.png|x200px|thumb|alt=Unlock notification|Unlock notification]] | ||
+ | It's also possible to start a scan with an "unlock mode" (see XAML example below). In this mode, the app doesn't rely on the [[#Searching_for_objects|search mechanism]] to find the objects and, therefore, doesn't present anything in the UI. Instead, any objects having their [[SYSCLS_UNLOCK_GROUP_BY_SCAN|unlock code]] matching the scanned one are unlocked in the background. | ||
+ | * It doesn't matter whether objects having the unlock code are present at the time when that code is scanned or not. The scanned unlock code will be remembered for 15 minutes. If objects carrying that same unlock code show up on the client (locally created or downloaded from the server) within that time, they will have an unlocked status automatically; | ||
+ | * It's possible (but optional) to specify an expected unlock code as well. In that case, nothing gets unlocked if the scanned code doesn't match the specified one. | ||
+ | |||
+ | |||
+ | Example XAML code to enable the unlock mode: | ||
+ | <tabs> | ||
+ | <tab name="UWP"> | ||
+ | <source lang = "xml"> | ||
+ | <Button | ||
+ | ... | ||
+ | xmlns:controls="using:UBIK.WinX.Controls" | ||
+ | Command="{Binding NavigateToScanPageCommand}"> | ||
+ | <Button.CommandParameter> | ||
+ | <controls:KeyValueList> | ||
+ | <controls:KeyValueParameter Key="UnlockMode" Value="true" /> | ||
+ | <controls:KeyValueParameter Key="UnlockCode" Value="$LWP01" /> | ||
+ | </controls:KeyValueList> | ||
+ | </Button.CommandParameter> | ||
+ | </Button> | ||
+ | |||
+ | </source> | ||
+ | </tab> | ||
+ | |||
+ | <tab name="Xamarin"> | ||
+ | <source lang = "xml"> | ||
+ | <Button | ||
+ | ... | ||
+ | xmlns:classes="clr-namespace:UBIK.CPL.Classes;assembly=UBIK.CPL" | ||
+ | Command="{Binding NavigateToScanPageCommand}"> | ||
+ | <Button.CommandParameter> | ||
+ | <classes:KeyValueList> | ||
+ | <classes:KeyValueParameter Key="UnlockMode" Value="true" /> | ||
+ | <classes:KeyValueParameter Key="UnlockCode" Value="$LWP01" /> | ||
+ | </classes:KeyValueList> | ||
+ | </Button.CommandParameter> | ||
+ | </Button> | ||
+ | |||
+ | </source> | ||
+ | </tab> | ||
+ | </tabs> | ||
== Technical background == | == Technical background == | ||
Line 44: | Line 111: | ||
== See also == | == See also == | ||
− | * [[Find Objects by Optical Codes]] | + | * [[HowTo:Find Objects by Optical Codes]] |
+ | * [[HowTo:Make_an_Object_be_found_by_Optical_Codes]] | ||
+ | * [[SYSCLS OBJECTWITHIDMARKER]] (Classification) | ||
+ | * [[SYSCLS_OBJECTWITHRFIDTAG]] (Classification) | ||
+ | * [[SYSCLS_IDMARKERSCANQUERY]] (Classification) | ||
+ | * [[SYSCLS_RFIDTAGSCANQUERY]] (Classification) | ||
− | [[Category: | + | [[Category:Client|Optical code]] |
Latest revision as of 17:32, 8 November 2023
In order for the users to find objects more efficiently, UBIK® objects can be marked with values for optical codes. Whenever a user scans an optical code, the resulting code value can be used to find all matching objects, namely objects that have the right property.
Contents
Types of optical codes
The following types are supported at the moment:
- Barcode;
- QR Code;
- ID Marker.
Types of scanners
The following scanners are used for scanning:
- ZXing Barcode Scanner (for barcodes and QR codes)
- ID Marker Scanner - based on Metaio. (for ID Markers) This is now obsolete.
- Getac Z710 integrated barcode/qr-code scanner (from version 2.4.4 on)
Searching for objects
UBIK® provides two mechanisms for searching objects: online and offline.
Searching offline
In any case (regardless of the network connection and sync mode), UBIK® always goes through all the objects currently available on the device and find the ones that match the scanned results.
Searching online
When the Internet is available and UBIK® is not running under offline mode, the search result is enhanced by online search. This means any objects that match the scanned results can be found even if they don't yet exist locally.
Presenting results of a search
Once the objects are found, they are displayed in a list. The users can then browse to any of the objects for more information by clicking on the objects.
Multiple codes on a single object
It's possible have multiple optical codes on a single object. This allows the same object to be found when you scan any of those codes. For such objects, the general scan and potentially the search behaviors are exactly the same as those with only a single code. For example, if an object with multiple codes is found when you scan one of the codes, it could also get unlocked.
Scan with code affixes
Sometimes it's necessary to use the same physical marker (like a printed out QR marker plate) to find multiple objects. UBIK® provides a possibility to start scanning from a context object (classified by the ScanCodeAffixClassification). The object can carry a scan code prefix and a suffix which are taken into account in the search.
For example, if you scan a code "A00100" in a regular scan session, only objects with that code will be found. But if you do the same scan from a context object carrying a scan code prefix "P0" and a suffix "S1", only objects with "P0A00100S1" will be found.
This option is available as "Scan from here" in the context menu of a content page. If the context object is not classified, the option is disabled. |
Unlocking objects
In some scenarios where topics such as security, regulations etc. are of higher importance, some objects can often be locked by default until certain codes are scanned.
Unlock after a search
By default, a search is started for every scanned code. If an object is found, it is presented in the UI and unlocked. A group of objects sharing the same unlock code are unlocked as well.
Unlock mode
It's also possible to start a scan with an "unlock mode" (see XAML example below). In this mode, the app doesn't rely on the search mechanism to find the objects and, therefore, doesn't present anything in the UI. Instead, any objects having their unlock code matching the scanned one are unlocked in the background.
- It doesn't matter whether objects having the unlock code are present at the time when that code is scanned or not. The scanned unlock code will be remembered for 15 minutes. If objects carrying that same unlock code show up on the client (locally created or downloaded from the server) within that time, they will have an unlocked status automatically;
- It's possible (but optional) to specify an expected unlock code as well. In that case, nothing gets unlocked if the scanned code doesn't match the specified one.
Example XAML code to enable the unlock mode:
UWP
...
xmlns:controls="using:UBIK.WinX.Controls"
Command="{Binding NavigateToScanPageCommand}">
<Button.CommandParameter>
<controls:KeyValueList>
<controls:KeyValueParameter Key="UnlockMode" Value="true" />
<controls:KeyValueParameter Key="UnlockCode" Value="$LWP01" />
</controls:KeyValueList>
</Button.CommandParameter>
</Button>
Xamarin
...
xmlns:classes="clr-namespace:UBIK.CPL.Classes;assembly=UBIK.CPL"
Command="{Binding NavigateToScanPageCommand}">
<Button.CommandParameter>
<classes:KeyValueList>
<classes:KeyValueParameter Key="UnlockMode" Value="true" />
<classes:KeyValueParameter Key="UnlockCode" Value="$LWP01" />
</classes:KeyValueList>
</Button.CommandParameter>
</Button>
Technical background
In order for objects to be identifiable through optical codes, they have to carry the SYSCLS OBJECTWITHIDMARKER classification.
The data types of different optical codes are listed as follows:
- Barcode - String;
- QR Code - String;
- ID Marker - Integer.
The service query used for online searching is IDMARKERSCANQUERY.
See also
- Find Objects by Optical Codes
- Make an Object be found by Optical Codes
- SYSCLS OBJECTWITHIDMARKER (Classification)
- SYSCLS OBJECTWITHRFIDTAG (Classification)
- SYSCLS IDMARKERSCANQUERY (Classification)
- SYSCLS RFIDTAGSCANQUERY (Classification)