Jump to content
erva

Getting outgoing / incoming calls phone number

Recommended Posts

Tested from Delphi Cookbook book phone dialing app. Works fine but instead of showing phone number at CallStateChanged, app shows some code like "9F62223E-Ao036-466E-A3EF-407105719798".

 

In books picture of running app phone number shows ok. This is code to show CallStateChanged:

 

procedure TMainForm.CallStateChanged(const ACallID: string;
  const AState: TCallState);
begin
  lblCall.Items.Add(Format('%-16s %s', [ACallID, CallStateAsString(AState)]));
end;

 

I'am using iPhone, in book is pic of Android phone.

 

Edit: Tested with Android. Seems like in Android no CallStateChange is detected at all. 

Edited by erva

Share this post


Link to post

Seems to be that Apple has prevent showing phone number.

 

In Android you need to request permission at run time to get phone state. Managed to do that, but CallStateChange still not executing. Tested on two Android phones.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×