]> rtime.felk.cvut.cz Git - hornmich/skoda-qr-demo.git/blob - README.txt
Fix application crashing issue
[hornmich/skoda-qr-demo.git] / README.txt
1 Author: Michal Horn
2 Date: 18.2.2015
3
4 The Demo application for Skoda Auto Mlada Boleslav
5 ==================================================
6 1. Introduction
7 ----------------
8 This demo application is available for Google Glass with XE22 firmware (Android 4.4.4)
9 and tablets and smart phones with Android at least 4.1.6.
10 The demo application is designed for viewing PDF documentation for components. The user
11 scans the QR code containing an identifier of the component. The application views a picture
12 of the component with a menu with all available documents for it.
13 The user then select the document he wants to view and the application opens the
14 PDF file.
15
16 The demo consists of two applications. Both of them have to be installed on the device in
17 order to run the demo.
18
19 1.1 BarCodeScanner
20 ------------------
21 This is a standalone application based on zxing library for scanning 2D codes. The repository with the original versions of the application can be accessed from https://github.com/zxing/zxing.
22 This version is slightly modified to work better with our codes and devices and is tuned to not conflict with the original one. The application does not create any icon in the launcher. You
23 can check and ininstall it from the Applicatinos settings dialog.
24 The BarCodeScanner is invoked from QRScanner as an intent from mobile version or through the
25 Integration layer from glass version.
26
27 1.2 QRScanner
28 -------------
29 This is the main application that invokes the code scanning, creates preview, open PDF files and
30 interacts with the user.
31 In order to work properly, the BarCodeScanner application is required to be installed on the
32 device.
33
34 2. Installation
35 ===============
36 2.1 BarCodeScanner
37 ------------------
38 To run properly, the BarCodeScanner from this repository is required to be installed. To install
39 the BarCodeScanner application run this command:
40 ./adb install /path_to_package/mobile-debug.apk for smart phones and tablets or
41 ./adb install /path_to_package/glass-debug.apk for Google Glass.
42
43 This application does not create any launcher application.
44
45 2.2 QRScanner
46 -------------
47 This application needs a database of te documents to be created to work correctly. The
48 database is a simple file structure stored in /storage/sdcard0/Pictures/skoda/components/ on
49 the device. This root folder contains subfolders named as the component ID. Every one
50 of this subfolders contains pdf files with documents available for the particular component.
51
52 To install the database, which source is present in /repository/QRScanner/database run this command:
53 ./adb shell mkdir -P /storage/sdcard0/Pictures/skoda/components/
54 ./adb push /repository/QRScanner/database /storage/sdcard0/Pictures/skoda/components/
55
56 To install the application itself run this command
57 ./adb install /path_to_package/mobile-debug.apk for smart phones and tablets or
58 ./adb install /path_to_package/glass-debug.apk for Google Glass.
59
60 3. Usage of the Google Glass version
61 ====================================
62 3.1 Launch the application
63 --------------------------
64 The application can be launched by taping on SkoMan item in the menu. A fullscreen Skoda logo
65 will appear once the application is loaded and running.
66
67 You can exit the application from this screen by the slide down gesture on the touchpad.
68
69 3.2 Scanning QR codes
70 ---------------------
71 The application retrieves the component ID by scanning the QR code. The scanning can be
72 started by one tap on the touchpad, when the fullscreen Skoda logo is displayed.
73 The scanner provides a preview image from the camera to the display. To capture the code,
74 aim the code to the middle of the display. The Code should be recognized in a second or two.
75 and once the code is recognized, the application switches to a component preview activity.
76
77 You can abort recognizing in every time and return back to the start screen by the slide down gesture on the touchpad.
78
79 If the recognition process takes significantly longer, check:
80  1) If the code in the camera preview is too large, try the recognition from bigger distance.
81  2) If the code in the preview is too small, try the recognition closer. Keep in mind though, that the Google Glass camera does not have autofocus, so the recognition distance should not be lower than 30cm.
82  3) Look at the code directly, not from an angle.
83  4) Check that the QR code is at least 25x25 mm large.
84  5) Check that the background is not disturbing
85  6) Check the light conditions.
86
87 3.3 Selection of a document to be viewed
88 ----------------------------------------
89 After a successful QR code recognition the application will switch to a component preview mode, where you can see a picture of the component.
90
91 You may go back to the start screen by the slide down gesture on the touchpad.
92
93 Tap the touchpad to open the application menu. Use gestures slide forward and backward to find the desired document or to return back to the start screen (Stop menu item). Tap on the touchpad to select the menu item.
94
95 If a document has been selected, it will be opened in the PDF viewer.
96
97 3.4 PDF Viewer control
98 ----------------------
99 When the Component document was selected in the component preview screen, it will be loaded and viewed by a PDF file viewer, designed especially for Google Glass.
100 When the PDF viewer launches, you will see a status panel in the top of the screen and a progress bar, indicating that the document is loading, in the middle of the screen.
101
102 The status bar contains three information. Page number in format actual_page/total_pages, zoom in percents and viewer state. The viewer has two states:
103  1) Viewing - this is default state when the viewer launches. In this state you can comfortably read the fragment of the document without any interruptions.
104  2) Scrolling - This state enables scrolling in the document and zooming in and out.
105
106 To switch between those the viewer states, tap the touchpad.
107
108 Once the document is loaded, you will se a fragment of it, because the Glass display is not big enough to view most of the documents at one. To move in the document, switch to the scrolling state and gently move your head to scroll the document.
109
110 To zoom in or out, switch the viewer to scrolling state and use slide forward and slide backward gestures respectively.
111
112 To close the document, use the slide down gestures on the touchpad.
113
114 4. Usage of the Tablet and smart phone version
115 ==============================================
116 4.1 Launch the application
117 --------------------------
118 The application can be launched from launcher on the smart phone or tablet by clicking on the Skoda Manufacture Helper icon. Once the application is loaded and running a fullscreen Skoda logo is displayed on the screen. Touch the screen anywhere or select Scan item in the application menu to start QR code recognition.
119
120 4.2 Scanning QR codes
121 ---------------------
122 The application retrieves the component ID by scanning the QR code. When the fullscreen Skoda logo is displayed, touch the screen anywhere or select Scan item in the application menu to start QR code recognition.
123 The scanner provides a preview image from the camera to the display. To capture the code,
124 aim the code to the middle of the display. The code should be recognized in a second or two.
125 and once the code is recognized, the application switches to a component preview activity.
126
127 You can abort recognizing in every time and return back to the start screen by touching the back button.
128
129 If the recognition process takes significantly longer, check:
130  1) If the code in the camera preview is too large, try the recognition from bigger distance.
131  2) If the code in the preview is too small, try the recognition closer. Keep in mind that if your device does not have autofocus, the recognition may not work perfectly for codes smaller than 25x25mm and from distance lower than 30cm.
132  3) Look at the code directly, not from an angle.
133  4) Check that the background is not disturbing
134  5) Check the light conditions.
135
136 4.3 Selection of a document to be viewed
137 ----------------------------------------.
138 After a successful QR code recognition the application will switch to a component preview mode, where you can see a picture of the component.
139
140 You may go back to the start screen by touching the back button and you may rotate the screen if enabled on the device.
141
142 Next to the component preview image is a menu with documents available fr the component. To open the document in a PDF viewer, just click on the button.
143
144 4.4 PDF Viewer control
145 ----------------------
146 The application is distributed with an embadded PDF document viewer based on MuPDF library. This viewer has an ability to highlight text, search for words, reflow, scroll and zoom the document.
147
148 You can scroll the document by your finger, use two finger gesture to zoom in and out.
149
150 To cloce the document and go back just click the back button.
151