MIDlet app download kick at the first screen to the receipt of the appeal

I'm trying to understand why a MIDlet get kick to the first screen when a user accepts an incoming call. I have I would expect the OS to stay on the current screen.

Based on the code below if you browse to the second screen (and even a third if there is one) then call/answer the phone and then hang up, you will get the kick for the first screen of the application.

BlackBerry 8330 v4.3.0.124 (Platform 3.1.0.71)

package pascal;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class BBCallHandle extends MIDlet {
    private static BBCallHandle instance;
    private Display display;

    public BBCallHandle() {
    }

    public static void exit() {
        instance.notifyDestroyed();
    }

    protected void startApp() throws MIDletStateChangeException {
        instance = this;
        display = Display.getDisplay(this);
        Form1.getInstance(display).go(null);
    }

    protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
    }

    protected void pauseApp() {
    }
}
package pascal;

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;

public class Form1 extends Form implements CommandListener {
    private Display display;
    private Command backCommand;
    private Command nextFormCommand;
    private Displayable previous;

    public Form1(String title) {
        super(title);
    }

    public static Form1 getInstance(Display display) {
        Form1 instance = new Form1("Form1");
        instance.display = display;
        instance.initUI();
        return instance;
    }

    public void go(Displayable previous) {
        this.previous = previous;
        display.setCurrent(this);
    }

    public void commandAction(Command command, Displayable item) {
        if (command == backCommand)
            doBackCommand();
        else if (command == nextFormCommand)
            doNextFormCommand();
    }

    private void doBackCommand() {
        if (previous != null)
            display.setCurrent(previous);
        BBCallHandle.exit();
    }

    private void doNextFormCommand() {
        Form2.getInstance(display).go(this);
    }

    private void initUI() {
        append("You are in form 1");
        addCommand(getBackCommand());
        addCommand(getNextFormCommand());
        setCommandListener(this);
    }

    private Command getBackCommand() {
        if (backCommand == null)
            backCommand = new Command("Back", Command.BACK, 0);
        return backCommand;
    }

    private Command getNextFormCommand() {
        if (nextFormCommand == null)
            nextFormCommand = new Command("Next", Command.SCREEN, 0);
        return nextFormCommand;
    }
}
package pascal;

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;

public class Form2 extends Form implements CommandListener {
    private Display display;
    private Displayable previous;
    private Command backCommand;

    public Form2(String title) {
        super(title);
    }

    public static Form2 getInstance(Display display) {
        Form2 instance = new Form2("Form2");
        instance.display = display;
        instance.initUI();
        return instance;
    }

    public void go(Displayable previous) {
        this.previous = previous;
        display.setCurrent(this);
    }

    public void commandAction(Command command, Displayable item) {
        if (command == backCommand)
            doBackCommand();
    }

    private void doBackCommand() {
        display.setCurrent(previous);
    }

    private void initUI() {
        append("Hello form2");
        addCommand(getBackCommand());
        setCommandListener(this);
    }

    private Command getBackCommand() {
        if (backCommand == null)
            backCommand = new Command("Back", Command.BACK, 0);
        return backCommand;
    }
}

Form1.getInstance () is called from startApp() * and * whenever this happens, a new instance of Form1 is created and set as the current i.e. display.setCurrent (new Form1()). Iwould think calling incoming call pauseApp() and when call ends, startApp() is called again.

I suggest you use System.out.println see entities (Form1@1234abcd and Thread.currentThread ()) in lanceApp and other "reminders".

Tags: BlackBerry Developers

Similar Questions

  • When I download creative cloud and go into apps download illustrator, under the applications section, it says download error. tried to download several times more, again the same error. What can I do?

    When I download creative cloud and go into apps download illustrator, under the applications section, it says download error. tried to download several times more, again the same error. What can I do?

    Hello

    I think that you have found the "download error" in the Apps Panel.

    Please check the help below document:

    Download error in the applications tab of Creative Cloud Desktop Application

    You can also view the threads below:

    https://forums.Adobe.com/thread/1832357

    Persistent Cloud error - error download - creative

    Re: Creative Cloud "Download error" message

    Kind regards

    Sheena

  • Cordova app fileTransfer.download fails on the first attempt

    Guys it's been a week I tried to solve this problem.

    I have this app in Cordoba that downloads a number of images in the local directory and does well on Android and iOS. FileTransfer should work perfectly on BB10 as well, but the download fails with the error code 1 first time the application is run.

    Oddly enough the download succeeds second time I run the application.

    Here's my quick snippet of the application that works on other platforms

    window.requestFileSystem = window.requestFileSystem | window.webkitRequestFileSystem;
    window.requestFileSystem (LocalFileSystem.PERSISTENT, 0, fileSystemSuccess, fileSystemFail);
            
    function fileSystemSuccess (fileSystem) {}
    var FP = fileSystem.root.toURL () + "category of xyz.jpg";
    fileTransfer var = new FileTransfer();
    fileTransfer.download (CAT [num], fp,
    {function (Entry.)}
    Alert ("full download:" + entry.fullPath);
    createCategoryCache (cat, num + 1);
    },
    {function (Error)}
    Alert ("source of the download error" + error.source);
    Alert ("download error target" + error.target);
    Alert ("download error code" + error.code);
    }
    );
    }

    First, this application runs after installation, the code goes into error with the settings below:

    Error.source is null

    Error.Target is null

    Error.code isn't a numebr but a ProgressEvent object instance. Further investigation of the ProgressEvent, it shows that
    ProgressEvent.percentage is 0
    ProgressEvent.loaded is 0
    ProgressEvent.totl is correctly reported the size in bytes of the file to be downloaed.

    Next time you run again the code above and the download is successful, no problem at all

    Can someone please shed some light on this subject? I tried everything I could do.

    For example

    I tried to use cordova.file.dataDirectory instead of fileSystem.root.toURL)

    I tried to use blackberry.io.sharedFolder instead of fileSystem.root.toURL)

    In any case, the behavior is the same. Failure to try a percentage 0

    Success on 2 with full download attempt.

    Any help will be much appreciated, this project is already too late.

    Hello

    There is a known issue, write files using the latest file plugin for all other iOS and Android platforms.

    This has been fixed and a new version of the plugin is underway.

    Until it is officially released, you can get the update from git.

    cordova plugin rm org.apache.cordova.file-transfer
    cordova plugin rm org.apache.cordova.file
    cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
    cordova plugin add org.apache.cordova.file-transfer
    
  • I bought the first Pro 5.5 and downloaded/installed on my desktop.  Recently upgrade to Windows 10 wiped out all my apps from third parties including first 5.5 Prop.  How cn I re - download to reinstall?

    I bought the first Pro 5.5 and downloaded/installed on my desk several years ago.  Recently upgraded to Windows 10, their upgrade glitch locked up and everything and forced me to re build-in the process it has wiped out all my apps from third parties including first 5.5 Prop.  How cn I re - download to reinstall?

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a link to access a page to download the Adobe programs if you do not have a disk or drive

    -you will need to enter your original serial number during the installation for non-Cloud programs

    - or kglad links in response to #1 here can help https://forums.adobe.com/thread/2081216

    Also go to https://forums.adobe.com/community/creative_cloud/creative_cloud_faq

    - and also read https://forums.adobe.com/thread/1146459

  • After the upgrade to Firefox 6.0.2 first flash content was not displayed, but now the plugin does not load. Firefox plugin check says Flash is obsolete, but I just downloaded it from the Web site.

    After the upgrade to Firefox 6.0.2 first flash content was not displayed, but now the plugin does not load. Firefox plugin check says Flash is obsolete, but I just downloaded it from the Web site.
    Mac OS X 10.7.1
    Firefox 6.0.2
    Flash 10.3.183.7

    The current versions of Firefox are 64-bit on OS X, if you need a 64-bit version of Flash with Firefox 6.0.x or you must start Firefox as a 32-bit application to be able to use a 32-bit version of a plugin.

    1. Closing of Firefox
    2. Launch the Finder and open the Applications folder
    3. Make a right click or Ctrl-click the icon of Firefox.app
    4. Select "Get Info."
    5. Select or deselect the option "open in 32-bit mode".
    6. Close window "Firefox Info"
    7. Restart Firefox
  • HP probook 4520 s held the first screen of the logo

    I was installing windows when the system which took place facing upwards. When I rebooted, it crashes on the first screen of the hp logo. where written "press ESC to display the boot options. without key works ceiling light flashes several times and turn off.
    It is repeated each time. Help, please.

    When it is connected to your desktop computer, can you feel if he goes? When you say that the Bureau does not detect the hard disk, which is in the bios, or when you open my computer?  If the drive is recognized in the bios, you can buy a software like ntfs getback who will try to rebuild the fat table so you can copy items over to the hard drive of the desktop computer.  You can download a trial version that will let you know if it will work, but you will have to buy it to actually transfer the software on disk from the desktop. You can also try to download the certification test of the drive manufacturer that will fix the bad sectors and some minor problems. SpinRite will try to retrieve data for each of the areas that may be of low bits set not completely (upwards or downwards). If the Office does not see the drive in bios, the circuit board on the hard drive is bad or the disc is not rotating. If you gently hold the disc in hand and slightly turn the disc, you should feel a gyroscopic effect of the spinning drive. If you do not feel the disc spins, the motor is probably bad or racing circuit on low hard drive circuit is bad. Sometimes (perhaps 50%), you can try to replace the circuit board with the exact same model Platinum (even if you buy the same model of car, they may have different circuit boards).  The problem is that newer readers have a flash memory chip that stores the settings for each specific access accurate and speed reader. If the exact same Platinum turns the drive, but can't read well, he have to unsolder the flash chip and move it to the new circuit board. Then, the chances improve for recovery. If the new Platinum will not turn the engine, the engine is bad. You will need to send the drive to the manufacturer or to a recovery company that can remove the platters and mount them on their equipment, calibrate and read it (probably $1000 + without warranty). There are people who post how to break on the old engine and replace it with a new one, but I think it would be a mistake to try.

  • try to install OTA, bb poster it works but not the app download page

    I pushed the app to Web server, flies over the pot here

    and cod files, jar file, and when I point to the .jad with my bb browser file,

    It shows a screen that says

    It works!

    but it's not the confirmation page to download and install the application

    mime types are confirmed to be correct on the Web server (with firefox)

    what the hell could I do it wrong?

    It is hosted in a https connection, but that shouldn't make a difference

    Origin of the text "it works!"?

    Kindof looks like a test page default for the web server.

    You have your types JAD is set incorrectly, or you have the incorrect URL.

  • Message 'Download error' on the Apps page

    So I downloaded creative cloud last night and I fell immediately on issues - everything first when I downloaded the app, it was simply nothing appear in the window, but I managed to fix that, whenever I tired to download Photoshop whenever the download has reached 40%, I received a notice of default to extract the files , and now I can't even try to install Photoshop more because when I go to the apps page I am greeted by this error message

    Capture.PNG

    To say the least, it starts to become a little bit boring - I tried the fixes suggested such as deleting the files from AAMUpdater and OOBE files but still this correction does not work - I am running windows 7, if that helps at all

    Hi Louis,.

    Please see the help document: download error in the applications tab of Creative Cloud Desktop Application

    You can also view the threads below:

    Persistent Cloud error - error download - creative

    Re: Creative Cloud "Download error" message

    Please let us know if it helps.

    Kind regards

    Shelly

  • Hi, I installed the creative cloud, but when I download Lightroom CC, the browser indicates that the program is downloaded, creative cloud appears, but overall the program is just a black screen, I do not see what I am downloading or the status of downlo

    Hi, I installed the creative cloud, but when I download Lightroom CC, the browser indicates that the program is downloaded, creative cloud appears but overall the program is just a black screen, I do not see what I am downloading or the status of the download, I use a pc

    You must install Ligjhtroom cc app to app Adobe Creative Cloud.

    See the link below:

    https://helpx.Adobe.com/creative-cloud/KB/black-screen-sign-in-creative-cloud.html

  • Evertime I try to download InDesign, InDesign download now says the computer screen, but no where on my computer are the download of applications.

    I bought Lightroom a year ago and about 6 months ago, I downloaded the trial version for Illustrator and when I would use the trial, the creative cloud icon came on top of my office, but now the icon is never there and I click Download and nothing happens. Screen says it is trying to download but nothing happens.

    You havring boredom using your desktop cc app?

    If so, CC - download error - stubborn error

  • I am getting a DOWNLOAD ERROR in the apps menu

    I get a DOWNLOAD ERROR in the center of apps in creative cloud. I need help to fix it, but I was suspended for 30 minutes, trying to get answers. Also all the apps that I have purchased in the past are now gone. How to make a comeback?

    Without good information system and other technical details no one can tell you a lot. as a first step, refer to this:

    Log, activation, or connection errors. CS5.5 and later versions

    Mylenium

  • I am trying to download apps and I get the A12E5 error code

    I am trying to download apps and I get the A12E5 error code

    I solved the problem.  I had to first download the creative cloud application and then install other apps of the creative cloud app.

  • SWITCH UPWARDS A NOTICE + PRIVACY PROBLEM WHEN THE FIRST SCREEN LOCK

    Hi all

    I have an Iphone 6 and since I did the update for IOS 10, I have a few problems:

    I can't pass up a push notification when arrive on the screen with your finger, the little thing do missing since (I also have an iphone 5s and I can still do it, also with 10 IOS installed on it) is so very strange to me, I tried to change phone etc... but nothing to do.

    Then, my second problem is confidentiality on the first screen of the phone lock. When I receive an email from outlook, for example, anyone who does not know my zaihon can open, reply, delete, even for the notification of whatsapp etc...

    If anyone knows that a solution would be very nice to share.

    Thanks in advance,

    Maud

    You can disable the mail view in the screen to notify in settings/Notification Center / Mail:

    Use the Notifications on your iPhone, iPad and iPod touch - Apple Support

    You can also delete the Widget for this:

    Use Widgets on your iPhone, iPad and iPod touch - Apple Support

  • Whenever I try to download iOS 10, the settings app crashes. How should I do if I get the update?

    Whenever I try to download iOS 10, the settings app crashes. How should I do if I get the update?

    gswizzleeeee wrote:

    ... the settings application crashes.

    This is very unusual.  Two thoughts come to mind.

    1. Your storage space is too full?  Check the settings > general > storage & use iCloud > manage storage (in storage).  Make sure you have at least 10% (hopefully more than 15%) of total storage of your iPhone for free.
    2. Use iTunes (you must use the current version - 12.5.1, as this is the only version supporting iOS 10) to upgrade.  See 'Your device via iTunes update' here: update the iOS on your iPhone, iPad or iPod touch - Apple Support software
  • Impossible to download and update the app on the iPhone 6 Plus

    Topic: impossible to download and update the app on my iPhone 6 Plus

    Turn off your device and turn it on again. If this does not help, sign out of your account and reconnect.

    In addition, you can try to reset your settings.

    • Press and hold the sleep/wake button
    • Press and hold the Home button
    • Press and hold both buttons until the display turns off and on again with the Apple logo on the subject.

    Alternatively, you can go to settings - general - reset - Reset all settings

Maybe you are looking for

  • Why thunderbird displays 'details' of each message (you will need to press Hide Details).

    All the messages that I now open show details contained in the e-mail address of the sender (from, to, folder, date, subject). It is recent... I must have clicked something I shouldn't. Thanks for your help.

  • HP ProBook 6570b: Windows 10 ProBook 6570b BIOS update

    When will there be a version 10 of Windows to upgrade the BIOS (the more recent version, currently available for Windows only, 8.1 F.62 Rev.A, file name sp71172.exe) for my HP ProBook 6570 b?

  • Media Center does not work on Equium A100-147

    HelloI have a little problem with my media center. It used to work fine, but recently, I decided to wipe the hard drive. I used the boot disk to reinstall windows media center edition 2005. However, when you try to load the Media Center, I get the er

  • Try to get personal information (online predator)

    total.dear73 tried to make my real name and where I lived. I blocked him I have a screen shot to prove it, but I'm not not associable to a public Council. I don't know if Skype can do something, or to check out them. I just want to Skype a safer plac

  • Can I change my gtx 550ti graphics card? !!

    I have the GT 420 (OEM) motherboard: MS-7613 (Iona-GL8E), power supply: 460W and I want to update to GTX550 it, I can (without changing any other material)? _ MS-7613 (Iona-GL8E), i5 650 3.2 Ghz 10 Gb DDR3, GT420 (OEM), 460W