質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Q&A

0回答

771閲覧

URLにある画像挿入を試そうと思います。教えてほしいことは・・・

H30_inenaga

総合スコア18

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

0グッド

0クリップ

投稿2018/10/04 12:37

まず、こちらのURLにある初期設定から、bitmapをSmartEyeGlassに表示、までをやりたいです。
http://korechi.hatenablog.com/entry/2016/03/25/023434

次のSmartEyeglassEventListenerのクラスに何をプログラミングするのか分かりませんでしたので、教えていただけませんか?

Java

1package com.sony.smarteyeglass.extension.util; 2 3/** 4 * The event listener interface for SmartEyeglass events. Your implementation should 5 * override the methods to provide handler callbacks for specific events. 6 * Each event-handler function is executed in the context that created the associated instance of 7 * {@link com.sony.smarteyeglass.extension.util.SmartEyeglassControlUtils}. 8 */ 9public class SmartEyeglassEventListener { 10 11 /** 12 * Called on completion of a voice-to-text operation. 13 * 14 * @param errorCode The result of the operation, one of these constants: 15 * <ul> 16 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#VOICE_TEXT_INPUT_RESULT_OK}</li> 17 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#VOICE_TEXT_INPUT_RESULT_FAILED}</li> 18 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#VOICE_TEXT_INPUT_RESULT_CANCEL}</li> 19 * </ul> 20 * @param text The text transcription of the voice input. 21 */ 22 public void onVoiceTextInput(final int errorCode, final String text) { } 23 24 /** 25 * Called when a dialog is dismissed by user action or timeout. 26 * 27 * @param code For a dialog with developer-defined buttons, the 28 * 0-based index of the button used to close the dialog. 29 * For a simple dialog, 0 if the dialog was closed with the 30 * OK button, or -1 if the dialog timed out. 31 */ 32 public void onDialogClosed(final int code) { } 33 34 /** 35 * Called when an error occurred while starting camera recording. 36 * Your handler must call 37 * {@link com.sony.smarteyeglass.extension.util.SmartEyeglassControlUtils#stopCamera}. 38 * 39 * @param error The reason for failure of the capture operation, one of these constants: 40 * <ul> 41 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#ERROR_INVALID_PARAMETER}</li> 42 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#ERROR_FILE_ACCESS}</li> 43 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#ERROR_CAPTURE}</li> 44 * </ul> 45 */ 46 public void onCameraErrorReceived(final int error) { } 47 48 /** 49 * Called when a new image is received in these camera modes: 50 * <ul> 51 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#CAMERA_MODE_STILL}</li> 52 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#CAMERA_MODE_JPG_STREAM_LOW_RATE}</li> 53 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#CAMERA_MODE_JPG_STREAM_HIGH_RATE}</li> 54 * </ul> 55 * 56 * @param event The camera event object that contains the new image. 57 */ 58 public void onCameraReceived(final CameraEvent event) { } 59 60 /** 61 * Called when a new image is sent to a file, in these camera modes: 62 * <ul> 63 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#CAMERA_MODE_STILL_TO_FILE}</li> 64 * </ul> 65 * 66 * @param filePath The path and file name of the new JPEG file. 67 */ 68 public void onCameraReceivedFile(final String filePath) { } 69 70 /** 71 * Called when the power mode changes. 72 * 73 * @param powerMode The new power mode value, one of 74 * <ul> 75 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#POWER_MODE_HIGH}</li> 76 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#POWER_MODE_NORMAL}</li> 77 * </ul> 78 */ 79 public void onChangePowerMode(final int powerMode) { } 80 81 /** 82 * Called when the display state changes. 83 * 84 * @param mode The new display state value, one of 85 * <ul> 86 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_STATUS_OFF}</li> 87 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_STATUS_ON}</li> 88 * </ul> 89 */ 90 public void onDisplayStatus(final int mode) { } 91 92 /** 93 * Called when the device has entered standby mode. 94 */ 95 public boolean onConfirmationEnterStandby() { 96 return true; 97 } 98 99 /** 100 * Called when the standby mode changed. 101 * 102 * @param status The new standby mode, one of 103 * <ul> 104 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#STANDBY_MODE_OFF}</li> 105 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#STANDBY_MODE_ON}</li> 106 * </ul> 107 */ 108 public void onStandbyStatus(final int status) { } 109 110 /** 111 * Called when the battery status is received. 112 * 113 * @param value The remaining power in the battery, a percentage value. 114 */ 115 public void onBatteryStatus(final int value) { } 116 117 /** 118 * Called when the telephony function status is received. 119 * 120 * @param status The telephony function status, one of: 121 * <ul> 122 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#TELEPHONY_MODE_BT_HEADSET_ENABLE}</li> 123 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#TELEPHONY_MODE_BT_HEADSET_DISABLE}</li> 124 * </ul> 125 */ 126 public void onTelephonyFunctionStatus(final int status) { } 127 128 /** 129 * Called when the registration operation for an AR rendering object has completed. 130 * 131 * @param result The result of the operation, 0 on success. 132 * @param objectId The unique ID of the registered AR object. 133 */ 134 public void onARRegistrationResult(int result, int objectId) {} 135 136 /** 137 * Called when the animation-enable operation for AR rendering has completed. 138 * 139 * @param result The result of the operation, 0 on success. 140 */ 141 public void onAREnableAnimationResponse(int result) {} 142 143 /** 144 * Called when the animation-disable operation for AR rendering has completed. 145 * 146 * @param result The result of the operation, 0 on success. 147 */ 148 public void onARDisableAnimationResponse(int result) {} 149 150 /** 151 * Called when the AR rendering engine requires display data for an AR object. 152 * You handler should send the requested image data using 153 * {@link com.sony.smarteyeglass.extension.util.SmartEyeglassControlUtils#sendARObjectResponse} 154 * or {@link com.sony.smarteyeglass.extension.util.SmartEyeglassControlUtils#sendARAnimationObject}. 155 * 156 * @param objectId The object ID whose data is requested. 157 */ 158 public void onARObjectRequest(int objectId) {} 159 160 /** 161 * Called when the draw operation for 162 * {@link com.sony.smarteyeglass.extension.util.SmartEyeglassControlUtils#showBitmapWithCallback} is completed. 163 * 164 * @param transactionNumber The transaction number that was passed to the showBitmapWithCallback call which has completed. 165 * @param result The processing result. 166 * <ul> 167 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_DATA_RESULT_OK}</li> 168 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_DATA_RESULT_CANNOT_DRAW}</li> 169 * </ul> 170 */ 171 public void onResultShowBitmap(int transactionNumber, int result) {} 172 173 /** 174 * Called when the draw operation for 175 * {@link com.sony.smarteyeglass.extension.util.SmartEyeglassControlUtils#showImageWithCallback} is completed. 176 * 177 * @param transactionNumber The transaction number that was passed to the showImageWithCallback call which has completed. 178 * @param result The processing result. 179 * <ul> 180 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_DATA_RESULT_OK}</li> 181 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_DATA_RESULT_CANNOT_DRAW}</li> 182 * </ul> 183 */ 184 public void onResultShowImage(int transactionNumber, int result) {} 185 186 /** 187 * Called when the draw operation for 188 * {@link com.sony.smarteyeglass.extension.util.SmartEyeglassControlUtils#sendARAnimationObjectWithCallback} is completed. 189 * 190 * @param transactionNumber The transaction number that was passed to the sendARAnimationObjectWithCallback call which has completed. 191 * @param result The processing result. 192 * <ul> 193 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_DATA_RESULT_OK}</li> 194 * <li> {@link com.sony.smarteyeglass.SmartEyeglassControl.Intents#DISPLAY_DATA_RESULT_CANNOT_DRAW}</li> 195 * </ul> 196 */ 197 public void onResultSendAnimationObject(int transactionNumber, int result) {} 198 199 200}

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問