I need to determine when an incoming phone call will arrive. I know that applicationWillTerminate will be called if the user accepts the call and applicationWillResignActive when a pop-up window appears with a confirmation message for the call:-applicationWillTerminate is also called when the application leaves the user’s request or the battery is about to die-applicationWillResignActive is also called when UIViewAlert is displayed .
thanks
In short - no, you cannot determine if there is an incoming call or other type of interruption in your application.
; ,
.
http://www.tomwhitson.co.uk/blog/2009/04/handling-interuptions-to-your-app/
(void)applicationWillResignActive:(UIApplication *)application{ //our app is going to loose focus since thier is an incoming call [self pauseGame]; } (void)applicationDidBecomeActive:(UIApplication *)application{ //the user declined the call and is returning to our app [self resumeGame]; } (void)applicationWillTerminate:(UIApplication*)application{ //the user answered the call (or quit the app) so save the //game as we are shutting down [self saveGameState]; }
, , - , , , , ( , ).
, , iphone.
Here is a link to Apple's documentation for: Handling audio interruptions
Source: https://habr.com/ru/post/1722992/More articles:Problem converting a Delphi form to Lazarus - resourcesScan documents for macro and replace macro text? - c #Download 3D Object in Silverlight 3/4 - silverlight"plist" does not boot from iPhone test class - iphoneИспользование PHP для поиска части URL-адреса - urlI get such CSV data by making an Http request in a CSV file. Very wrong string - pythonHow to find a file in Windows Explorer - filehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1722995/what-does-brendan-eich-mean-when-he-speaks-about-adding-sugar-and-macros-to-javascript&usg=ALkJrhgyzBpkYZRp47TZrK69nKPRkqDLfQIntegrating Google Street View into a marker - google-mapssystem () does not work in php using Windows Server 2003 - phpAll Articles