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.
- Loading branch information
Devendra
committed
Jul 9, 2013
1 parent
d07f3a1
commit 4aa674e
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
j2me/examples/PubnubExample/src/com/pubnub/examples/me/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,39 @@ | ||
package com.pubnub.examples.me; | ||
|
||
import java.util.Hashtable; | ||
|
||
import javax.microedition.lcdui.ChoiceGroup; | ||
import javax.microedition.lcdui.Command; | ||
import javax.microedition.lcdui.CommandListener; | ||
import javax.microedition.lcdui.Display; | ||
import javax.microedition.lcdui.Displayable; | ||
import javax.microedition.lcdui.Form; | ||
import javax.microedition.lcdui.TextField; | ||
|
||
import com.pubnub.api.Callback; | ||
import com.pubnub.api.Pubnub; | ||
import com.pubnub.api.PubnubError; | ||
|
||
public class AuthKeyConfig extends PubnubCommand { | ||
|
||
public AuthKeyConfig(Pubnub pubnub, Display display, Form menu) { | ||
super(pubnub, display, menu, "Set Auth Keys"); | ||
} | ||
|
||
protected void initForm() { | ||
final TextField txtAuthKey = new TextField("Auth Key : ", "", 255, TextField.ANY); | ||
|
||
form = new Form("History"); | ||
form.append(txtAuthKey); | ||
form.addCommand(new Command("Set Auth Key", Command.OK, 2)); | ||
|
||
form.setCommandListener(new CommandListener() { | ||
public void commandAction(Command arg0, Displayable arg1) { | ||
_pubnub.setAuthKey(txtAuthKey.getString()); | ||
display.setCurrent(menu); | ||
} | ||
}); | ||
|
||
} | ||
|
||
} |
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