0

私は J2ME アプリケーションを作成して、自分の組織に登録されているすべてのトラック ドライバーを、Cell ID を介して追跡しました。アプリは、該当するドライバーの LAC、MCC、MNC、セル ID を含む SMS を 30 分ごとに送信し (ドライバーの現在の居場所を知るため)、DB/Excel シートに CSV として保存します。

今私が直面している問題は、Java 対応の S40/S60 にアプリをインストールした後、どのようにインターフェイス アーキテクチャを機能させることができるか、つまり、アプリに詳細を抽出させ、定義済みの番号に SMS を送信させる方法です。 ?

質問の理由は、「JAVA ME の標準ポートでは SMS を受信できない」という文に少し混乱しているためです。それは本当に SMS を受信できないということですか?

これは、Nokia デバイスのみについて現在持っているものです。

/**
 * get the cell id in the phone
 * 
 * @return
 */
public static String getCellId(){
    String out = "";
    try{

        out = System.getProperty("Cell-ID");
        if(out== null ||out.equals("null")|| out.equals(""))
            out = System.getProperty("com.nokia.mid.cellid");
        #endif

    }catch(Exception e){
        return out==null?"":out;
      }

    return out==null?"":out;
}

/**
 * get the LAC string from phone
 */
public static String getLAC(){
    String out = "";
    try{

        out = System.getProperty("phone.lac");
        if(out== null ||out.equals("null")|| out.equals(""))
            out = System.getProperty("com.nokia.mid.lac");
        #endif

    }catch(Exception e){
        return out==null?"":out;
    }

    return out==null?"":out;
}

/**
 * get the IMSI string from phone
 */

public static String getIMSI(){
    String out = "";
    try{

        out = System.getProperty("IMSI");
        if(out== null ||out.equals("null")|| out.equals(""))
            out = System.getProperty("com.nokia.mid.mobinfo.IMSI");
        if(out== null ||out.equals("null")|| out.equals(""))
            out = System.getProperty("com.nokia.mid.imsi");
        #endif

    }catch(Exception e){
        return out==null?"":out;

        }

    return out==null?"":out;
}


/**
 * get the MCC string from phone
 */

public static String getMCC(){
    String out = "";
    try{

        if(out== null ||out.equals("null")|| out.equals(""))
            out = System.getProperty("com.nokia.mid.mobinfo.IMSI");
        #endif

    }catch(Exception e){
        return out==null?"":out;
    }

    return out==null?"":out;
}

/**
 * get the MNC string from phone
 */
public static String getMNC(){
    String out = "";
    try{

        if(out== null ||out.equals("null")|| out.equals(""))
            out = getIMSI().equals("")?"": getIMSI().substring(3,5);
        #endif

    }catch(Exception e){
        return out==null?"":out;
    }

    return out==null?"":out;
}
4

0 に答える 0