Answer the question
In order to leave comments, you need to log in
Modifying the program Telephone (Objective-c)?
There is such an application: github.com/eofster/Telephone
It is necessary to show a message like “Calling: -phone number-” on an
incoming call Here is the code that is supposedly executed on an incoming call.
In place of the comment, you need code that shows this message.
How to do it?
The Objective-C language has never dealt with it and the head is already swelling.
pjsua_call_info callInfo;
pj_status_t status = pjsua_call_get_info(anIdentifier, &callInfo);
if (status == PJ_SUCCESS) {
[self setState:callInfo.state];
[self setStateText:[NSString stringWithPJString:callInfo.state_text]];
[self setLastStatus:callInfo.last_status];
[self setLastStatusText:
[NSString stringWithPJString:callInfo.last_status_text]];
[self setRemoteURI:[AKSIPURI SIPURIWithString:
[NSString stringWithPJString:callInfo.remote_info]]];
[self setLocalURI:[AKSIPURI SIPURIWithString:
[NSString stringWithPJString:callInfo.local_info]]];
NSString *string1 = @"Звонит: ";
//Здесь нужно показать сообщение вида "звонит: номер"
if (callInfo.state == kAKSIPCallIncomingState) {
[self setIncoming:YES];
} else {
[self setIncoming:NO];
}
Answer the question
In order to leave comments, you need to log in
UIAlertView *alert = [[UIAlertView alloc] init];
[alert setTitle: @"Error"];
[alert setMessage: @"Network is unavailable"];
[alert setDelegate: nil];
[alert addButtonWithTitle:@"OK"];
[alert show];
[alert release];
If you want a message box, then
UIAlertView *av = [[[UIAlertView alloc] initWithTitle:@"Заголовок сообщения"
message:@"Текст сообщения с номером, в данном случае переменная string1"
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles: nil] autorelease];
[av show];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question