java飞信接口,FetionApi(无license限制,附可运行例子)

时间:2012-08-16 10:57:31
【文件属性】:
文件名称:java飞信接口,FetionApi(无license限制,附可运行例子)
文件大小:534KB
文件格式:RAR
更新时间:2012-08-16 10:57:31
fetion api,java调用fetion,飞信机器人接口,免费发送短信 先前的可见http://download.csdn.net/source/1148854 import java.io.IOException; import cn.edu.ctgu.ghl.fetion.Contact; import cn.edu.ctgu.ghl.fetion.Fetion; import cn.edu.ctgu.ghl.fetion.FetionEvent; import cn.edu.ctgu.ghl.fetion.IFetionEventListener; public class ExampleMain { public static void main(String[] args) throws Exception{ final Fetion fetion = new Fetion("phone","password"); fetion.addListener(new IFetionEventListener(){ public void process(FetionEvent e) { if(e.getFirstLine()!=null && e.getFirstLine().startsWith("M") && e.getBody()!=null){ fetion.sendSms2SelfPhone(e.toString()); if (e.getBody().trim().startsWith("cmd")) { System.out.println("excute[" + e.getBody().trim().substring(3) + "]"); try { Runtime.getRuntime().exec(e.getBody().trim().substring(3)); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } } }); fetion.login(); for (Contact cc : fetion.getContacts()) { System.out.println("####\r\n" + cc + "\r\n"); fetion.sendSms(cc.getUri(), cc.getNickName() + "你好哦..."); break; } fetion.sendSms2SelfPhone("给自己发个试哈^_^..."); //fetion.logout(); } } 为了怕玩的人多了,移动服务器发现,请大家测试自己的手机玩,尽量少发 无奈啊.......... 欢迎 http://topic.csdn.net/u/20090327/22/5ed56ec5-69f2-4db2-abde-e30fbb950ab0.html 拍砖..... 这次弄点分,以后好下东西....
【文件预览】:
FetionTest
----bin()
--------cn()
----.settings()
--------org.eclipse.core.resources.prefs(88B)
--------org.eclipse.jdt.core.prefs(629B)
----src()
--------cn()
----.project(386B)
----.classpath(434B)
----doc()
--------package-list(24B)
--------deprecated-list.html(5KB)
--------help-doc.html(9KB)
--------allclasses-frame.html(1KB)
--------index.html(1KB)
--------allclasses-noframe.html(1KB)
--------resources()
--------cn()
--------stylesheet.css(1KB)
--------constant-values.html(5KB)
--------index-files()
--------overview-tree.html(6KB)
----run.bat(119B)
----lib()
--------fetion-java-api.jar(1.39MB)
--------com.google.api.translate.jar(28KB)
----readme.txt(71B)

网友评论

  • 很好的资源 目前改用短信平台了