CASIO V-T500/V-N500 Series Quick Start Guide (Version 1.07) CASIO Computer Co., Ltd. Copyright ©2013. All rights reserved.
Table of the Contents 1. Product Overview 1.1 Features at a Glance 1.2 Library Configuration 1.3 Development Manuals 2. Prerequisites 2.1 Skills Required 2.2 Hardware Required 2.3 Systems Required 2.4 Software Required 3. Setting up the Development Environment 3.1 Application Development 3.2 Installing JDK 3.3 Installing Android SDK 3.4 Installing Eclipse 3.5 Installing ADT 3.6 Installing Software Development Kit (“SDK”) 4. Connecting V-T500/V-N500 to PC 4.1 Installing USB Driver 5.
No part of this reference manual may be produced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of CASIO Computer Co., Ltd. in Tokyo Japan. Information in this reference manual is subject to change without advance notice. CASIO Computer Co., Ltd.
1. Product Overview This guide clearly and concisely sets out the information developers need to know to get started with CASIO V-T500/V-N500 series terminals development. 1.1 Features at a Glance The following is a brief overview of the features available on V-T500/V-N500series terminals. For further details on the hardware specifications, refer to V-T500/V-N500Series Hardware Manual. Table 1.
Transfer rate Communication range Output GPS General specifications Positioning scheme SD card slot Micro SD card slot USB Camera Effective pixels Aperture Focal length Focus distance LED light Speaker Microphone Power source Main Battery Sub-battery Temperature Humidity Drop strength Waterproof and dustproof performance Size 802.11a/g: up to 54Mbps 802.11b:up to 11Mbps 802.11n:up to 72Mbps 802.11b/g/n: 50m (in-door), 150 m (out-door) (2.4GHz band for /n) 802.
1.2 Library Configuration The V-T500/V-N500 Software Development Kit (“BDK”) provides various libraries including those listed in the table. Table 1.2 Library System Library SAM Library Authentication library Camera scanning library Description Library that is used to control the system. Library that is used to communicate with the SAM Card. Library that is used to set the authentication function such as the password. Library that is used to scan symbols with the camera.
2. Prerequisites 2.1 Skills Required V-T500/V-N500 application can be developed by the following languages: • Java The following skills or experience are also desirable: • Android OS • Development of Android applications • Eclipse integrated development environment • Some networking experience 2.2 Hardware Required The following models and dedicated options are available. Table 2.1 List of available model Model no. Remark V-N500 V-T500 2.
2.4 Software Required The Android development environment is required for developing the V-T500/V-N500 application. Table 2.2 Development platform Programming Language Java Detail Java SE Development Kit (JDK compiler-compliant level 1.6) Android SDK (API level 15) Eclipse 3.7 (Indigo) ADT Plugin for Eclipse Table 2.3 The URL where each tool is supplied JDK Tool Manual Version no. 6 (u31 or later) Detail http://www.oracle.com/technetwork/java/javase/downloads/index.
3. Setting up the Development Environment 3.1 Application Development This chapter explains what to set up for the development environment before starting your application development. (1) Installing JDK/Android SDK/Eclipse/ADT Install the development environment for the Android application on the PC. For details, refer to Chapter 2.4 Software Required. (2) Installing CASIO SDK to PC Install CASIO SDK on the PC. For the installation method, refer to Chapter 3.6 Installing Software Development Kit (“SDK”).
3.2 Installing JDK Java SE JDK can be downloaded from the Java site. Access the Java site, and download the Java SE JDK package compatible with the Windows platform used. The URL and the details of the Java site may differ from those given in this document because the site has been updated. When downloading Java SE JDK, access the Java site from a search site, and follow the procedures explained on the site. http://www.oracle.com/technetwork/java/javase/downloads/index.html Figure 3.
Figure 3.2 Start the downloaded file, and execute installation. For installation, execute the downloaded file by a user who has administrative authority. If you wish to execute it by a user who does not have administrative authority, right-click on the downloaded file on the explorer, select Execute as the administrator from the displayed menu, and execute it. No changes are required during installation. Figure 3.
Figure 3.4 Figure 3.5 When the installation is finished, set the folder where JAVA is installed in the environment variable JAVA_HOME, and log in again. Pay attention because if you forget this setting, an error occurs when installing Android SDK.
Figure 3.6 3.3 Installing Android SDK Android SDK is available from the Android of Google site. Please input the URL at browser, and download Android SDK and its installer. http://dl.google.com/android/installer_xxx-windows.exe At the “xxx” part of above URL, input the version of the object to download. In case of Android SDK r20, it is “http://dl.google.com/android/installer_r20-windows.exe”.
Figure 3.7 Figure 3.8 Close the installer as is. Figure 3.9 Execute SDK Manager from the menu of Android SDK Tools by a user who has administrative authority.
If you wish to execute it by a user who does not have administrative authority, right-click on SDK Manager in the menu of Android SDK Tools, and select Execute as the administrator from the displayed menu, and execute it. Select Reload from the Package menu. Figure 3.10 The list of packages is updated to the latest version. Check Android SDK Platform-tools in Tools, and Android 4.0.3(API15) and Google USB driver in Extras, then install. Please do not check Android SDK Tools in Tools.
Figure 3.12 Add the paths related to Android SDK to PATH of the system environment variable. Add paths to tools under the The folder Android SDK is installed, and platform-tools under the The folder Android SDK is installed. Figure 3.
3.4 Installing Eclipse Install the integrated development environment Eclipse. The flow of installation of Eclipse IDE for Java Developers of Eclipse 3.7 Indigo is explained in this section. Eclipse IDE for Java Developers can be downloaded from the Eclipse site. Access the Eclipse site, and download the package of Eclipse IDE for Java Developers compatible with the Windows platform used.
Figure 3.15 Extract the downloaded file, extract the package of Eclipse IDE for Java Developers, and extract the route directory of Eclipse, and all directories and files under the route directory in the configuration as is. Execute Eclipse.exe under the route directory of Eclipse, and confirm that it can be started.
3.5 Installing ADT When Eclipse is installed, install ADT next. ADT incorporates various tools to simplify the development of Android applications on Eclipse. Input the following URL at browser, then download an archive file of ADT. http://dl.google.com/android/ADT-xx.x.x.zip At the “xx.x.x” part of above URL, input the version of ADT to download. In case of ADT 20.0.0, it is “http://dl.google.com/android/ADT-20.0.0.zip”. Start up Eclipse, and select Install New Software… of the Help menu. Figure 3.
Figure 3.
Input “ADT Plugin” at Name. Press Archive button, then select a path of downloaded ADT file. Press OK button if Name and Location is specified correctly. Figure 3.18 Select ADT Plugin at Work with. A list of the packages that can be installed is displayed. Check Developer Tools and press Next > button. Figure 3.
The details of installation are displayed. Press Next > button. Figure 3.20 The license is displayed. Check the details, select I accept the terms of the license agreements, and press finish button. Figure 3.21 Installation starts.
If a dialog is displayed in the middle of the operation that prompts to restart as shown below, press Restart Now button.. Figure 3.22 After Eclipse restarts, select Preferences of Window menu to set the Android SDK folder, which was installed previously Preferences dialog as shown below is displayed. Set the Android SDK folder in the same way. Figure 3.
3.6 Installing Software Development Kit (“SDK”) This chapter explains about installing SDK and construct Android SDK. 1. Install SDK as add-on for Android SDK. 2. Navigate to “package” directory of SDK. 3. Copy “V-T500” directory under “package” directory of SDK. 4. Paste “V-T500” directory copied in above 3 into “add-ons” directory under the root directory of Android SDK. Figure 3.
4. Connecting V-T500/V-N500 to PC 4.1 Installing USB Driver Install the USB driver to connect the PC and the V-T500/V-N500. Only the configuration file of the USB driver is included in the V-T500/V-N500 development kit. The USB driver is included in the Android SDK, which was installed in Chapter 3.3 Installing Android SDK. First, create a folder for the driver (e.g. “C:\V-T500Driver”). Next, search a file named android_winsub.inf in the installed folder of Android SDK. Figure 4.
Figure 4.2 Select Install from a list or specific location [Advanced] and press Next > button. Figure 4.3 Check Include this location in the search:, and specify the folder for the driver that you created previously.
Figure 4.4 Installation is started. When the dialog below is displayed, installation is finished. Press Finish button, and close the dialog. Figure 4.5 For confirmation, open the command prompt, and enter the following command: adb devices Figure 4.6 If the message above is displayed, the installation of the driver has succeeded.
5. Setting Up the Development Environment 5.1 Setting JDK Set the JDK installation version. Start up Eclipse, and select Preferences of the Window menu. Figure 5.1 Select Java → Compiler, and set the level to 1.6. Figure 5.
5.2 Setting AVD Set the AVD (Android Virtual Device). Start up Eclipse, and select AVD Manager. Figure 5.3 Press the New… button, and create a new AVD. Figure 5.
Enter “CASIO_V_T500” in Name, and select “CASIO V-T500/V-N500(CASIO COMPUTER CO., LTD.) - API Level 15” at Target, and press the Create AVD button. Figure 5.5 Return to the Android Virtual Device Manager screen, confirm that “CASIO_V_T500” is added, and close the dialog to finish. Figure 5.
5.3 Setting Android Project Set the Android Project of the application created by Eclipse. Select and right-click Android Project, and select Properties. Select Android in the displayed Properties dialog, and select CASIO V-T500/V-N500 at Target Name. Figure 5.7 Next, select Java Build Path. Press Add External JARs...button in the Libraries tab, and display the file selection dialog.
Figure 5.8 Open the libs folder under the SDK, and select all files. Figure 5.9 Next, open the Order and Export tab, check all the added files, and press OK button to finish.
Figure 5.10 5.4 Setting Up the Debugging Environment Set the debugging environment of the application. Note: For the procedure to create the application, refer to Chapter 7. Eclipse. Use the actual terminal of V-T500/V-N500 or the emulator for debugging. 5.4.1 Setting the Debug Configuration with Terminal Select Debug Configurations… from the Run menu of Eclipse. Figure 5.
Select the Android tab, and enter the debugging project name in Project. Figure 5.12 Switch to the Target tab, select Always prompt to pick device, and close the dialog with the Close button. Figure 5.13 Set the USB drier as described in the Chapter 4. Connecting V-T500/V-N500 to PC before connecting the actual terminal of V-T500/V-N500 and the PC. 5.4.
Next, select the Target tab. Select Automatically pick compatible device:~, and check CASIO_V_T500 in the check box below. Figure 5.15 Press Close button, and close the dialog. 5.4.3 Debugging Applications Basic operation of debugging The debugging method is the same as the normal debugging operation of Eclipse. Select Debug from the Run menu of Eclipse, or press F11 to start debugging.
Figure 5.16 Debugging by the actual terminal (V-T500/V-N500) Before debugging, connect the actual terminal to the PC with a USB cable. Set the USB drier as described in the Chapter 4. Connecting V-T500/V-N500 to PC before connecting the actual terminal and the PC. When Debug is selected from the Run menu, the screen for selecting the device as shown below is displayed. Figure 5.
Select the target device, and press the OK button to start debugging. It is possible to execute debugging by stepping, etc. on the actual terminal by setting breakpoints in the source code. Precautions for debugging • It is not possible to execute debugging when the debugging application is installed on the actual terminal of V-T500/V-N500. In such a case, uninstall the debugging application on the actual terminal of V-T500/V-N500 before executing debugging.
6. Emulator The emulator provides an “environment where basic operation check of the application and source level debugging are possible without the actual terminal of V-N500” to the application developer. 6.1 Software Required It is possible to use the emulator if you have built the development environment explained above. 6.2 Starting Up the Emulator 6.2.1 How to Start Up the Emulator Start AVD Manager from the Windows menu of Eclipse. Figure 6.1 Select CASIO_V_T500 and press the Start button.
Figure 6.2 The dialog below is displayed. Press Launch as is. Figure 6.3 The dialog below is displayed, and the process of start up is displayed.
Figure 6.4 The emulator starts. Figure 6.
6.3 Using the Emulator 6.3.1 V- T500/V-N500 Emulator Key input function The key input function equivalent of the actual terminal (V-T500/V-N500) is incorporated. It is possible to use key input by clicking the keys on the screen with a mouse. Function to save the state The V-T500/V-N500 emulator does not have a function to save the state when it finishes. The clock and the file system of the emulator are initialized when it starts up.
7. Eclipse The application development procedure using Eclipse as the development environment is explained in this chapter. The example is an application that beeps a large-sound buzzer once for a second using the system library. Create this application in a Java programming language. For the list of libraries provided with the V-T500/V-N500 basic development kit, refer to the Chapter 1.2 Library Configuration. For the details of the system library, refer to System Library Manual.
1. Create a new Android application on Eclipse. Figure 7.2 The application name is the name of the application created. This name is displayed on the menu of Android. It is named SDKSample1 in this example. The project name is the name of the project created in the workspace of Eclipse. Two or more projects of the same name cannot exist in the workspace. The project name is SDKSample1 in this example. The package name is the name to avoid collision of the class names of Java during execution.
Figure 7.3 Next, set the launcher icon. Select the typical Android icon in this example. Figure 7.4 Next, set the activity. Activity is one of the Java classes in specific.
and display, response to events, etc. are included. The title is changed to V-T500 System Lib sample in this example. The title is displayed as the screen title when executing an application or the menu title. Figure 7.
2. Set the Android project. When a new project is created, follow the procedure described in Chapter 5.3 Product Overview first. If this process is omitted, an error occurs in a subsequent process. For the operations after this, refer to the Chapter 5.3 Setting Android Project Figure 7.
3. Create a screen. When a project is created, the edit display as shown below is displayed at first. It becomes the screen of the application. First, delete the text “Hello world!” displayed at the center. Next, drag & drop the grey icon which indicates Button from Form Widgets in Palette on the left into the screen. Drag & drop in the screen Select and delete Figure 7.7 Paste the button on the screen, and adjust the size and the position.
Adjust the size and the position with the mouse. Figure 7.8 Next, create a resource of the character strings. Open the project of SDKSample1 from Package Explorer on the left side of the Eclipse screen. When you point res → values, the file “strings.xml” appears as shown in the figure below, then double-click on it.
Figure 7.9 The resource editing dialog as shown in the figure below is displayed. First, select unnecessary hello_world, and press the Remove button. Select and remove. Figure 7.10 Next, press the Add button. The dialog below is displayed. Select String.
Figure 7.11 Set the name and the value in the new string resource. The name “button_title” and the value “Get model name!” are set in this example. Figure 7.12 When editing is finished, select Save from the File menu, and save the change. Change the details of the text displayed on the button in the Text in Properties at the lower right while selecting the button. Enter “@string/button_title” in this example. When it is entered, the display on the button changes to “Get model name!”.
Figure 7.13 Next, enter “onClick” in On Click in Properties in the same way. It is the name of the method in the activity that is executed when the button is pressed. (It is created later.) Figure 7.
4. Create a program. Next, open the source of the activity. Open in the order of SDKSample1 → src → jp.casio.vx.framework.sdksample1 from Package Explorer, and double-click MainActivity.java. Figure 7.15 Correct MainActivity.java as shown below. (For the specifications of the System library currently used, refer to the manual of the library.) package jp.casio.vx.framework.sdksample1; import android.os.Bundle; import android.app.Activity; import android.app.AlertDialog; import android.view.
return true; } public void onClick(View view) { jp.casio.vx.framework.system.Api sysapi = new jp.casio.vx.framework.system.Api(this); //Get model name of terminal String modelName = sysapi.getModelNameString(); if(modelName.length() > 0) { showDialog(this,"SDK Sample", "The model name of this terminal is "+ modelName); }else { showDialog(this,"SDK Sample","Can't get model name."); } } private static void showDialog(Context context, String title, String text) { AlertDialog.Builder ad=new AlertDialog.
Figure 7.17 After the build, debug as necessary. For the details of debugging, refer to Chapter 5.4 Product Overview. And since the beep of the buzzer is the main function in this sample, it is recommended to debug on the actual terminal of V-T500/V-N500.
5. Incorporate the application into the terminal. Fight-click SDKSample1 on the Package Explorer, and select Android Tools → Export Signed Application Package. Figure 7.18 The dialog below is displayed. Press Next >, and proceed to the next step.
Figure 7.19 The dialog below is displayed. This is setting of the certificate file to add a signature to Android applications. The certificate file can be created here or select an existing one. When you create a new one, set a password of at least 6 letters. Figure 7.20 When you create a new key, the screen below is displayed. Input all items.
Figure 7.21 Table 7.1 Item Alias Password Confirm Validity(years) First and Last Name Organization Unit Organization City of Locality Description Alias of the signature. Password. Enter the password for confirmation. Specify the expiration in years. Specify 25 or more. The name of the creator. The name of the organization unit. The name of the organization. The name of the city. Then, the dialog below is displayed. Check the details of the Destination APK file, and finish with Finish button. Figure 7.
The package file (apk file) of the application is created. Figure 7.23 There are two methods of installing this file on the actual terminal of V-T500/V-N500. (1) Copy in the SD card, and install on the actual terminal of V-T500/V-N500. Copy the created apk file from the PC to the SC card. Set the SD card in the SD card slot of the actual terminal of V-T500/V-N500, and close the SD card cover tightly. Next, start up the File Manager on the actual terminal of V-T500/V-N500. Figure 7.
The dialog below is displayed. Select Install button. Figure 7.27 Installation of the application is finished. Figure 7.28 After this, the application can be executed on the actual terminal of V-T500/V-N500. Execute the application from the menu, and check the operation. (2) Install from the PC side using the ADB command. First, connect the terminal and the PC using a USB cable. (The mini B USB connector comes to the terminal side.
For details of connection, refer to Chapter 4. Product Overview. Open the command prompt, and move the current folder to the location where the apk file exist. The installation command is as shown below. adb install -r SDKSample1.apk The result of execution becomes as follows: Figure 7.29 After this, the application can be executed on the terminal. Execute the application from the menu, and check the operation.
8. Kitting Installation of the application on the terminal, initial settings and update of the OS are described in this section. 8.1 New Configuration of System The methods of making new settings and installing the application on the terminal are described. 8.1.
The settings above are all arbitrary settings. Make setting as necessary. 1) Environment setting by the Settings tool Basically, they can be used with the preset values. For the setting of some items such as wireless setting, set according to the usage. The preset values of the terminal are described in Appendix. 2) Setting the security for the administrator Set the password for the administrator. The password for the administrator is used for authentication for using a secure function.
(4) Install the application (apk file). Tap the application (apk file) on the file manager, and install according to the displayed messages. (5) Install the configuration file. Press and hold the configuration file on the File Manager. When it is held long, the Edit menu is displayed. Select Copy from the Edit menu. Move to the folder to install by the file manager. When it is moved to the folder to install, select the Paste menu. 8.1.
(3) Select the external storage medium to save the backup data in Option setting. (4) Check All items in Backup. (5) Tap Backup the selected items in Backup. The backup data is stored in the “/Backup” folder in the external storage medium. It is not necessary to create “/Backup” in the external storage medium in advance. If there is already a “/Backup” folder in the external storage medium, confirm that there is no file under the folder before executing this operation.
If the external storage medium is removed from the terminal without performing unmount, the external storage medium may be damaged. Make sure to implement unmount. Remove the external storage medium from the slave unit (replication destination). (16) Restart the slave unit (replication destination). Press and hold the power supply button long, and shut down the slave unit (replication destination). Press and hold the power supply button, and start up the slave unit (replication destination).
(7) Start up the Copy Devices tool on the master units (replication source). (8) Select 2. Sender mode of the Copy Devices tool on the master units (replication source). (9) Start up the Settings tool on the slave unit (replication destination), and enable WiFi-Direct in the More… menu. (10) Start up the Copy Devices tool on the slave unit (replication destination). (11) Select 1. Receiver mode of the Copy Devices tool on the slave unit (replication destination).
The environments that may be set separately on each terminal are as follows: There are some environments that have to be set additionally according to the operation and the usage other than the following: ■ Mail setting ■ WAN setting ■ WLAN (in case of fixed IP) ■ Security setting for the administrator ■ Security setting for general users 67
9. Appendix Default Values of the Setting The initial values of the setting are described below. ■ WIRELESS & NETWORKS The connection to the network and the devices using Wi-Fi, Bluetooth, mobile, network and USB connection is set and managed. It is also possible to set the connection between the tablet and a virtual private network (VPN), connect to the Internet with another device via the data communication of the tablet, and turn off all wireless communication by switching to in airplane mode. Table 9.
■ PERSONAL The settings related to usage of users and how to use such as various security settings are performed. The grayed-out items are used for confirmation of the state, and they are not the setting items. Table 9.
■ SYSTEM The settings of date and time and the settings for developers are performed. The grayed-out items are used for confirmation of the state, and they are not the setting items. Table 9.