
| try{ this.platformRequest("tel:13810000000"); }catch(ConnectionNotFoundException ex){ ex.printStackTrace(); } |
| /* * TeleMIDlet.java * * Created on 2005年12月15日, 下午9:56 */ package com.j2medev.call; import javax.microedition.io.ConnectionNotFoundException; import javax.microedition.midlet.*; import javax.microedition.lcdui.*; /** * * @author Administrator * @version */ public class TeleMIDlet extends MIDlet implements CommandListener { private Display display = null; private List main = null; public void startApp() { if(display == null){ display = Display.getDisplay(this); main = new List("测试电话功能", List.IMPLICIT); main.append("13810000000", null);//这里的电话号码是虚拟的 main.append("13810000001", null);//这里的电话号码是虚拟的 main.setCommandListener(this); } display.setCurrent(main); } public void pauseApp() {} public void destroyApp(boolean unconditional) {} public void commandAction(Command cmd,Displayable displayable){ if(cmd == List.SELECT_COMMAND){ String number = main.getString(main.getSelectedIndex()); try{ this.platformRequest("tel:"+number); }catch(ConnectionNotFoundException ex){ ex.printStackTrace(); } } } } |
| <input name="phone_no" format="*m" value="13"/> <do type="option" label="呼出号"> <go href="wtai://wp/mc;$(phone_no)"/> </do><br/> 或者直接写入电话号码的方式: <a href="wtai://wp/mc;1331597312*">拨打电话</a> |
25年牵手相伴,2500台经典机型限量特供,800-858-2883手机400-884-9425