Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6576493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:31:08+00:00 2026-05-25T15:31:08+00:00

I have completed a SOAP verification class for my blackberry, however I am having

  • 0

I have completed a SOAP verification class for my blackberry, however I am having a problem implementing a sign in automatically function. When my application starts the main class reads the database to see if my tickbox (or checkbox) is checked, and if so run the code that does the SOAP validateUser, and then it will go to the next screen. The validation works fine, and the right values are retrieved from the database, but when I try to use the Ui.getUiEngine().pushScreen(new ContentScreen()) it fails. I have tried popping the current screen also to no avail.

Here is my main method and SOAP validation method, first the main:

public HelloBlackBerryScreen() {
        super(MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR);
        setTitle("IDL Voucher Application");
        //createDB();
        getValues();
        if(tickBoxes[0]){
            setUserPass();
        }
        if(tickBoxes[1]){
            setUserPass();

        }


        checkBox1 = new CheckboxField("Save Password", tickBoxes[0]);
        checkBox2 = new CheckboxField("Login Automatically",tickBoxes[1]);
        hfm = new HorizontalFieldManager();

        username = new BasicEditField("Username:", usernameField, 100,
                BasicEditField.EDITABLE);
        password = new PasswordEditField("Password: ", passwordBox);
        username.setMargin(20, 10, 20, 20);

        password.setMargin(20, 10, 20, 20);

        this.add(username);
        this.add(new SeparatorField());

        this.add(password);
        this.add(new SeparatorField());


        this.add(checkBox1);
        this.add(new SeparatorField());
        this.add(checkBox2);
        this.add(new SeparatorField());
        this.add(hfm);
        ButtonField buttonField_1 = new ButtonField("Login",
                ButtonField.CONSUME_CLICK | ButtonField.FIELD_LEFT);
        ButtonField buttonField_2 = new ButtonField("SignUp",
                ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);
        ButtonField buttonField_3 = new ButtonField("Exit",
                ButtonField.CONSUME_CLICK | ButtonField.FIELD_RIGHT);
        // add( buttonField_2 );
        buttonField_1.setMargin(20, 10, 10, 35);
        buttonField_2.setMargin(20, 10, 10, 10);
        buttonField_3.setMargin(20, 10, 10, 10);

        hfm.add(buttonField_1);
        hfm.add(buttonField_2);
        hfm.add(buttonField_3);

        buttonField_1.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(Field arg0, int arg1) {

                if(username.getText().length() >1 && password.getText().length() >1){
                try {

                    soap();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (XmlPullParserException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (DatabaseIOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }

            }

            else{
                Dialog.inform("Please enter a username and password");
            }
        }});
        buttonField_2.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(Field arg0, int arg1) {
                try {
                    signup();
                } catch (DatabaseIOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }

            }
        });
        buttonField_3.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(Field arg0, int arg1) {
                onClose();

            }
        });


        checkBox1.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(Field arg0, int arg1) {
                //your code

                if(checkBox1.getChecked() == true){
                    tickBoxes[0] = true;

                    updateFields();
                }
                else{
                    tickBoxes[0] = false;
                    updateFields();
                }

            }
        });
        checkBox2.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(Field arg0, int arg1) {
                //your code

                if(checkBox2.getChecked() == true){
                    tickBoxes[1] = true;

                    //Dialog.inform("Been Checked");
                    updateFields();
                }
                else{
                    tickBoxes[1] = false;
                    //Dialog.inform("Unchecked");
                    updateFields();
                }

            }
        });
        if(tickBoxes[1]){
            try {
                soap();
            } catch (DatabaseIOException e) {
                // TODO Auto-generated catch block
                System.out.println(e.getMessage() + "database problem");
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                System.out.println(e.getMessage() + "I/O problem");
                e.printStackTrace();
            } catch (XmlPullParserException e) {
                // TODO Auto-generated catch block
                System.out.println(e.getMessage() + "XML problem");
                e.printStackTrace();
            }
        }
    }

and the SOAP validation:

