persistence of basic app

Hi guys,.

I am trying to apply a test of dead simple persistence. My app creates the next screen and nothing else:

public class MyScreen extends MainScreen {

    static final long MY_DATA_ID = 0xbadbad666bad0000L;    private static final PersistentObject persistentObject;

    static {        persistentObject = PersistentStore.getPersistentObject(MY_DATA_ID);    }

    public MyScreen(long styles) {        super(styles);

        setTitle("My Test App");        add(new LabelField("WHATSUP"));        add(new SeparatorField());

        String msg = "nothing";

        String persistedContents = "";        synchronized (persistentObject) {            persistedContents = (String) persistentObject.getContents();            if (persistedContents == null) {                persistentObject.setContents("WOOT");                persistentObject.commit();            } else {                msg = persistedContents;            }        }

        add(new LabelField(msg));

    }}

I expect that the first time that this app is running the 'persistedContents' have the value null and if we persist "WOOT" and "nothing" is used as the value of the labelfield.   The next time it is run it very well should the chain engaged in the previous run and if the value of the msg becomes "WOOT".

However, whenever I run it the value of "msg" ends up as 'nothing. ' Am I missing something? I read through the API and development environment guide.

Thank you!

You might be right. Well, why don't you just hack the extra lines in and create your own subclass that extends from the chain. I have a persistent store to run and I don't see much difference in your code, except that what I suggested above.

Kind regards

Carsten

Tags: BlackBerry Developers

