当前位置: 首页>>代码示例>>Java>>正文


Java Log.v方法代码示例

本文整理汇总了Java中org.appcelerator.titanium.util.Log.v方法的典型用法代码示例。如果您正苦于以下问题:Java Log.v方法的具体用法?Java Log.v怎么用?Java Log.v使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.appcelerator.titanium.util.Log的用法示例。


在下文中一共展示了Log.v方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onResults

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onResults(Bundle results) {
	Log.v(LCAT, "onResults");
	String[] heard = null;
	float[] scores = null;
	if (results != null) {
		if (results.containsKey(SpeechRecognizer.RESULTS_RECOGNITION)) {
			ArrayList<String> resultsrecog = results
					.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
			if (resultsrecog != null) {
				heard = results.getStringArrayList(
						SpeechRecognizer.RESULTS_RECOGNITION).toArray(
						new String[0]);
				if (Build.VERSION.SDK_INT >= 14) {
					scores = results
							.getFloatArray(SpeechRecognizer.CONFIDENCE_SCORES);
				}
			}
		}
	}
	KrollDict data = getResultKrollDict(heard, scores);
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.RESULTS);
	fireEvent(SpeechrecognizerModule.RESULTS, data);

}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:27,代码来源:SpeechRecognizerProxy.java

示例2: start

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Kroll.method
public void start() {
	Log.v(LCAT, "start:"+mSpeechRecognizer);
	if (mSpeechRecognizer != null) {
		if (!TiApplication.isUIThread()) {
			TiMessenger.sendBlockingMainMessage(handler
					.obtainMessage(MSG_STARTSPEECHRECOGNIZER));
		} else {
			startRecognize();
		}
	}
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:13,代码来源:SpeechRecognizerProxy.java

示例3: cancel

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Kroll.method
public void cancel() {
	Log.v(LCAT, "cancel:"+mSpeechRecognizer);
	if (mSpeechRecognizer != null) {
		if (!TiApplication.isUIThread()) {
			TiMessenger.sendBlockingMainMessage(handler
					.obtainMessage(MSG_CANCELSPEECHRECOGNIZER));
		} else {
			cancelRecognize();
		}
	}
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:13,代码来源:SpeechRecognizerProxy.java

示例4: stop

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Kroll.method
public void stop() {
	Log.v(LCAT, "stop:"+mSpeechRecognizer);
	if (mSpeechRecognizer != null) {
		if (!TiApplication.isUIThread()) {
			TiMessenger.sendBlockingMainMessage(handler
					.obtainMessage(MSG_STOPSPEECHRECOGNIZER));
		} else {
			stopRecognize();
		}
	}
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:13,代码来源:SpeechRecognizerProxy.java

示例5: onReadyForSpeech

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onReadyForSpeech(Bundle params) {
	Log.v(LCAT, "onReadyForSpeech");
	/*
	 * params :
	 * http://developer.android.com/reference/android/speech/RecognitionListener
	 * .html#onReadyForSpeech(android.os.Bundle) there is no information in
	 * document.
	 */
	KrollDict data = new KrollDict();
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.READYFORSPEECH);
	fireEvent(SpeechrecognizerModule.READYFORSPEECH, data);
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:15,代码来源:SpeechRecognizerProxy.java

示例6: onBeginningOfSpeech

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onBeginningOfSpeech() {
	Log.v(LCAT, "onBeginningOfSpeech");
	KrollDict data = new KrollDict();
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.BEGINNINGOFSPEECH);
	fireEvent(SpeechrecognizerModule.BEGINNINGOFSPEECH, data);
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:9,代码来源:SpeechRecognizerProxy.java

示例7: onBufferReceived

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onBufferReceived(byte[] buffer) {
	Log.v(LCAT, "onBufferReceived");
	KrollDict data = new KrollDict();
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.BUFFERRECEIVED);
	fireEvent(SpeechrecognizerModule.BUFFERRECEIVED, data);
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:9,代码来源:SpeechRecognizerProxy.java

示例8: onEndOfSpeech

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onEndOfSpeech() {
	Log.v(LCAT, "onEndOfSpeech");
	KrollDict data = new KrollDict();
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.ENDOFSPEECH);
	fireEvent(SpeechrecognizerModule.ENDOFSPEECH, data);
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:9,代码来源:SpeechRecognizerProxy.java

示例9: onEvent

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onEvent(int eventType, Bundle params) {
	Log.v(LCAT, "onEvent");
	/*
	 * http://developer.android.com/reference/android/speech/RecognitionListener
	 * .html#onEvent(int, android.os.Bundle) there is no information
	 */
	KrollDict data = new KrollDict();
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.EVENT);
	fireEvent(SpeechrecognizerModule.EVENT, data);
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:13,代码来源:SpeechRecognizerProxy.java

示例10: onPartialResults

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onPartialResults(Bundle partialResults) {
	Log.v(LCAT, "onPartialResults");
	String[] heard = null;
	float[] scores = null;
	if (partialResults != null) {
		if (partialResults.containsKey(UNSUPPORTED_GOOGLE_RESULTS)) {
			heard = partialResults
					.getStringArray(UNSUPPORTED_GOOGLE_RESULTS);
			scores = partialResults
					.getFloatArray(UNSUPPORTED_GOOGLE_RESULTS_CONFIDENCE);
		} else if (partialResults
				.containsKey(SpeechRecognizer.RESULTS_RECOGNITION)) {
			heard = partialResults.getStringArrayList(
					SpeechRecognizer.RESULTS_RECOGNITION).toArray(
					new String[0]);
			if (Build.VERSION.SDK_INT >= 14) {
				scores = partialResults
						.getFloatArray(SpeechRecognizer.CONFIDENCE_SCORES);
			}
		}
	}
	KrollDict data = getResultKrollDict(heard, scores);
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.PARTIALRESULTS);
	fireEvent(SpeechrecognizerModule.PARTIALRESULTS, data);
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:28,代码来源:SpeechRecognizerProxy.java

示例11: onError

import org.appcelerator.titanium.util.Log; //导入方法依赖的package包/类
@Override
public void onError(int error) {
	Log.v(LCAT, "onError : " + error);
	KrollDict data = new KrollDict();
	data.put(TiC.EVENT_PROPERTY_SOURCE, SpeechRecognizerProxy.this);
	data.put(TiC.PROPERTY_TYPE, SpeechrecognizerModule.ERROR);
	data.put(SpeechrecognizerModule.ERROR, error);
	switch (error) { 
		case SpeechRecognizer.ERROR_AUDIO: 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "audio error");
			break; 
		case SpeechRecognizer.ERROR_CLIENT:
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "client error");
			break; 
		case SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS: 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "permission error");
			break; 
		case SpeechRecognizer.ERROR_NETWORK: 
			Log.e(LCAT, "network error"); 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "network error");
			break;
		case SpeechRecognizer.ERROR_NETWORK_TIMEOUT: 
			Log.e(LCAT, "network timeout"); 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "network timeout error");
			break; 
		case SpeechRecognizer.ERROR_NO_MATCH:
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "no match");
			break; 
		case SpeechRecognizer.ERROR_RECOGNIZER_BUSY: 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "recognizer busy");
			break; 
		case SpeechRecognizer.ERROR_SERVER: 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "server error");
			break; 
		case SpeechRecognizer.ERROR_SPEECH_TIMEOUT: 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "speech timeout error");
			break; 
		default: 
			data.put(SpeechrecognizerModule.ERRORMESSAGE, "unknown error");
			break; 
	}
	fireEvent(SpeechrecognizerModule.ERROR, data);
}
 
开发者ID:isis,项目名称:SpeechRecognizer-Module,代码行数:44,代码来源:SpeechRecognizerProxy.java


注:本文中的org.appcelerator.titanium.util.Log.v方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。