forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove sleep from first attempt in subscribe thread
- Loading branch information
Devendra
committed
Jul 9, 2013
1 parent
f2730b7
commit 7c3a53f
Showing
5 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/AuthKeyConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.pubnub.examples.blackberry; | ||
|
||
import net.rim.device.api.ui.Field; | ||
import net.rim.device.api.ui.FieldChangeListener; | ||
import net.rim.device.api.ui.component.BasicEditField; | ||
import net.rim.device.api.ui.component.ButtonField; | ||
import net.rim.device.api.ui.container.MainScreen; | ||
|
||
import com.pubnub.api.Pubnub; | ||
|
||
public class AuthKeyConfig extends PubnubCommand { | ||
|
||
public AuthKeyConfig(Pubnub pubnub) { | ||
super(pubnub, "Auth Key Config"); | ||
} | ||
|
||
protected void initScreen() { | ||
final BasicEditField txtAuthKey = new BasicEditField("Auth Key : ", "", 256, BasicEditField.FILTER_DEFAULT); | ||
screen = new MainScreen(); | ||
screen.add(txtAuthKey); | ||
|
||
ButtonField btn = new ButtonField(); | ||
btn.setLabel("Set Auth Key"); | ||
screen.add(btn); | ||
|
||
btn.setChangeListener(new FieldChangeListener() { | ||
|
||
public void fieldChanged(Field field, int context) { | ||
|
||
try { | ||
_pubnub.setAuthKey(txtAuthKey.getText()); | ||
close(); | ||
} catch (Exception e) { | ||
|
||
} | ||
}}); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters