BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-20-2011, 01:37 PM   #1
logicalusman
New Member
 
Join Date: Jan 2011
Model: 9800
PIN: N/A
Carrier: O2
Posts: 2
Default listening for call events on OS7

Please Login to Remove!

I am running my app on OS7 which listens for phone call events. I have implemented the PhoneListener and also used Phone.addPhoneListener(this)
to get registered for the call events. Getting no calls into the methods at all. I have tested writing the print statements in each method. Anyone knows if there is something additional to do on OS7 or Am I missing something here.
Offline  
Old 10-20-2011, 02:57 PM   #2
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default Re: listening for call events on OS7

You'll probably need to post some code.

Some common issues:

- you failed to add the phone listener because of permissions, but you didn't catch the exception

- you added the listener and then your application exited, so there will be no events

I assume this is on the simulator?
Offline  
Old 10-24-2011, 08:25 AM   #3
logicalusman
New Member
 
Join Date: Jan 2011
Model: 9800
PIN: N/A
Carrier: O2
Posts: 2
Default Re: listening for call events on OS7

Thanks for the reply.
To what I realise is the app exited. I was extending my app from Application and was under the impression that the app would stay running behind... but a vain attempt. If I extend from UiApplication, I can see that it receives the callback.
I went through the RIM online tutorial etc to let my app always running in the bg. RIM suggests to override the onClose of the Screen class to avoid the system exiting the app if the app UI is closed. It also suggests on alternate entry points etc but What if the app is not a UI based?
What I have been trying to achieve here is to write an app that accepts the phone call.
Below is my snippet of code.

public class CAllReceiveApp extends Application implements PhoneListener {

public CAllReceiveApp() {
try {
Phone.addPhoneListener(this);
} catch (Exception e) {
Log.e(TAG, e.getMessage());
}


}
public static void main(String[] args) {
CAllReceiveApp app = new CAllReceiveApp();
app.enterEventDispatcher();
}

public void callIncoming(int callId) {
Log.d(TAG, "someone calling");
//System.out.println("Someone calling ...");
// Dialog.alert("someone calling");
}

// ... other overriden methids

}
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads for: listening for call events on OS7
Thread Thread Starter Forum Replies Last Post
Knowledge Sharing - Pending internal events + reconciliation events count increasing noname BES Admin Corner 0 05-21-2011 03:39 AM
Listening to internet events tarapynka RIM Software 0 04-14-2009 09:52 AM
deleted lotus notes calendar events reappear after cable sync gizmoguy RIM Software 2 08-26-2008 10:42 AM
NEW xColorEvent is updated - manage your color events! xxxdev Aftermarket Software 19 08-08-2008 07:47 AM
Calendar syncing (using Desktop Manager) is deleting my calendar events. Please help! SharonEve General BlackBerry Discussion 3 01-16-2008 10:00 AM


MSA ALTAIR 4XR picture

MSA ALTAIR 4XR

$700.00



MSA altair 4X multi gas meter Monitor detector, O2,H2S,CO,LEL Charger calibrated picture

MSA altair 4X multi gas meter Monitor detector, O2,H2S,CO,LEL Charger calibrated

$340.00



MSA Altair 5 Gas Detector  picture

MSA Altair 5 Gas Detector

$98.99



MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty* picture

MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty*

$795.00



MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2) picture

MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2)

$295.00



Msa Altair 4XR picture

Msa Altair 4XR

$372.60







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.