Similar Questions

  • Teach the basic Apps DBA

    Hi all

    EBS R12

    OEL6

    When we e new bearing of EBS R12 to the customer,

    they force us to teach basic apps dba tasks to admin users.

    Can you give me links what are the Basic apps dba tasks?

    Are there any available syllabus or PowerPoint?

    Thank you very much

    JC

    Hi JC,.

    Check the following http://www.aioug.org/OTNYathra15/BENG_AjithNarayanan_Oracle%20ApplicationsR12.2EBROnlinePatching-MeansLotOfWorkForDevelopers.pdf

    Also check the following MOS: Applications DBA (AD) of Oracle E-Business Suite Release Notes for Release 12.2.2 (Doc ID 1376487.1) for more information.

    Coco - M

  • TouchEvent exception on vary basic app (9550 sim)

    I have recently interested in programming again and decided to start with the programming of blackberry. I get errors immediately the bat which is not encouraging, but I was hoping someone could help me.

    I created a basic "Getting Started"-based application first tutorial app. I added then added a button and a listener of field for this button that displays an alert dialog box. Very simple, but in my Simulator (9550) I get a runtime exception which stops at "TouchEventInternal.getGlobalX (int). This happens when I click 'OK' on the alert dialog.

    Here is the Stack Trace:

    Thread [Checklist(176)id=295857152] (Suspended (exception RuntimeException))
        TouchEventInternal.getGlobalX(int) line: 222
        ChecklistScreen(Screen).dispatchTouchEvent(TouchEvent) line: 1010
        UiEngineImpl.processMessage(Object, Message, boolean) line: 3388
        Checklist(Application).doProcessNextMessage(Message) line: 2268
        Checklist(Application).processNextMessage(Message) line: 1530
        Checklist(Application).enterEventDispatcher() line: 1371
        Checklist.main(String[]) line: 11
    

    And here is my Code:

    CheckList.java:

    package com.rim.samples.checklist;
    
    import net.rim.device.api.ui.UiApplication;
    
    public class Checklist extends UiApplication
    {
    
        public static void main(String[] args)
        {
            Checklist theApp = new Checklist();
            theApp.enterEventDispatcher();
        }
        public Checklist()
        {
            pushScreen(new ChecklistScreen());
        }
    }
    

    ChecklistScreen.java:

    package com.rim.samples.checklist;
    
    import java.util.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.component.*;
    
    public final class ChecklistScreen extends MainScreen
    {
        public ChecklistScreen()
        {
            super();
            ButtonField button = new ButtonField("Add New");
            FieldChangeListener action = new FieldChangeListener(){
                public void fieldChanged(Field field, int context)
                {
                    Dialog.alert("YOU PUSHED A BUTTON");
                }
            };
            button.setChangeListener(action);
            add(button);
        }
        public boolean onClose()
        {
            Dialog.alert("Cya!");
            System.exit(0);
            return true;
        }
    }
    

    Any help or advice would be appreciated

    Micah_H Hey!

    I guess you need to access the UI event handling, since it seems that you are outdoors. For example, you can use invokeLater () methods or invokeAndWait ().

    UiApplication.getUiApplication().invokeLater(new Runnable(){
        public void run() {
            Dialog.alert("YOU PUSHED A BUTTON");
        }
    });
    

    The other alternative is to set the CONSUME_CLICK function to your button:

    ButtonField button = new ButtonField("Add New", ButtonField.CONSUME_CLICK);
    

    Anyway, honestly, I surprised when your code works on previous 9530 Simulator. I don't know why!

    Kind regards

    Klerisson

  • Why is the cloud creative mobile applications only available for iphone and ipad? I need basic apps Android

    Where mobile applications base android? Why people do you assume that everyone uses an ipad or iphone

    I want applications android mobiles!

    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform for feature requests

  • Backup of images to pdf file of Java App

    Hello

    is there a feasibility to save images that have been responsible for res folder on the screen for the file PDF.

    Scenario goes as it will be set to images in the Horizontalmanager and by clicking on the image particular necessary to save it as a PDF file, then on SD card.

    Thanks in advance.

    After my post, I wanted to see if I could create a basic app that does this. It took me a little while, but I finally had the time to work on it.

    Visit the following site (it is one of my libraries):

    http://BBX.codeplex.com/

    Choose "source code", then "Browse".

    There is a directory called BBX_PDF. There is a small library to make PDF files. It's very raw. Both in use and in the code. There is no real speed or memory optimizations. To use it, you would spend in Hashtable, tables and specific objects. Then call the function write and he would write the PDF.

    The specific thing that you wanted, I did a "Builder" class that is available in the folder 'Other' BBX_PDF.

    It binds to one of my other libraries (BBX), but you can simply remove preprocessor components to get the generic version of the code.

    Edit: There is a bug in the Image2PDFBuilder class. When an image is added, it's really small. I always try to understand this, but if you understand it, thanks for posting this you fixed so I can update the code.

    Hope that helps.

  • BlackBerry App amazon appstore on the passport of BlackBerry

    Hey guys, I have a problem that cannot be solved by the amazon customer Service, I have to remove the amazon appstore and reinstall it. The problem is that as the app is pre-installed, I can't do it, can you tell me how to do it please? Thank you!

    I was always hesitant to say that there is no way. But it's a basic application and there is no user installation to remove the Basic apps.

    Like you, the goal is to remove and reinstall, a BONE clean reload sounds like your best bet.

  • Problem ladle with Burrito where AIR App window never appears

    I'm all of Google-fu, who have also sought everywhere here and at Adobe, but I was wondering if someone here might have experienced the same problem:

    When using Adobe Flash Builder Burrito, the window for the desktop version same basic app never appears - but that works well when I push to the Playbook Simulator.

    All that happens is the adl.exe process starts. No new window never appears. If I run in a debug configuration, it is obvious that the application runs indeed somewhere, because I can get feedback trace().

    I have installed and reinstalled Flash Builder and tried it on XP and Win7; systems both have the same problem. This is something that has developed over time, as I used to be able to use the desktop very well mode. I tested my own application as well as the tutorial app Playbook in 90 minutes. both work when I load them upward on the Simulator (but not on the desktop).

    I tried to update Flash Player and even Shockwave Player, nothing helps. It's using the AIR API v0.9.2.

    There is some development excrutiating - I need a feedback loop fast since I'm new to ActionScript. The Sim Card takes much too long.

    Thank you! -you guys have been a great resource.

    Is it possible that in the app - xml file, you do not have the visible window?

    true

    ..

    It can be commented.

  • BlackBerry Smartphones Core Apps missing 9720

    I would like to install the Russian language on my SIM free Blackberry 9720 bought in UK (Carphone Warehouse). As instructed, I try to find basic applications in Blackberry Desktop software, but there is no basic apps. After searching the forums, I tried to install software 9720 on my PC but only the O2 version is available and there is still no basic apps. Also I tried to launch the Blackberry Desktop Software with administrative rights, but nothing changes. How can I install Russian language on my 9720?

    I have two PC: Windows 7, Office 10 and win 8, office 10

    Hello and welcome to the community!

    The easiest way is, on a PC (you can not do on MAC):

    (1) make sure that you have a current backup and your BB complete... you can find the instructions at the link in my auto-sig below.

    2) uninstall all the BB OS packages from your PC,

    (3) make sure you have the BB Desktop Software already installed

    (4) download and install on your computer, the BB OS package you want:

    • http://us.BlackBerry.com/support/downloads/download_sites.jsp
    • If all you want are the levels of BONE, it is first sorted by carrier - the carrier supports, your search will be fast. However, some carriers are much slower than others to release updates. To really get the package up-to-date OS for your BB, you need to dig through and find all businesses that support your specific model BB and then compare the BONE levels they support.
    • Use this KB to guide you to choose the right OS package (which can be of any carrier):
      • KB05305 Location of support for BlackBerry smartphones

    5) remove all copies of the SELLER on your PC. XML... There will be at least one and maybe 2, and they will be located in the same way or to (it changes based on your version of Windows) these files:

    • C:\Program Files (x 86) \Common Files\Research In Motion\AppLoader
    • C:\Users\(your Windows username) \AppData\Roaming\Research In Motion\BlackBerry\Loader XML

    6 (a) to change your level of BB OS installed (at level or lower), you can run the Desktop software and connect your BB... the software should offer the operating system package you have installed on your PC.

    6 (b) or, for recharging your BB OS level installed as well to change, work around the Desktop software and use the CHARGER. EXE directly, through step 2 in this process:

    If, during the process of 6a or 6 b, your BB has an error '507', simply unplug the USB of the BB cord and reinsert it. do nothing else... This should allow the installation to continue.

    Good luck and let us know!

  • I really need some phones smart blackBerry app world help please!

    Hello!

    My main problem is that my global icon always disappear after the installation of the application (I always restart the phone and I check the app is really installed on the phone).

    I have a BB Bold 9780 with OS 6.0.294 (905) and get into serious trouble with the app world. I tried everything I read in the support forums and nothing seems to work for me!  Now, I have my phone only with the Basic apps, I mean, I haven't downloaded one. The world of the app is not installed now. When I install the 4.0.0.55 version the problem remains.

    Thanks for any help possible!

    Hi ritacastro

    Welcome to the Support Forums

    If you try to download the latest version of App World, then make sure that your OS device using versions6.0.0.706 or higher. Then you can try to update your device OS to a higher version. Or

    You run a lower OS version then please download App World version 4.0.0.55 for BlackBerry from your browser go to  http://mobileapps.blackberry.com/devicesoftware/entry.do?code=appworld3 to download 4.0.0.55 on your device.

    But before you download Uninstall app world from your device, for this on your homescreen go to Options > device > application > scroll Ap world and remove it from there. Then perform a battery pull restart.then to give it a try.

    KB29422  BlackBerry App World icon is missing after upgrade to BlackBerry App World 4.0.0.63 to 4.0.0.65

  • BlackBerry smartphone App World will not download or update applications

    Bold 9700.  used world app for some time.  I have uipdates available for several applications.  When I try to UPDATE, I get the message that this app is not available for download from app world for blackberry.  BUT ITS JUST HERE >...  Same thing to try to buy a new application.  I reloaded the software basic app world twice and restarted nothing doesn't.

    Thank you

    Looks like I told you wrong. Here's where I went. You can then click on Log In.

    http://appworld.BlackBerry.com/WebStore/

  • BlackBerry Smartphones what's Dungeon Desktop Manager deleting my App World icon?

    Recently, I noticed that when I plug in my "BOLD" of Desktop Manager, he wants to update Basic apps and when he does, he keeps getting rid of my App World icon.  Not sure why...?  Can someone give me an idea as to why? Thank you.

    Why update you?  If you'e updated, so you should be good for awhile.  Sometimes the DM will say that you need to update when you have not really.  I have no idea why he removes appworld, but it does.  The app is still there, but the icon is hidden.  Just reinstall and it should be good.

  • Demand Smartphones Suspicious updated blackBerry Blackberry Apps World

    Can anyone ease my mind? I received a text informing I needed to upgrade my Blackberry Apps World and had to create a user ID. Later in the process he advised that I should give my paypal password and that your future purchases would not speak based on the new blackberry and password. He gave me the opportunity to accept it as the only way to adjust th Apps World in the future.  I was suspicious but not able to contact Blackberry to check that it was a formal request.  Stupidly, I enter my paypal password, which she said was not valid and that I could enter payment details later. I came out of the site then tried to come back using the new id and basically apps world froze with a banner saying authentication and a symbol of locking up.  I changed the phone market but he continued to show the same thing.  Once a few more attempts with the same result, I took out the battery and then tried again. Apps World began, but I think it was the original version. Is the agent of upgrade? It seems not just to replace my id/password my paypal password world apps. In addition, after taking the battery and turn it again now I lost all my photos - but I guess that's another issue!

    You don't have to enter your paypal address, UNLESS you want to fill your registration MyWorld previously purchased apps.

    On the pictures... it would be useful to know where they are stored.

    Try this, perform a restart > with the phone smart BlackBerry turned on, remove the battery for a minute and then reinsert the battery to restart.

    Now, after back running, give the device FIVE minutes to install down to all activity data and to allow the device to recan map support, if you have a. It does this automatically, you do not need to do anything.

    Now, retrospective of photos at all. They are present and represent for the moment?

    If not, go to your media icon > Menu button > Explore. Here you have a choice of a press card?

    Search all folders, see if you see a photo you are missing.

  • Mobility base layers and App

    Is it possible to export Base layers and App layers form one deployment of Mirage to another?

    It feels ridiculous to resume all the Basic App layer when you have already done just because you do not have an import/export button... am I missing something here? Is it possible to do?

    I had the same problem. This has been fixed by ensuring that there is no such thing as the output directory (the following command fails if the 'exit' subdirectory already exists.

    Wanova.Server.Tools.exe Exportlayers - serveraddress localhost - layersfile "c:\share\layers.csv" outputfolder - c:\share\output

    Also my contained csv file line header, #LayerId, LayerVersion, but it seems to work in both cases

  • How does the droid runs faster with less APPS installed?

    Then I started noticing my Droid dragged significantly to the point that it started to drive me crazy. I mean when I bought it was quick, smooth and AWEsOME! But after that I started to install on 50-100 APPs My Droid began to lagg. Initially, he remained at the same level as the Iphone 3GS, but after uploading a large number of applications, he couldn't catch up to the Iphone in terms of fluidity of the user interface. Like the animations would stutter or skip, transitions keyboard would be very unsmooth and typing was very uncomfortable. Dragging the status bar has become very lag, and if im browse apps on the market would take a long time to load compared to load in a splitsecond when I got to him (I have 3 G coverage)

    I GOT SO MAD to the point that I uninstalled evey App I ever downloaded except for the Basic apps that have been packaged with the Droid. And you know what happened? BOOM! The Droid has become SUPER FAST. He remained neck and neck with the IPHONE 3GS. Everything worked without problems.

    So, as soon as now, I don't like that 10 or 15 Apps. That sucks because that Im afraid to download games or anything like that because I'm afraid that my Droid is going to slow down again.

    Does anyone else have this problem? Any suggestions to fix this? Because I don't want to freak out use a smartphone with only as 10APPS...

    Help, please

    A PC uses RAM for the application processes. It temporarily stores the program into RAM so that it can communicate with the processor quickly. When the program is closed, it leaves the RAM to free up space for other applications/programs.

    From my understanding, RAM on these mobile devices perform the same function, but its also used to store long term applications. Thus, when you downloaded applications from 50-100, which takes a lot of RAM space. If an application requires a bit of RAM to work properly, it may have to borrow some RAM from another application. This 'loan' of RAM will slow down the process on your device.

    On another thread, Geoffrey explained how the RAM is an important part of storage apps to prevent over heating and other processing issues.

    When you remove your apps, the aircraft had a ton of RAM to play with! He didn't have to borrow, so processing time has increased.

  • empty iframe in a rendered HTML app bc

    I created a very basic app bc, that works on my site partner (where it was developed), but do not work on client site I copied it to and authorized it (thanks to Mihai).

    The app is simple a menu item with an html page that includes an iframe. The iframe is supposed to contain an html of my partner portal page.

    In my partner site, the iframe renders correctly.

    In my client's site the iframe makes empty.

    Is there a way to add iframe to an html page in an application of British Colombia, who load the content of other Web sites?

    Thank you

    Adrian

    EASE

    Ok

    Your iframing inside an iframe with security features in a sandbox environment. You'll run into these issues.

    Why not just link directly to this page in the menu (you can make, refer to the documentation)

Maybe you are looking for