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


Single To 3 Phase 7.5KW 10HP 220V Variable Frequency Drive Inverter CNC VFD VSD picture

Single To 3 Phase 7.5KW 10HP 220V Variable Frequency Drive Inverter CNC VFD VSD

$169.90



VEVOR 7.5KW 10HP Variable Frequency Drive Inverter Convert 1 To 3 Phase VFD 220V picture

VEVOR 7.5KW 10HP Variable Frequency Drive Inverter Convert 1 To 3 Phase VFD 220V

$163.99



LENZE E82EV751_4B INVERTER 0.75kW 0-400/500V USED DRIVE picture

LENZE E82EV751_4B INVERTER 0.75kW 0-400/500V USED DRIVE

$288.88



195A ARC Welder 110/220V Dual Volt IGBT Inverter MMA Stick Welding Machine picture

195A ARC Welder 110/220V Dual Volt IGBT Inverter MMA Stick Welding Machine

$108.99



New In Box Powermate PA0650209 Parallel Kit for Powermate Inverter Generators picture

New In Box Powermate PA0650209 Parallel Kit for Powermate Inverter Generators

$29.99



TOOLIOM 135A 110V Stick Welder MMA ARC Welder Machine DC Inverter Welder picture

TOOLIOM 135A 110V Stick Welder MMA ARC Welder Machine DC Inverter Welder

$67.99







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