views:

47

answers:

1

Hi,

In my balckberry application i am using the Persistance,List and Threads to execute the code. The code is given below:

enter code here

UiApplication.getUiApplication().invokeLater(new Runnable(){

                                public void run(){

              CategoryListScreen.getInstance(

              UiApplication.getUiApplication())

                    .setCategoryListContent();

        }

  });

public void setCategoryListContent() {

        categoryList.delete(0);



        CategoryListScreen categoryListScreen = CategoryListScreen

                    .getInstance(UiApplication.getUiApplication());

        PersistentObject categoryListPersistObject = PersistentStore

                    .getPersistentObject(0x73c8d3592648fea5L);

        PersistentObject datePersistObject = PersistentStore

                    .getPersistentObject(0xe453c1c0c14b9aebL);



        categoryListPersistObject.setContents(Communicator.categoryDatas);

        datePersistObject.setContents(new Date());

        categoryListScreen.setCategoryListVector(new Vector());

        categoryDataList = Communicator.categoryDatas;

        System.out.println("-------------------- " + Communicator.categoryDatas.length);

        for (int i = 0; i < Communicator.categoryDatas.length; i++) {

              if (Communicator.categoryDatas[i] != null) {

                    if (Communicator.categoryDatas[i].getName() != null) {

                          categoryListScreen.getCategoryListVector().addElement(

                                      Communicator.categoryDatas[i].getName());

                    }

              }

        }

        testListCallback = new ListCallback();

        categoryList.setCallback(testListCallback);



        int i = categoryListScreen.getCategoryListVector().size();

        categoryListScreen.getCategoryList().setSize(i);

        System.out.println("---------------------->" + categoryListScreen.getCategoryListVector().size());

//

        categoryListScreen.getCategoryList().setRowHeight(40);



        // categoryListScreen.invalidate();

        invalidate();



        System.out.println("End.........................");

  }

The application is Using the Threads to execute the persistance and also setting the size of the list.The application is running fine and exiting successfully.

But at the time of unistalling the application the device get being restarted and also after restarting the application ,there is no effect on the application.The application still remains there.

what is the problem in uinstalling the application which uses Threads,persistance and list? why is it being restarted without any user confirmation or alert? why is it not get being uninsall after restart?

please give the resolution for the given problem or any useful code snippet ,which would be appreciated.

Thanks,

Mishal Shah

+1  A: 

Is this on a device simulator or a real device? As far as I know, if you reset the simulator, it loads back all the installed apps onto to simulator.

Marc Novakowski
Thanks for reply,it is in the real device.
Mishal
You might want to dump the event log to see if there is any indication in there why it's not properly deleting your app.
Marc Novakowski