拨打电话:
public void makeCall(String phoneNumber){
PhoneArguments call = new PhoneArguments (PhoneArguments.ARG_CALL,phoneNumber);
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, call);
}
}
发送短信: 不过这种应该不支持cdma
public void makeSMS(String number){
try{
MessageConnection mc = (MessageConnection)Connector.open("sms://");
TextMessage textMessage = (TextMessage)mc.newMessage(MessageConnection.TEXT_MESSAGE); textMessage.setAddress("sms://" + number);
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(textMessage));
} catch (IOException e)
{
Dialog.alert(e.getMessage());
}
}