Problem with the earpiece of the phone

I use PhoneListener to implement a feature based on the calls.

I implemented the interface in my class, called CallListener, I added listener in the background with this process

Phone.addPhoneListener (cl);.

Earphone works very well as expected, I'm generating a pop up on appeal, which also works fine.

However, as soon as I reinstall the application, listener stops working. I do not receive responses until and unless I have remove application, restart the device and install the application again.

To find the root cause of this problem, I removed pop up on calls and replaced by newspapers. In this case the listener work after reinstalling the application.

I do not understand how my post run, call affect the behavior of the addition of the listeners of the call.

Every time I have add a listener, I remove from persistent storage, remove the current listener and add the listener again. (This is done to ensure that auditors are not added twice). To be able to have compatible listener objects I store and retrieve from persistent object.

How can I solve this problem? Any pointer would be appreciated.

«I am currently collecting information and pass thread to the processing of appeals that pushes to turn screen again.»

As you know, the BB is built around Applications.  You have two, an and in the foreground a background.  If you start a Thread in your treatment of background, it runs under the control of this request.  If the background of your Application stops, then this thread will disappear.

Now, suppose your foreground (GUI) Application calls a method provided by the code your application to background.  Copy the following code starts a Thread.  This thread will run under the control of applications in the foreground, not the background application.  So if the background Application stops, this thread will continue to run.  Although code that started it was provided by the Application program.

Extend this idea to the listener.  The listener is called by the phone app.  If you start a Thread, that Thread runs under the control of the phone Application.  If you do an Application.getApplication (), you will get the phone app.  Not your application.  It's dangerous.  For example, if your listener code or your thread called System.exit (), it will take the phone app.

You need spend processing in your own Application to do this kind of things.  There are a number of approaches, but the simplest is to use a global event.  You get some information and raise an event in your listener (running under the control of the phone Application), your overall event handler (in your Application) takes control and happened in the information that you give, and it actually takes control of the thread of events, so if you have a UiApplication acting as listener GlobalEvent You can do things with the screen.  And they are not too difficult to use, as shown in this article:

http://supportforums.BlackBerry.com/T5/Java-development/global-events-and-global-event-listeners/TA-...

I hope this helps.

Tags: BlackBerry Developers

Similar Questions

  • Problems with the phone and Desktop Web page layouts

    Hi all

    I was hoping that someone could help with a problem with my website sciencenewsbreak.com. I have two office and put phone in page each has its own master page. When viewing my site for example on the desktop and using the navigation menu all my pages come up with available funds, all good. However, if I have a specific page using google search "3 aug science newsbreak" or "newsbreak science 28 July... My phone set charges upward, not my office layout. This is not uniform as pages for July 31 and August 1 appear as correct desk combination. This occurs using safari or chrome. Also when looking for a July 27 google shows a result but link to said page page is not found.

    I add a new page to home/today ' hui every day and I am just by clicking the + button to the left of my last page page

    Screen Shot 2015-08-09 at 2.16.42 pm.png

    Does anyone know whats going on. heeeeeeeelp please

    See you soon

    Garry

    Google indexes the same items in various ways, caused by the fact that you have two separated from each identical item versions that are duplicates - the only difference is the presentation which is displayed according to a mechanism of screen/detection javascript by Muse (which, coincidentally, is generally considered a bad method to deal with different screens and devices).

    You must all least tell Google which version is the main (the so-called canonical version), otherwise Google indexing algorithms will decide that based on their best estimate. This is the reason why the search results are so confused.

    Read this info to learn more about the canonical meta tag: use of the canonical - URL search Console Help

    In any case, apart from this question, I also noticed your pages the support phone on my Nexus 7 Android tablet version, and it looks terrible: the desktop version should be displayed on the landscape orientation.

    Your Web site should be turned into a responsive design for one. Two, as you update your content on a daily basis, Muse and static html pages are about the worst imaginable solutions (even more so when it comes with a lot of content that must be seen on a variety of devices and screens!).

    This case calls desperately for a sensitive designed dynamic site, whose content is well ranked in a content management system. The obvious solution that comes to mind: Wordpress.

  • BlackBerry smartphones are there problems with the phone unlocked before buying?

    On Amazon they sell the Storm 2 (9520) and it is called "Vodafone unlocked.

    I am currently with Vodafone on Pay as you go. Can I just put my SIM card in this phone and have my number, contacts, etc., work very well right from the start?

    I'll be able to get the internet connection of Vodafone on this phone? They offer something alone the lines of £8 per month for 500 MB downloads. If I switch to this service, which will work?

    What applications? They works perfectly?

    And in general, the telephone service provider and will go well with all this?

    Thank you.

    Applications that works not (or wrong) If you do not have unlimited BlackBerry data plan:

    Internet Browser

    RIM's push email

    Facebook for BlackBerry

    BlackBerry Messenger

    BlackBerry Maps

    MySpace for BlackBerry

    All the rendering for the instant messaging applications to BlackBerry, like AIM or GTalk for BlackBerry

    * partial list.

  • Re: Satellite C650 - problem with the devices connected to USB ports

    Hello

    Can help someone, I have a C650 and everytime I try to connect to something to him via the USB ports, it is not "found" by the computer?

    The other night, I tried to get pictures on my phone but it wasn'; work and I put it down to a problem with the phone, but today I tried to install something digital crafts for my daughter and during installation it tells you to insert the thing into the USB port and click Next, when I do that he's going through a lot of "research" and said then it can not be found.

    The laptop makes a beep sound as it would on an extraction device when you plug... I hope that makes sense. So I am now assuming that the problem is with my computer, is there something I can do to fix this?
    Thanks in advance

    Sorry should add - it's like nothing is plugged at all when it is, and it happens on two USB ports, not just one...

    Post edited by: leahhw123

    Hello

    What happens with plug n play like USB mouse device?
    You are able to use an external USB mouse correctly?

    > but today I tried to install something digital crafts for my daughter and during installation it tells you to insert the thing into the USB port and click Next, when I do that he's going through a lot of "research" and said then it can not be found.
    I guess this could be a problem with the software or drivers installed.

    I searched a bit and his city that he has a software is compatible with windows vista/2000/xp. Win 7 is not mentioned do not know if this could be a problem, but in your case, I recommend asking the support of this software product for some advice.

    In addition, you can try to install this software once more, check whether this USB problem appears again.

  • I have problems to make my battery charged, because the cable does not have a link solid with the socket of the phone.  The problem seems compatible with a lot of cables, so I think the problem is with the phone. Can it be fixed?

    I have problems to make my battery charged, because the cable does not have a link solid with the socket of the phone.  The problem seems compatible with a lot of cables, so I think the problem is with the phone. Can it be fixed?

    Probably there is debris and dust in the decision-making of the lightning.  Serve with compressed gas canned (NEVER orally).  If this doesn't help, try electronic contact cleaner has a q - Tip.  Finally, take it to Apple.

  • Problem with the composition of the corporate directory / phone book (E.164)

    Hello

    I have a little problem with the composition of the cucm phonebook integrated telepresence system. I can search the telephone directory, and it displays the user. The format is E.164 number, but with spaces in the number of empty? And for me, it looks like telepresence system trys to deal WITH areas because if I compose without space market. So it seems it is not the phone book to a good number E.164 number.

    any ideas?

    Concerning

    Jason

    Hey Jason,

    Looks like it's still an open caveat on the current software for MX, EX, endpoints series E20 and C sq.

    http://www.Cisco.com/en/us/docs/Telepresence/endpoint/software/TC5/Release_notes/tc_software_release_notes_tc5.PDF

    CSCtz87452:

    MX, EX, E20, C and SX Series endpoints cannot use directories CUCM with numbers, including spaces.

    Thank you, Adam

  • a problem with the alignment of site on the Tablet and phone version.

    I have a problem with the alignment of my site on the Tablet and phone Version of my site.

    If you open the Tariffuehrer.com site on the tablet or smartphone, you can see, the page is aligned to the left in the browser. I want the page to Center. I did find an option for it in the backend of muse.

    I'd be happy if someone can help me.

    Hi Michael,

    I can't view your site as it showed error 403,

    Can you please recheck the url of your site and repost it so that I can check on this subject.

    Kind regards

    _Ankush

  • Problem with the Desktop version, Tablet and phone. Help, please.

    I created a website in Muse. I created the Desktop version, Tablet and phone. But my problem is that, once I open my website on my tablet or phone it shows not always the correct form. Most of the time it's to show the offline version even if I am looking on my phone. What can I do?

    Hello

    I watched address phone and noticed 2 flaws.

    1 URL internationalchangepartners.com no redirects to internationalchangepartners.com/phone when I tried on the phone.

    Please do the following to solve this problem

    Hello, I made a site using the 3 platforms: desktop, Tablet and smartphone, but... on tablets and smartphones appears the design office, no idea why?

    2. now when I check link internationalchangepartners.com/phone I saw that the Menu options are linked with pages of the tablet.

    To over come this I suggest you to select hyperlinks with a lot of attention. Once you select the Menu item and add the hyperlink, select the option under the phone if you are available for the phone.

    Hyperlink has a separate list of the link for each structure. Look at the screenshot below.

    Once there 2 flaws were fixed there is no problem with the site.

    Concerning

    Vivek

  • Anyone having problems with the new iPhone LTE connection 7 on Verizon?

    I am now on my iPhone second 7 with Verizon. I had four phones for me and my family. I have now had issues where I have no signal in the same areas where my signal allows to be strong. I can't solve the problem with the activation/deactivation of the airplane and then mode again in normal mode. My phone will rest with no signal for 5 minutes, then going to LTE with three bars. I also had the problem where I had only 1 x signal, while my son standing right next to me has LTE. And he had the same questions, where I'm on LTE and it gets no signal. I use to have LTE where I live and work all the time, now it's spotty at best. Apple has replaced me and my sons iPhones but not luck. Still do. Any ideas or an any other suffering?

    (1) go to settings/cell phone/cellular data Options/enable LTE and select ONLY the DATA. This seems to solve the problem (as a temporary solution) for most of the people affected by this problem. The bad part is your request might not be as clear (since they cannot use the highest LTE signals) and you can make calls and data at the same time. But it does not solve the issue.

    (2) there are rumors (but you didn't hear that from me that we only are not supposed to discuss beta software program Apple in this forum) that the new version of Apple Beta for iOS (which also includes an update of the software carrier Verizon to 26.0) seems to solve this problem. So, there's a light at the end of the tunnel.

  • iOS 10 problems with the Mail application

    Dear Apple and community support,

    Here's my problem:

    I have upgraded to iOS 10 on my iPhone 5s this afternoon (September 13), and now I'm not able to open e-mail - Yahoo!, and Gmail. I can receive emails, I'm not able to view the body of these emails. When I press on them, all I see is a blank white page. I can't answer emails either. I can only their flag or remove them. However, I am able to compose new e-mail messages.

    Here are the steps that I've taken to try to solve my problem:

    1. Restarted my phone
    2. Remove and re-add my Mail accounts
    3. Made a backup and a restore full while that plugged into my laptop with the latest version of iTunes.

    I should be grateful if you would help or more information on this issue.

    Thank you

    Emily

    I also have problems with the Mail application.  On my iphone, ipad, and Mac Pro.  I have several addresses, a MSN, another on Go Daddy and Gmail.  I have various weird problems with threads and every day he re-charge my emails, like if I have never read before.  Something is really problematic with Mail.

    Can the people of APPLE, you help me?

  • Problem with the installation of iOS 10

    I tried to install iOS 10 earlier but it did not work, so now that I'm trying to reinstall iOS 9 if my phone will work again, if this does not work I have to reset my phone (but I am a fool and did not a back-up because I never had a problem with the software updates in the past if all data will be lost).

    < published by host >

    The same problem with me too. After installing ios 10 nuer OTA my iphone brick! I'm trying to re - install ios 9 i-Tunes, but 2 hours now always stop installation... what happent?

  • Problems with the battery drain on iPhone 6

    Hello! This is my first time posting but I had some problems lately with my iPhone while keeping a charge.

    So, this has started to happen a month ago (exactly one year after I bought my iPhone) and my battery drains just exponentially and evacuates it sometimes when I'm not using it and the internet is not on. For example I'll fully my phone until I fall asleep and I'll put it on airplane mode before going to sleep. By the time I wake up, the battery will be down to 60%. I do not use it during this time, I don't get notifications because all data and the internet is disabled. I do not understand why it is empty.

    Anyway, I've taken to the Apple store Genius bar twice now and they have not been able to fix it. They have tried to restore it... I did that before I went to the Apple store, but they decided to do it again and the second time the guy just told me to turn off all the background app refresh or anything I did but it we continue to attract.

    When I was at the Apple store, they also checked my battery and everything was normal. I got 100 below the number of average cycles since the age of my phone and the battery was in the green at 94%.

    I am really frustrated after two trips to the store person has managed to fix my phone and I have the impression that they will try to coax me to pay for something that won't fix my phone. Also if there is a problem with Apple hardware and nothing of what I've done so why should I pay for it when it started to happen at the level of the one-year mark. It's so boring, but if anyone else has had a similar situation for advice or assistance would be greatly appreciated.

    a4annalisa wrote:

    When I was at the Apple store, they also checked my battery and everything was normal. I got 100 below the number of average cycles since the age of my phone and the battery was in the green at 94%.

    I am really frustrated after two trips to the store person has managed to fix my phone and I have the impression that they will try to coax me to pay for something that won't fix my phone. Also if there is a problem with Apple hardware and nothing of what I've done so why should I pay for it when it started to happen at the level of the one-year mark.

    Yes that is exactly what they are trying to avoid. As you explained that you have visited it there twice to attempt to solve this problem, they could have offered to replace your battery for $79 that with your current battery showing 94% of its original capacity, that would not have done much for you at all.

    Have you been having problems with the reception of your carrier recently, when all this started happening? Were you see 1 or 2 points of service when you used to see 3 or 4? When you have restored your iPhone, you restore it as a new iPhone or restore a backup top later? Just try to refine some possibilities for the continuous emission.

  • NO - problem with the service

    I am from INDIA.

    I bought an iPhone 6 s new mobile Hong Kong a licensed salesperson (mobile fortress).

    When I bring to the India and put on my country sim (vodafone) to my laptop, everything works, but the network does not connect.

    "In settings > about I see vodafone, but when I see the carrier" is not connected, I tried many solutions online.

    I tried:

    1. all parameters (network... so on) and the software is up to date.

    2 tried selecting the network, but to the carrier, it does not show the available network.

    3. I tried the complete reset of the phone 2-3 times.

    4. I tried to change the apple ID.

    I tried many things, my phone works, but could not solve the network. Cannot make calls or find networks in my I phone.

    Someone can help me. When I went to ask local sales assistance, that's the problem with the change in the country, and they said that it will be free of charge on 18000INR.

    Please someone help me.

    Thanks in advance.

    Hi a.a,.

    Welcome to the communities of Apple Support! I'm sorry to hear that you experience these symptoms with your new iPhone 6 s. I'm a bit ambiguous on your specific configuration or what you see, but you can check that the phone is not locked on the original support (if the phone was sold to any kind of discounts or subsidized rate, it is most likely locked carrier). You can find the information described in the following article useful:

    How to unlock your iPhone for use with another carrier - Apple Support

    You may also be aware that different iPhone models are sold in different regions and countries and can support only specific carriers in these regions, as shown here:

    iPhone - country view with LTE - Apple networks support

    Concerning

  • I encountered the problem with the last iOS 9.3.2 update I can't receive call from people, I can call any body, but when l'm calling people any body can ring me just now, I thing the problem where new soft

    I encountered the problem with the last iOS 9.3.2 update I can't receive call from people, but I can call any body, but when l called people any body can ring me only at this time, I think that the problem of the new update. can u check this and answer my question.

    and my phone

    iPhone 6plus

    You see a Crescent Moon at the top of the screen icon? If Yes, disable does not bother to: settings - do not disturb = Off.

  • Problem with the software Modem on Satellite Pro L40

    I tried to set up a connection Dial-Up Networking on a Satellite Pro L40 running Vista and can't get the modem to talk to the modem from the ISP. The connection appears OK and then you can hear the modem dial, but when the ISP picks up there is a bit of yelling and then my modem abandons the connection and I get the standard vista connection failed box.

    Things I've tried:
    -latest drivers for the 2.1.77.0 modem (and the rest of the system) downloaded from Toshiba and installed OK
    -all the updates of windows installed
    -removal of the modem in the Manager of peripherals and re - install
    -suppression of the agrsmdel.exe and then re-install
    -try different cables to plug into the phone jack
    -several different ISPS and phone numbers
    -reduce the maximum speed of the connection
    -connection to the same ISP with my Satellite L10; works very well never have time!
    -using the windows to diagnose and repair the tool (set last resort!); says that the modem works fine and can not find a problem with the connection

    Is it possible that the update of the BIOS on the laptop would make a difference (currently v 1.60)? I did some research on Google and found messages on various forums, which suggests that the connection between the motherboard and the modem chip is a little doubtful for all the Agere Soft Modem; If the case is it something I can fix myself or I should go for warranty repair?

    Midders

    Hello

    I'm sure that there is no problem with your modem, but with the configuration or even s ISP modem. I recommend you to speak with the support of the ISP.

  • Qosmio G10 - a problem with the cooling system

    Hello

    Put on my G10-100 this morning and got the following message:

    "A problem with the cooling system has been detected. "Please turn off immediately and the return of serve.

    My other machine running and connected on toshibas website and found the number of support.

    After which left a message there, the automaton response was "we aim to get back to you within the hour," Needless to say, it's now 6 hours later.

    I can't find whether on the web or in these forums, has anyone encountered this before?

    I'm still in my 1 year warranty, but he soon run out.

    Thank you
    James

    Hello

    This looks like a problem of overheating on your device.
    In this case, you must contact the ASP.
    I don't know if it's a phone number just to post you but please visit this m link:

    http://EU.computers.Toshiba-Europe.com/cgi-bin/ToshibaCSG/generic_content.jsp?service=EU&ID=ASP_SUPPORT

    You will find a Toshiba service partner who is responsible for your country.
    It should help you to solve this problem

    Good bye

Maybe you are looking for