⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testcomm.java

📁 jsmsengine 1.1 用于手机开发SMS短信接受发送的开源包
💻 JAVA
字号:
package dk.daimi.jones.app.smsdemo;

import dk.daimi.jones.services.sms.*;
import dk.daimi.jones.impl.sms.*;

/**
 * @author Jonas Thomsen
 *
 * Testing communication with the mobile phone. Displays all communication
 * on the screen. 
 * Ends up with saying successful or FAILED!
 */
public class TestComm {

	public static void main(String[] args) {
		// Show a lot of debugging information on the screen. 
		// Displays all serial communication with the phone.
		dk.daimi.jones.debug.Debugger.getDebugger().enableDebug();
		SMS sms = new SMSImpl();
		System.out.println("Testing SMS service...");
		if (((SMSImpl)sms).open("COM1", "")) { 
			System.out.println("SMS service test was succesful!");
		} else {
			System.out.println("SMS service test FAILED!");
		}
		((SMSImpl)sms).close();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -