0917-found VoIP will be rejected

Source: Internet
Author: User

Very disappointed, the music tried, Viop tried, but reportedly will be rejected.

-(void) Applicationdidenterbackground: (uiapplication *) Application {

NSLog (@ "Go backstage");

[Application Beginbackgroundtaskwithexpirationhandler:nil];

BOOL backgroundaccepted = [[uiapplication sharedapplication] setkeepalivetimeout:600 handler:^{[self Backgroundhandler]; }];

if (backgroundaccepted)

{

NSLog (@ "backgrounding accepted");

}

[Self backgroundhandler];

}

static int counter = 0;

-(void) Backgroundhandler {

NSLog (@ "# #-->backgroundinghandler");

UIApplication *app = [UIApplication sharedapplication];

__block uibackgroundtaskidentifier bgtask = [App beginbackgroundtaskwithexpirationhandler:^{

[App Endbackgroundtask:bgtask];

Bgtask = Uibackgroundtaskinvalid;

}];

Start the long-running task

Dispatch_async (Dispatch_get_global_queue (dispatch_queue_priority_default, 0), ^{

while (1) {

NSLog (@ "Counter:%ld", counter++);

Sleep (1);

}

});

0917-found VoIP will be rejected

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.