BBM SDK를 사용하여 응용 프로그램에서 다른 사용자에게 핀 메시지를 보내지 않아도됩니다. BB 핀은 BBM에만 국한되지 않습니다. Pin을 사용하여 메시지를 보내는 데 사용할 수있는 Blackberry의 고유 식별자입니다. 핀을 BBM과 함께 사용하여 BBM에서 메시지를 보낼 수도 있습니다. 텍스트 필드에 핀을 입력하고 미리 채워진 메시지를 보내야하는 경우 BBM을 사용할 필요가 없습니다. 다음 메소드를 사용하여 핀 메시지를 보낼 수 있습니다. suggetion에 대해
public static void sendPinMessage(String address,String body)
{
Store store = Session.getDefaultInstance().getStore();
//retrieve the sent folder
Folder[] folders = store.list(Folder.SENT);
Folder sentfolder = folders[0];
//create a new message and store it in the sent folder
Message msg = new Message(sentfolder);
PINAddress recipients[] = new PINAddress[1];
try{
//create a pin address with destination address
recipients[0]= new PINAddress(address,"My app");
}
catch (AddressException ae)
{
Log.Error(ae,"Check address");
}
try{
//add the recipient list to the message
msg.addRecipients(Message.RecipientType.TO, recipients);
//set a subject for the message
msg.setSubject("Subject");
//sets the body of the message
msg.setContent(body);
//send the message
Transport.send(msg);
}
catch (MessagingException me)
{
Log.Error(me,"Message excpetion in sending pin");
}
}
x를 사용할 수 있습니다. 시뮬레이터에서 어떻게 테스트 할 수 있습니까? – Hitarth
시뮬레이터에서 테스트 핀 메시지를 사용할 수 없습니다. – rfsk2010
테스트에 두 개의 장치를 사용해야합니다. 이메일 주소를 bmb PIN으로 추가 할 수 있습니까? – Hitarth