BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-20-2011, 02:37 PM   #1 (permalink)
New Member
 
Join Date: Jan 2011
Model: 9800
PIN: N/A
Carrier: O2
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
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, 03:57 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
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, 09:25 AM   #3 (permalink)
New Member
 
Join Date: Jan 2011
Model: 9800
PIN: N/A
Carrier: O2
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
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


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 04:39 AM
Listening to internet events tarapynka RIM Software 0 04-14-2009 10:52 AM
deleted lotus notes calendar events reappear after cable sync gizmoguy RIM Software 2 08-26-2008 11:42 AM
NEW xColorEvent is updated - manage your color events! xxxdev Aftermarket Software 19 08-08-2008 08: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





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