java飞信api--无license限制

时间:2012-08-16 10:39:20
【文件属性】:
文件名称:java飞信api--无license限制
文件大小:534KB
文件格式:RAR
更新时间:2012-08-16 10:39:20
java调用fetion,飞信机器人接口,免费发送短信 ,fetion,fetionapi 见: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 这个帖子来拍砖..... 完整的eclise例子,直接运行run.bat可以试哈 这次是来混点分的,快没分下东西了.....
【文件预览】:
FetionTest
----.project(386B)
----bin()
--------cn()
----.settings()
--------org.eclipse.core.resources.prefs(88B)
--------org.eclipse.jdt.core.prefs(629B)
----run.bat(94B)
----src()
--------cn()
----readme.txt(71B)
----.classpath(434B)
----doc()
--------cn()
--------resources()
--------stylesheet.css(1KB)
--------allclasses-noframe.html(1KB)
--------allclasses-frame.html(1KB)
--------overview-tree.html(6KB)
--------constant-values.html(5KB)
--------index-files()
--------package-list(24B)
--------help-doc.html(9KB)
--------deprecated-list.html(5KB)
--------index.html(1KB)
----lib()
--------fetion-java-api.jar(1.39MB)
--------com.google.api.translate.jar(28KB)

网友评论

  • 本人电脑System.console返回的一直是空,不知道为什么
  • 用不了,有点坑啊
  • 没用啊,用不了 包错 还是感谢分享 学习经验
  • 东西是挺好的 可惜现在用不了了 licence过期 而且代码会报错!!!
  • 尝试了,好像现在要报错也
  • 时间太久了,licence过期了
  • 程序封装的很好,但是有点小问题。
  • 尝试了,好像现在要报错也
  • 啊 是的。现在这个是不能使用的。不过 也还是要感谢你的分享了。
  • 尝试了,好像现在要报错也