hi all I am very new to this Blackberry application. How can we use sessions in this application? When moving from login page to another one; how can I use sessions to get the user name in the next page also?
A:
If you're talking about creating using Java to create an application for the Blackberry then you can't use Session.
One way that you can use it if it is only to pass 1 value from a screen to the next is to add a parameter to the constructor of the screen that you are navigation too:
public class aScreen extends MainScreen{
public aScreen(String userName){
}
}
then when navigating to that screen use:
UiApplication.getUiApplication().pushScreen(new aScreen("Rateesh"));
If it's to share a value across multiple screens then you can use a global variable declared in the class that is the main entry point for the application, which extends UiApplication or Application.
Fermin
2009-11-27 10:24:42