public void soap() throws IOException, XmlPullParserException, DatabaseIOException {
        System.out.println("STARTING");

        if (DeviceInfo.isSimulator()) {
            URL = URL + ";deviceSide=true";
        }
        // start here
        SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
        rpc.addProperty("User", username.getText());
        rpc.addProperty("Password", password.getText());
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                SoapEnvelope.VER11);

        envelope.bodyOut = rpc;
        envelope.dotNet = true;
        envelope.encodingStyle = SoapSerializationEnvelope.XSD;

        HttpTransport ht = new HttpTransport(URL);
        ht.debug = true;

        try {
            ht.call(SOAP_ACTION, envelope);
            System.out.println("IN TRY");
            SoapObject resultProperties = (SoapObject) envelope
                    .getResponse();
            verifyNum = Integer.parseInt(resultProperties.getProperty(0)
                    .toString());
            System.out.println("PARSED INT RIGHT HERE " + verifyNum);
            URLis = resultProperties.getProperty(2).toString();
            System.out.println("URL PARSE HERE " + URL);
        } catch (org.xmlpull.v1.XmlPullParserException ex2) {

        } catch (Exception ex) {

            String bah = ex.toString();

        }
        String oldUser = "";
        try {
            URI uri = URI.create("file:///SDCard/Databases/" + "database1.db");
            sqliteDB = DatabaseFactory.open(uri);
            Statement st = null;
            st = sqliteDB.createStatement("SELECT Name, URL FROM People");
            st.prepare();
            Cursor c = st.getCursor();
            Row r;
            int i = 0;
            while(c.next()) 
            {
                r = c.getRow();
                i++;
                System.out.println(r.getString(0) + "HERE IS NAME");
                System.out.println(r.getString(1) + "HERE IS URL");
               // URLis = r.getString(1);

                oldUser = r.getString(0);

            }

            st.close();
            sqliteDB.close();
        }

        catch ( Exception e ) {
            System.out.println( e.getMessage() + "wut");
            e.printStackTrace();
        }
        if (verifyNum >= 1) {
            try
            {
             URI myURI = URI.create("file:///SDCard/Databases/" + "database1.db"); 
             sqliteDB = DatabaseFactory.open(myURI);
             Statement st = null; 


             st = sqliteDB.createStatement("UPDATE People SET Password='"+ password.getText() + "', Name='" + username.getText() + "', URL='"+URLis +  "' " +
                     "WHERE Name=" + "'"+ oldUser +"'" + "");

             st.prepare();
             st.execute();
             st.close();
             sqliteDB.close();
             System.out.println("base for names is");

             }
             catch ( Exception e ) 
             {         
                 System.out.println( e.getMessage() + "SUPER");
                 e.printStackTrace();
             }

            Ui.getUiEngine().pushScreen(new ContentScreen());


        } else {
            Dialog.inform("Incorrect Username or Password ");
        }

    }

and at last what I think might be the error:

[0.0] net_rim_cldc-15(4C48DD41)
[0.0]  UiEngineImpl
[0.0]  addScreen
[0.0]  0x81EA
[0.0] net_rim_cldc-15(4C48DD41)
[0.0]  UiEngineImpl$UiEngineOldInterfaceAdapter
[0.0]  pushScreen
[0.0]  0xAF48
[0.0] net_rim_cldc-12(4C48DD41)
 [0.0]  UiApplication
[0.0]  pushScreen
[0.0]  0xBEF4
[0.0] thenewBlackB(4E73609F)
[0.0]  MyApp
[0.0]  <init>
[0.0]  0x3031
[0.0] thenewBlackB(4E73609F)
[0.0]  MyApp
[0.0]  main
[0.0]  0x2FFD
[0.0] Warning: VerticalFieldManager INCREMENTAL_LAYOUT style specified without    specifying USE_ALL_WIDTH | [0.0] USE_ALL_HEIGHT | VERTICAL_SCROLL
[0.0] Warning: VerticalFieldManager INCREMENTAL_LAYOUT style specified without specifying USE_ALL_WIDTH | [0.0] USE_ALL_HEIGHT | VERTICAL_SCROLL
[0.0] FocusHistory: Focus lost; App thenewBlackB; Component net.rim.device.api.ui.component.ButtonField
[0.0] TID:unable to execute in the app mypackage.MyApp@f8f01efd|java.lang.Object@7e392341|-1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:31:08+00:00Added an answer on May 25, 2026 at 3:31 pm

    To do this from the background you need to schedule your code to run in the event handler thread. You can do this with invokeLater

    UiApplication.getUiApplication().invokeLater (new Runnable() 
    {
         public void run()
         {
              // push your screen here
         }
    }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have completed every step in XMonad's tutorial for Mac. However, I cannot start
I have completed the assignment (yes it is for a programming class), but I
How can I launch an application with administrator rights after I have completed an
I have an ASP.NET 4 web application that references a SOAP web service. I
I have completed the application in 2.1 and now I have phone with android
I have completed a simple database for a project. Only 6tables. Of the 6,
I have completed configuring SSL in my local Tomcat. And the exception was thrown
I have completed the well known 'news' toutorial included in CI documentation. sometimes double
Okay. I have completed my first python program.It has around 1000 lines of code.
I am following this tutorial https://developer.android.com/guide/tutorials/views/hello-tabwidget.html and have completed it. Now I would actually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.