Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
New Developer
Posts: 29
Registered: ‎08-03-2014
My Device: Q10
My Carrier: Vodafone
Accepted Solution

Phone 10.3 callUpdated signal issue

Hello,

 

I have an issue which is difficult for me to understand and even more difficult to explain so please bear with me!

 

I am hoping to make a callblocker app for my mobile and I am connecting to Phones callUpdated signal and successfully receive updates in my onCallUpdate slot when an incoming call happens.

 

 

My problem is that my onCallUpdate slot is being fired multiple times for one incoming call, the first couple of times call.phonenumber() is blank, I thought this was fine  as I could just wait for phonenumber().length() to be greater than 0 before doing something like endcall().

 

The problem with waiting for the length of the phonenumber to be > 0 and only doing something when the phone number is > 0 is that I also want to detect private numbers but phoneNumber().length() is 0 for private numbers always.

 

Is there another way for me to only do something in my onCallUpdated slot when the phonenumber() becomes available other than checking length of phonenumber()  so then I can tell if its a private number ? 

 

Hope somebody can point me in the right direction with this.

 

Thank you.

 

 

Developer
Posts: 246
Registered: ‎09-30-2010
My Device: Z10, Onyx2
My Carrier: IND XL

Re: Phone 10.3 callUpdated signal issue

looks like many people creating the same application Smiley Very Happy

for incoming call fire multiple of times because it was updating the status of the call.

the update was
callState - phoneNumber
0 UNKNOWN - no number
0 UNKNOWN - no number
1 INCOMING - no number
1 INCOMING - number
1 INCOMING - number

you can parse it from there
New Developer
Posts: 29
Registered: ‎08-03-2014
My Device: Q10
My Carrier: Vodafone

Re: Phone 10.3 callUpdated signal issue

Looks like you might be right Smiley Happy

 

Thank you for your suggestion, so I just have to check if callid has already reported incoming call state with a blank number and if it has and still is a blank number it's a private number!

 

Thank you again.

New Developer
Posts: 44
Registered: ‎06-12-2013
My Device: Dev Alpha C
My Carrier: GSM

Re: Phone 10.3 callUpdated signal issue

thank you for sharing