objective c - App vibrating but ring tone is not playing when makes app in sleep mode manually. iphone -


im implementing fake call app.im using nstimer checking time , working fine.the problem when press sleep button,only vibration working ring tone not playing.i tried code still ring tone not playing.

audiosessionsetactive(true); // set audio session, prevent iphone deep sleeping, while playing sounds uint32 sessioncategory = kaudiosessioncategory_mediaplayback;

   audiosessionsetproperty (                             kaudiosessionproperty_audiocategory,                             sizeof (sessioncategory),                             &sessioncategory                            );    

how can solve issue.please help.thanks in advance

i sorry think can not show calling screen while device locked (deep sleep). way fire local notification wake application manually user. : have fake call now. want receive ? when user press yes , open application , need handle show calling screen in appdelegate background methods.

i played other fake call apps , doing same. not allowed ui changes in background. way achieve goal display calling screen.

hope help.

edit:

i not sure why vibrate working. did set below property in info.plist file ? give try. not sure solve problem. give try once. see attache picture. set required background modes app plays audio.

enter image description here


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -