Multiple instances of Application when you use the background thread

Hi all

I recently added a background thread in an application that is launched from an other point of entry. This background thread will constantly (every X seconds) carry out checks of RMS and compares the timestamps. When recalcitrant, he sends a notification to the user who launches the application when clicked. The problem is...

When the user clicks on the notification, it will open the application normally (with the icon and everything), but it also opens a second instance that does not have an icon. I have concluded that the code that actually launches the request isn't the culprit (because if I take out, it nevertheless opens the second instance). This makes me think that it has something to do with the ApplicationDescriptor.

My notification Manager has this line:

ApplicationDescriptor appDescriptor = new ApplicationDescriptor (ApplicationDescriptor.currentApplicationDescriptor (), application name, new String [] {});

If I change this to only return the currentApplicationDescriptor() or add the arguments in the array of strings, notifications do not work.

Can anyone think of a reason why this is happening?

I solved the problem I had.

In the end, I ended up changing this code:

final ApplicationDescriptor mainDescription = ApplicationDescriptor.currentApplicationDescriptor ();
final ApplicationDescriptor appDescriptor = new ApplicationDescriptor (mainDescription, application_name, new String [] {});

TO:

moduleHandle int = CodeModuleManager.getModuleHandle (APPLICATION_NAME);
ApplicationDescriptor mainDescriptor;

If (moduleHandle! = 0)
{
ApplicationDescriptor apDes [] = CodeModuleManager.getApplicationDescriptors (moduleHandle);
apDes = mainDescriptor [0];

ApplicationMessageFolderRegistry folderReg = ApplicationMessageFolderRegistry.getInstance ();

If (folderReg.getApplicationFolder (NotificationManager.INBOX_FOLDER_ID) == null) {}
notificationManager.init (folderReg, mainDescriptor);
}
}

Instead of using the currentApplicationDescriptor(), I was referencing the module of the application itself using the CoreModuleManager. My init method takes in the ApplicationDescriptor and use it for everything.

Thanks to all who have any time to read my post!

Tags: BlackBerry Developers

Similar Questions

  • Dreamweaver CS5.5 mac crashes when you use the background color palette

    Dreamweaver CS5.5 mac crashes when you use the background color palette

    Mac OS 10.11.3 El Capitan

    Hi bibledoc

    You can try to reset the Dreamweaver preferences.

    Following the file and the folder are removed from your system:

    / Users / your User Name/Library/Application Support/Adobe/Dreamweaver

    Rename the folder of Dreamweaver preferences, for example, Dreamweaver CS5.5 Old_Dreamweaver CS5.5 folder.

    / Users / your user name/Library/Preferences

    Rename the folder of Dreamweaver preferences, for example, Dreamweaver CS5.5 Old_Dreamweaver CS5.5 folder.

    Restore preferences in Dreamweaver CS4 and CS5, CS5.5

    Access the hidden library files Mac OS

    When Dreamweaver starts, it creates a new preferences file and the folder.

    If it helps doesnot, maybe you can try to create a new admin user account and check. If this is useful, you can try to uninstall and reinstall in the new user account.

    OS X Yosemite: set up users on your Mac.

    Kind regards

    Nikhil Gupta

  • Is cell required when you use the map applications of conduct?

    Is cell required when you use the map applications of conduct?

    Yes. GPS does not work with a Wi - Fi connection.

  • Loop Finder crash after upgrading to El Capitan.  'Finder close unexpectedly when you use the plug-in finder' - the message really is in Norwegian, so it may be different for the English operating system.

    'Finder close unexpectedly when you use the plug-in finder' - the message really is in Norwegian, so it may be different for the English.  The e is a compatibility issue with dropbox or Google drive in El Capitan?  Those are the plug-ins only that I could find.  Thank you very much.

    Please launch the Console application in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    Step 1

    For this step, the title of the Console window should be all Messages. If it isn't, select

    SYSTEM LOG QUERIES ▹ all Messages

    in the list of logs on the left. If you don't see this list, select

    List of newspapers seen ▹ display

    in the menu at the top of the screen bar.

    In the upper right corner of the Console window, there is a search box to filter. Enter the name of the application crashed or process. For example, if Safari has crashed, you would enter "Safari" (without the quotes).

    Each message in the journal begins with the date and time when it was entered. Select the messages since the time of the last fall, as appropriate. Copy to the Clipboard by pressing Control-C key combination. Paste into a reply to this message by pressing command + V.

    The journal contains a large amount of information, almost everything that is not relevant to solve a particular problem. When you post a journal excerpt, be selective. A few dozen lines are almost always more than enough.

    Please don't dump blindly thousands of lines in the journal in this discussion.

    Please do not post screenshots of log messages - text poster.

    Some private information, such as your name, may appear in the log. Anonymize before posting.

    Step 2

    In the Console window, clear the search box, and then select

    DIAGNOSIS AND diagnostic USE information reports ▹ user

    (not diagnose them and use Messages) in the list of logs on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points downwards. You will see a list of reports of incidents. The name of each report begins with the name of the process and ends with ".crash". Select the most recent report on the process in question. The content of the report is displayed at right. Allows you to copy and paste to validate all of the content, text, not a screenshot.

    I know that the report is long, perhaps several hundred lines. Please report all this anyway. If the report is only a few lines, make sure that you have disabled the search box.

    If you don't see any report, but you know, he had an accident, you have chosen diagnostic and using the list of Log Messages. INFORMATION on the USE of DIAGNOSTIC AND choose instead.

    In the interest of privacy, I suggest that, before posting, you change the UUID ' anonymous, ' a long string of letters, numbers and dashes in the header of the report, if it is present (it cannot be). "

    Please do not post other types of diagnostic report - they are very long and rarely useful.

    When you post the journal excerpt or the accident report, you might see an error message on the web page: "you have included content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the forum software. Thanks for posting the text on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

  • When you use the media player, it is possible to take a song that's already torn in our library and announced another song or part of the same song at the end? kinda like a mix.

    When you use the media player, it is possible to take a song that's already torn in our library and announced another song or part of the same song at the end? kinda like a mix.

    Windows Media Player is not a Publisher.

    You can use Windows Movie Maker to split
    and combine audio files, but it works better
    If they are in the. WMA format.

    Also the free Audacity software may be worth a try:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Audacity

    http://Audacity.sourceforge.NET/

    How to split a long recording into multiple files or CD tracks?
    http://Audacity.sourceforge.NET/Help/FAQ?s=files&i=split

    How to combine two files into one longer file?
    http://Audacity.sourceforge.NET/Help/FAQ?s=editing&i=join

    How to mix songs with Audacity
    http://www.ehow.com/how_5061510_mix-songs-audacity.html

  • When you use the Windows XP Mode integration, it fails; maintains a new attempt and finally I have to cancel

    When you use the Windows XP Mode integration, it fails; continues to try again and finally I cancel it. The same newspaper for Virtual PC on the host computer has the following error message: Windows XP Mode integration error 'failed to connect in place inside the "Windows XP Mode" VM on channel 0 on the... named pipe endpoint XP, TCP port 3389 with the 0x8007274c error mode. This error occurs every time, but I don't know why he is successful a few times and sometimes fails. This question was in another post and mentioned the removal and resettlement components of integration, which I've tried, but it did not help. I also checked that I have the latest version of the integration components (v. 14.1.7600.16403). I have a separate instance of Virtual PC that I brought over my old XP machine and it was never a problem with integration. The problem with the image in XP Mode occurs also, regardless of whether or not the other Virtual PC image runs. Only the image of the XP Mode has this problem. I suspect it's perhaps a conflict of TCP port in the named pipe, but if so, I don't know how to solve. Thanks in advance to anyone who might be able to offer advice.

    Thanks for the reply. I tried to reinstall the integration features in the past, but the problem has come back at a later date. A few days after I posted this request for assistance, I needed to log out of Windows 7, so I hibernated the XP Mode image. Then, I opened a session in Windows 7 and thought I'd give it a try once again, and it worked this time! I did nothing special. So hopefully that will happen in the future, just as it went and on the past few months. Enjoyed your attempt to offer advice, however!

  • CC 2015 Illustrator crashes when you use the function "save for Web".

    CC 2015 Illustrator crashes when you use the function "save for Web".

    Hello

    We have published a 19.0.1 hotfix that resolves this problem in discussion on this topic. Please apply the patch to your creative cloud application. The creative cloud application checks the update once a day, so you may see the update immediately.  If you want to force the check for an update at the beginning please logout and log back into the creative Cloud application.

    Link to 19.0.1 release notes: https://helpx.adobe.com/illustrator/kb/illustrator-cc-2015-crash-bug-fixes-19-0-1.html

    Kind regards

    Ashutosh

    The name of the Illustrator team engineering

  • I can't get a list of bullited when you use the synchronized text feature.

    I can't get a list of bullited when you use the synchronized text feature. The option is grayed out and no assets. Any tips? I'm doing something wrong?

    It is by default, the synchronized text does not change any style and other visual attributes associated with the instance.

    Thank you

    Sanjit

  • When you use the "Fill & sign PDF" feature, is there a way to stretch to resize the text box, to an area of the page... rather than through a long straight line...?

    When you use the "Fill & sign PDF" feature, is there a way to stretch to resize the text box on a specific area of the page... instead of the text box is in a long straight line...? I do not see there is an option or the ability to do so, just want to confirm.

    Improving the management of multiple line text fields is in our plans, but for now, you need to add manual carriage return (Enter).

    Thank you

    Josh

  • No idea why, when you use the Source of the Image changes it overwrites the content?

    No idea why, when you use the Source of the Image changes it overwrites the content?

    Its a really great tool and I want to use it as I have a complicated trajectory I want multiple items to follow, but to have many different PNGs. but when I change them it overwrites the content?

    Thanks in advance

    Scott

    Hi, Scott.

    It is likely that you touch the question where the dimensions of the old image are used when change you to a new image.  It is a known issue for the latest version of edge animate CC and we try to fix it in a future release.  Unfortunately, the only thing you can do is to change the dimensions of the image after you exchange.  You can also copy and paste the path of an element to another, if it would help.

    Hope that helps,

    -Elaine

  • Referential integrity when you use the account of APEX

    Hello
    I use authentication userid APEX in the app I am building. I would like to use the username in the table as a foreign key. However, given that the user ID is managed by APEX and not in a table that I created, I'm confused that how can I configure a FK on user name when you use the authentication of the APEX.
    I have to configure my own user table if I want to create FKs on the user name?

    Thanks for your help!
    -Reid

    Hey Reid,

    Yes, create your own table to the user. Make a function that takes the user name and password and returns a Boolean value. According to your criteria it should return TRUE for authenticated users and FALSE otherwise.

    Use custom authentication. Make a copy of the plan of Application Express users. Change the function of authentication - built in - to your own function. Read this prudent property by clicking on the label.

    The table user may be related to table all you want with a foreign key.

    Kind regards
    Learco

  • Firefox does not open after the update. Cannot open the profile technical, even when you use the directory in cmd line path

    I'm using Firefox on a Windows 7 computer. Firefox does not open after the last update. I read the help articles and it seems that I need to create a new profile because my settings were probably corrupted. I'm unable to open the profile technical, even when you use the directory in cmd line path. I tried the following commands in the command line:

    Firefox Pei
    "C:\Program Files (x 86) \Mozilla" PEI

    Nothing happens with every order.

    I am also running Norton Internet Security. I read a help of virtual navigation features Re article that can cause a problem. The article says to check the setting of virtualization in the internet security software and to clear the virtual cache. I went through all the menus of settings in Norton Internet Security version 21.6.0.32 and I don't see anything that looked like in "virtualization" settings, so I guess that does not apply to me. "

    If you have any ideas, I had appreaciate that your expertise!

    Hello arcandl, at the launch of the firefox is not after you double-click the shortcut, it is sometimes also a sign of active malware on a system.
    you might want to try running a scan with some various other security like the free version of malwarebytes and adwcleaner tools that are specialized to remove the adware and browser hijackers.

    Fix Firefox problems caused by malicious software

  • How to enter the character ü when you use the pinyin keyboard?

    How can I enter the character u when you use the pinyin-simplified keyboard, for example, for the opening of the syllable nu with your 3.

    The keyboard pinyin-simplified is for entering the characters han, not latin.  If you want to type the latin pinyin, you must use the extended ABC keyboard configuration.  A list of the shortcuts is to

    http://symbolcodes.TLT.PSU.edu/accents/codemacext.html

  • WHEN YOU USE THE CONSTRUCTOR OF MY SITE, I CAN'T COPY AND PASTE WROTE THE BROWSER SECURITY SETTINGS HOW TO NOT CHANGE THESE FOR ME TO COPY / PASTE?

    WHEN YOU USE THE CONSTRUCTOR OF MY SITE, I CAN'T COPY AND PASTE WROTE THE BROWSER SECURITY SETTINGS HOW TO NOT CHANGE THESE FOR ME TO COPY / PASTE?

    https://support.Mozilla.com/en-us/KB/granting+JavaScript+access+to+the+Clipboard

    This extension will help you implement the security policies for access to the Clipboard.

    Allow the extended Clipboard support:

    https://addons.Mozilla.org/en-us/Firefox/addon/852

  • MainStage "lag" when you use the SPACEBAR as 'play '.

    Hi all, I'm relatively new to Mainstage (V3), and I'm hoping to use it for the first time this weekend to play the extra backing with a band tracks

    The issue I'm having, is that with the SPACEBAR of laptops on 'PLAY '. It is often "lag". or simply does not start the song. I have to wait a second, then hit again, it will work.  It is almost as if in Performance mode, when you use the down arrow key to select the next song, the 'focus' is on the list of patch, and if I click in the background where are playback buttons and stop, THEN that will work. I have not, however, been able to reproduce this particular behavior on a consistent basis.

    Everyone knows the same thing? Or why it is so 'all or nothing '?

    And a question important much donor... I gave all my reading titles to the waveform appropriate the other night (so I could visually see the waveforms above the attenuator as offers of backing track model), however, once I was moving songs in a different order, which stopped working. No idea why?

    Thnaks in advance

    About the offset by hitting the space bar, a thought occurred to me.

    How Mainstage allocates 44.1/16 bit wave files used in the reading plug-in? Which means, when a song is selected, which uses, for example, to separate the 5 cases of reading, one can assume that these audio files used in that song would need to "load" first.

    Anyone know if this is how Mainstage works?

Maybe you are looking for

  • Equium A60-692 - no power and removing the HARD drive

    The power has gone on my A60-692, the adapter is ok but there is just no no LED on the laptop. I had to get replaced a few years ago so maybe it is related to that of the power connector. I took to a local repair place, he said, it would cost more to

  • Firefox don't ask to save tabs on exit and display them when restarting.

    Close a FF4 session with several tabs, don't ask me to save the tabs and so they do not show again on restart. In Tools-Options-Privacy, I uncheckedRemember my browsing historyClear history of Firefox closing The other options are checked there. I ch

  • M50 DVD required satellite driver

    HelloI have this laptop old M50 PSM50A - 06 s 001 that meets my needs (IE mainly internet surfing), but the dvd pilot disappeared or became corrupt.I tried you are looking for the driver update on the site but nothing is all for this model or serial

  • Qosmio G20: Merge partitions

    Hello, I have a Qosmio G20 with two hard drives of 60 GB. The first hard disk has two partitions equal, C: and E:. I would like to delete E: and only have C:.I tried with Partition Magic and E: the deletion is no problem, but I can't extend C: Someon

  • Re: Problem with my x 300-130-with half the performance after I installed win7

    Hello, today I bought a X 300-130, it was a very powerful in games until I changed my Windows 7, I had 9000pct in 3dmark06, now I have half of this partition. I changed a lot of nvidia drivers, I installed pm45 chipset, my score of WEI in windows is