[Original] MIDP2.0 sent SMS so convenient

zhaozj2021-02-16  73

[a cross post from clapton.blogone.net]

Clapton_XPathotmaildotcom

[code]

Import javax.wireless.Messaging. *; import javax.microedition.io. *;

// ................

try {String addr = "sms: // 8613 *********"; MessageConnection conn = (MessageConnection) Connector.open (addr); TextMessage msg = (TextMessage) conn.newMessage (MessageConnection.TEXT_MESSAGE) Msg.SetPayLoadText ("Wateveruwannasay"); conn.send (msg);} catch (exception ex) {

// Handle Exception}

[/ code]

[Test by Motorola V600 / A768]

When the code is called in the phone, the dialog box will be inquiry like an inquiry network connection, allowing the text message to be successful after the text message is allowed.

Clapton_XPathotmaildotcom

转载请注明原文地址:https://www.9cbs.com/read-15834.html

New Post(0)