BT-300 Documentation

2. Developing Apps

2.1. Summary of Developing Apps

You can develop apps for the BT-300 in the same environment as developing apps for Android smartphones (API level 22 of Android SDK). However, when connecting the BT-300 with the app development computer, or when using functions unique to the BT-300, you need to adjust the computer settings so that they are compatible with the BT-300.
This chapter explains the following procedures necessary to develop apps for the BT-300.

  • Introduction to the Android SDK
  • USB driver settings
  • Connecting the BT-300 to a computer
  • Including the SDK provided by Epson

2.2. Introduction to the Android SDK

The introduction to the Android SDK assumes the following steps will be performed in a Windows 7 environment

2.2.1. Acquiring Android Studio

Download Android Studio from the following Website.

2.2.2. Acquiring and installing JDK

Download the JDK (7 or later) from the following Website, and then install.

Installing Android Studio

Follow the directions provided by the installer to install Android Studio.

Example) C:\Users\User name\AppData\Local\Android\sdk
* From here on, instructions assume Android Studio is installed in the folder above.

Platform-tools and SDK Platform

Execute "C:\Users\User name\AppData\Local\Android\sdk\SDK Manager.exe".

* When you start SDK Manager, the dialog "No packages found" may be displayed.
This occurs when the proxy is not set correctly, and information cannot be updated.
Close all dialogs except for "Android SDK Manager", and then set the proxy in [Tools] -[Options].
If you do not know the Proxy settings, contact your network administrator for details on "Connectingmethod to external network using Proxy".

Select the following necessary files in the SDK Manager, and then install.

  • [Tools] - [Android SDK Platform-tools]
  • [Android 5.1.1] - [SDK Platform]

Select the above, click [Install], and then select "Accept all".

This completes the introduction to the Android SDK.
Next, we will explain how to connect MOVERIO to the app development computer, and setup the ADB driver.

2.3. USB driver settings

2.3.1. When Using Windows

Connect MOVERIO to the app development computer, and setup the USB driver.
Install the USB driver from the following site.

2.3.2. When Using Mac OS/Linux

You do not need to install the USB driver.

2.4. Connecting the BT-300 to a computer

This section explains how to connect the BT-300 to a computer after the ADB settings are complete.

2.4.1. BT-300 settings

- Confirm that the USB debugging is enabled. If not, follow the steps below to enable USB debugging.

  • Open "Settings" - "Developer options", and then turn ON the "USB debugging".

2.4.2. Checking the connection

You can check if the computer and the BT-300 are connected by using the ADB check command.
Start the command prompt, run "cd C:\Users\<User name>\AppData\Local\Android\sdk\platform-tools", and move the folder. * It is useful to maintain the environment variable path mentioned above.
When you execute "adb devices" and the device name is displayed in the list, ADB connection is complete.

* If this is not displayed, reconnect the BT-300 to the USB port, and rerun the "adb devices" command.

2.5. Including the SDK provided by Epson

2.5.1. How to use the SDK provided by Epson

The following procedures assume app development in Android Studios.

  1. Display the Project View in Android Studio, and then create a "libs" folder from [File]-[New]-[Directory].
  2. C:\Users\<user name>\AndroidStudioProjects\<application name>\app\libs is created; put BT300Ctrl.jar in this folder.
    (When the created project folder is C:\Users\<user name>\AndroidStudioProjects)
    * Explanations from now on are based on the assumption that the project is at C:\Users\<user name>\AndroidStudioProjects\<application name>.
  3. Press the Sync Project with Gradle Files button above Android Studio to apply the Gradle change to the project.

2.5.2. Reference: If you get an unsolved situations in Android Studio

If unresolved situations occur, you can solve it by the following procedure. Setting to override Android SDK (build.gradle)

  1. Open build.gradle (Project: <application name>) in the window on the left of Android Studio, and then edit as shown below.

    allprojects {
        ant.condition(property:"os", value:"windows"){os(family:"windows")}
        ant.condition(property:"os", value:"unix"){os(family:"unix")}
        repositories {
        gradle.projectsEvaluated {
            tasks.withType(JavaCompile) {
                switch ( {
                    case 'windows':
                        options.compilerArgs.add('-Xbootclasspath/p:' + projectDir.toString().concat("\\libs\\BT300Ctrl.jar;"))
                    case 'unix':
                        options.compilerArgs.add('-Xbootclasspath/p:' + projectDir.toString().concat("/libs/BT300Ctrl.jar:"))
  2. Execute Clean Project from Build items in Android Studio once.

This completes the SDK settings.
On the Edit screen, EPSON original APIs such as Run app are still not solved. You can ignore these and run the app, and install the application on the device. Unsolved methods will operate normally. Solving unsolved situations

By using the following method, you can solve any unsolved situations and use the code completion function.

  1. Open C:\Users\<user name>\AndroidStudioProjects\<application name>\app\app.iml
  2. Move the line
    <orderEntry type="library" exported="" name="BT300Ctrl" level="project" />
    to the line above
    <orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />

This increases the priority of BT300Ctrl.jar in Android Studio, and can solve any unsolved situations and allow you to use the code completion function. However, this status is canceled when running a rebuild. See the following for details on limited items.

Limited items

Due to Android Studio specifications, after running commands such as rebuild and updating gradle contents, the app.iml is also updated and the EPSON original API returns to an unsolved situation. In this situation, execute 1. and 2. again. After the rebuild, executing has no affect.

Go to Top