public ReceiveBPSScreen(final CommunicationController controller) {
setTitle("BPS Push");
// Initialize UI components
_uriField =
new EditField("BPS URI:", "http://pushapi.eval.blackberry.com",
140, 0);
_uriReceiverField =
new EditField("Listen URI:", "local://:11111/test2", 140, 0); // where
// 11111
// -
// is
// the
// push
// port
_appIdField = new EditField("Application ID:", "", 140, 0);
final FullWidthButton backButton = new FullWidthButton("Back");
backButton.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)
*/
public void fieldChanged(final Field field, final int context) {
((UiApplication) ReceiveBPSScreen.this.getApplication())
.popScreen(ReceiveBPSScreen.this);
}
});
_contentField =
new EditField("Content provider URI:",
"https://10.11.23.45:8443/sample-app/subscribe", 140, 0);
final FullWidthButton postButton =
new FullWidthButton("Subscribe for push");
postButton.setChangeListener(new FieldChangeListener() {