ÔÚJ2MEºÍWAPÖÐʵÏֵ绰ºô½Ð¹¦ÄÜ
MIDP 1.0ÖÐûÓÐÌṩµç»°ºô½ÐµÄ¹¦ÄÜ¡£ÔÚMIDP 2.0ÖУ¬javax.microedition.midlet.MIDletÀàÌṩÁËplatformRequest()·½·¨À´ÇëÇóÉ豸À´Íê³ÉÌض¨µÄÇëÇó£¬ÇëÇóµÄÄÚÈÝÓÉplatformRequest()·½·¨µÄStringÀàÐ͵IJÎÊýurlÀ´±êʶ¡£¿ÉÄÜÊǵ÷ÓÃä¯ÀÀÆ÷´ò¿ªÄ³¸öÌض¨µÄwapÒ³Ã棬Ҳ¿ÉÒÔÊǺô½Ðµç»°¡£ÔÚÉ豸×ÊÔ´¿ÉÓõÄʱºò£¬ÏµÍ³»á°ÑMIDlet·ÅÔÚºǫִ́ÐУ¬¶ø°ÑÌض¨µÄÓ¦ÓóÌÐò£¬ÀýÈçµç»°³ÌÐò»òÕßä¯ÀÀÆ÷·ÅÔÚǰ̨À´Ö´ÐС£ºô½Ðµç»°µÄʱºò¿ÉÒÔʹÓÃÈçϵÄÐÎʽ£º
try{
¡¡this.platformRequest("tel:13810000000");
}catch(ConnectionNotFoundException ex){
¡¡ex.printStackTrace();
}
ÕâÀïÌṩÁËÒ»¸ö¼òµ¥µÄÀý×Ó£¬ÔÚNokia 7610£¨Ö§³ÖMIDP 2.0£©ÉϲâÊÔͨ¹ý£¬³É¹¦ºô½ÐÁËÖ¸¶¨µÄµç»°¡£
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();
¡¡}
}
}
}
Ïà±ÈJ2ME¼¼Êõ£¬WAP¸üÀàËÆÓÚWeb£¬ÊÇÒ»ÖÖ·þÎñÆ÷¶ËΪÖ÷µÄ¼¼Êõ¡£ÔÚWMLÖпÉÒÔµ÷ÓÃÉ豸µÄWTAIº¯ÊýÀ´ºô½ÐÌض¨µÄµç»°ºÅÂ룬´úÂëÈçÏÂËùʾ£º
£¼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£¾
Ïà¹ØÎĵµ£º
£¨Æߣ©Îĵµ½á¹¹
XMLÉùÃ÷ºÍ×Ö·û±àÂ룺<?xml version="1.0" encoding="UTF-8"?>
UTF-8/16±àÂë¿ÉÊ¡ÂÔ¡£XMLÉùÃ÷Ò²²»ÊDZØÐëµÄ£¬µ«Èç¹ûºöÂÔÔÚÐí¶àWAPä¯ÀÀÆ÷Öгö´í¡£
±ØÐëÓÐDOCTYPEÉùÃ÷¡£ÔÚXMLÉùÃ÷ºÍ<html>ÔªËØÖ®¼ä¡£
<html>¡¢<head>¡¢<link>¡¢<title& ......
Ëæ×Å3GÔÚÖйúµÄ·¢Õ¹ÒÔ¼°ÊÖ»úÉÏÍøÓû§µÄÔö³¤£¬Ãâ·Ñwap×öΪÊÖ»ú¹ã¸æµÄÔØÌ壬ҵÄÚÈËÊ¿Ô¤²âÔÚδÀ´µÄÖйúÎÞÏßÍøÂçÓªÏú½«´ó·ÅÒì²Ê¡£ WAPµÄÐËÊ¢±êÖ¾×ÅÊг¡ÒѾ×ßÏò³ÉÊ죬WAPÕ¾³¤ÆÈÇÐÐèÒªÈçºÎÁ˽âÓû§£¬°ÑÎÕÓû§£¬·¢Õ¹Óû§£¬¶øÒÀÀµ¹ã¸æ·Ö³É£¬µã»÷¼Æ·ÑΪÖ÷ÒªÓ¯ÀûÊֶεÄÕ¾³¤¸üÐèÒªÁ÷Á¿µÄ¹«Ö¤ÐÔÒÔ»»È¡Óë¹ã¸æ¿Í»§Ì¸¼Û¸ñµÄÖ±½Ó³ïÂë¡£
Ëû ......
ÔÚ¡¶Ëû¾ËÍøwapÁ÷Á¿Í³¼Æ·ÖÎöƽ̨¡·¿ª·¢ÖÐΪÁËÌá¸ßϵͳµÄÐÔÄÜ£¬ÎÒÃÇÀûÓÃCacheÀ´±£´æÊý¾Ý£¬ÀýÈç°ÑÓû§µÄһЩȨÏÞÐÅÏ¢·ÅÔÚCacheÖУ¬µ«ÕâÑù×ö»áÓÐЩÎÊÌ⣬ºÎʱÇå³ýCacheÓëÊý¾Ý±£³Öͬ²½£¬ÏÂÃæÎÒÔÚÏîÄ¿ÖÐʹÓÃCacheµÄÐĵã¬Óë´ó¼Ò·ÖÏí¡£
Ò»¡¢ÀûÓÃCacheDependencyÀà
¡¡¡¡ËüÔÚÃüÃû¿Õ¼äSystem.Web.CachingÖС£CacheDependencyÀà»áÓëÎ ......
Ëæ×Å3GÔÚÖйúµÄ·¢Õ¹ÒÔ¼°ÊÖ»úÉÏÍøÓû§µÄÔö³¤£¬Ãâ·Ñwap×÷ΪÊÖ»ú¹ã¸æµÄÔØÌå¡£WAPÕ¾³¤ÆÈÇÐÐèÒªÈçºÎÁ˽âÓû§£¬°ÑÎÕÓû§£¬·¢Õ¹Óû§£¬¶øÒÀÀµ¹ã¸æ·Ö³É£¬µã»÷¼Æ·ÑΪÖ÷ÒªÓ¯ÀûÊֶεÄÕ¾³¤¸üÐèÒªÁ÷Á¿µÄ¹«Ö¤ÐÔÒÔ»»È¡Óë¹ã¸æ¿Í»§Ì¸¼Û¸ñµÄÖ±½Ó³ïÂë¡£ËùÒÔ¾ÍÓÐÁ˹ØÓÚWAPÁ÷Á¿Í³¼ÆµÄ¸÷¸öÕ¾µã£¡
²» ......
1¡¢WAPtor ˵Ã÷: WAPtor ÊÇÒ»¿î·Ç³£¼òµ¥Ò×ÓÚʹÓõÄWML ±à¼Æ÷£¬ËäÈ»ËüûÓаÚÍÑ´úÂë¸ñʽµÄÊø¸¿£¬µ«±È¹ýÈ¥µÄHTML ´úÂë¼òµ¥µÄ¶à¡£¼´Ê¹Äã²»¼ÇµÃWMLÓïÑԵıêÇ©ºÍÊôÐÔ£¬Ò²ÄÜÀûÓÃWAPtorÖÆ×÷³ö·Ç³£³öÉ«µÄWMLÍøÒ³£¬WAPtorÄÜÈÃÄãËæʱԤÀÀWMLÒ³ÃæµÄЧ¹û£¬Ê®·Ö·½±ã¡£ WAPtorÊʺϳõѧWMLÍøÒ³µÄÈËʹÓã¬Ç¿Á¦ÍƼö¡£ >> waptor23.exe ......