Commit 427a46c8 authored by jehan's avatar jehan

cancel local notif in case of canceled incomming call

parent da84bc3c
...@@ -85,6 +85,7 @@ bool networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach ...@@ -85,6 +85,7 @@ bool networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
@property (nonatomic, retain) IBOutlet UITabBarController* myTabBarController; @property (nonatomic, retain) IBOutlet UITabBarController* myTabBarController;
@property (nonatomic, retain) ABPeoplePickerNavigationController* myPeoplePickerController; @property (nonatomic, retain) ABPeoplePickerNavigationController* myPeoplePickerController;
@property (nonatomic, retain) IBOutlet PhoneViewController* myPhoneViewController; @property (nonatomic, retain) IBOutlet PhoneViewController* myPhoneViewController;
@property(readonly) bool backgroundSupported;
@end @end
......
...@@ -60,6 +60,9 @@ void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, LinphoneCa ...@@ -60,6 +60,9 @@ void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, LinphoneCa
linphoneAppDelegate* lAppDelegate = (linphoneAppDelegate*) linphone_core_get_user_data(lc); linphoneAppDelegate* lAppDelegate = (linphoneAppDelegate*) linphone_core_get_user_data(lc);
if (state == LinphoneCallIncomingReceived) { if (state == LinphoneCallIncomingReceived) {
[lAppDelegate newIncomingCall:[[NSString alloc] initWithCString:linphone_address_get_username(linphone_call_get_remote_address(call))]]; [lAppDelegate newIncomingCall:[[NSString alloc] initWithCString:linphone_address_get_username(linphone_call_get_remote_address(call))]];
} else if (lAppDelegate.backgroundSupported && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground && (LinphoneCallEnd|LinphoneCallError)) {
// cancel local notif if needed
[[UIApplication sharedApplication] cancelAllLocalNotifications];
} }
PhoneViewController* lPhone = lAppDelegate.myPhoneViewController; PhoneViewController* lPhone = lAppDelegate.myPhoneViewController;
[lPhone onCall:call StateChanged:state withMessage:message]; [lPhone onCall:call StateChanged:state withMessage:message];
...@@ -115,6 +118,7 @@ LinphoneCoreVTable linphonec_vtable = { ...@@ -115,6 +118,7 @@ LinphoneCoreVTable linphonec_vtable = {
@synthesize myTabBarController; @synthesize myTabBarController;
@synthesize myPeoplePickerController; @synthesize myPeoplePickerController;
@synthesize myPhoneViewController; @synthesize myPhoneViewController;
@synthesize backgroundSupported;
- (void)applicationDidEnterBackground:(UIApplication *)application { - (void)applicationDidEnterBackground:(UIApplication *)application {
...@@ -600,7 +604,7 @@ extern void libmsilbc_init(); ...@@ -600,7 +604,7 @@ extern void libmsilbc_init();
notif.repeatInterval = 0; notif.repeatInterval = 0;
notif.alertBody =[NSString stringWithFormat:@" %@ is calling you",from]; notif.alertBody =[NSString stringWithFormat:@" %@ is calling you",from];
notif.alertAction = @"Answer"; notif.alertAction = @"Answer";
notif.soundName = @"oldphone-mono-30s.wav"; notif.soundName = @"oldphone-mono-30s.caf";
[[UIApplication sharedApplication] presentLocalNotificationNow:notif]; [[UIApplication sharedApplication] presentLocalNotificationNow:notif];
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0.2</string> <string>1.0.3</string>
<key>NSMainNibFile</key> <key>NSMainNibFile</key>
<string>PhoneMainView</string> <string>PhoneMainView</string>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
2242D91A10D66C2100E9963F /* mic_active.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91810D66C2100E9963F /* mic_active.png */; }; 2242D91A10D66C2100E9963F /* mic_active.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91810D66C2100E9963F /* mic_active.png */; };
2242D91B10D66C2100E9963F /* mic_muted.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91910D66C2100E9963F /* mic_muted.png */; }; 2242D91B10D66C2100E9963F /* mic_muted.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91910D66C2100E9963F /* mic_muted.png */; };
2242D9C910D691F900E9963F /* GenericTabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2242D9C810D691F900E9963F /* GenericTabViewController.m */; }; 2242D9C910D691F900E9963F /* GenericTabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2242D9C810D691F900E9963F /* GenericTabViewController.m */; };
2242E313125235120061DDCE /* oldphone-mono-30s.caf in Resources */ = {isa = PBXBuildFile; fileRef = 2242E312125235120061DDCE /* oldphone-mono-30s.caf */; };
2245671D107699F700F10948 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2245671C107699F700F10948 /* Settings.bundle */; }; 2245671D107699F700F10948 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2245671C107699F700F10948 /* Settings.bundle */; };
224567C2107B968500F10948 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224567C1107B968500F10948 /* AVFoundation.framework */; }; 224567C2107B968500F10948 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224567C1107B968500F10948 /* AVFoundation.framework */; };
2245F78A1201D38000C4179D /* MoreViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81B111C44E100B04932 /* MoreViewController.xib */; }; 2245F78A1201D38000C4179D /* MoreViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81B111C44E100B04932 /* MoreViewController.xib */; };
224E7F4D124CB00900113C4A /* oldphone-mono-30s.wav in Resources */ = {isa = PBXBuildFile; fileRef = 224E7F4C124CB00900113C4A /* oldphone-mono-30s.wav */; };
225CB2EA11ABB51000628906 /* clavier-01-106px.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2E811ABB51000628906 /* clavier-01-106px.png */; }; 225CB2EA11ABB51000628906 /* clavier-01-106px.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2E811ABB51000628906 /* clavier-01-106px.png */; };
225CB2EB11ABB51000628906 /* clavier-01-108px.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2E911ABB51000628906 /* clavier-01-108px.png */; }; 225CB2EB11ABB51000628906 /* clavier-01-108px.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2E911ABB51000628906 /* clavier-01-108px.png */; };
225CB2EE11ABB65D00628906 /* clavier-01-160px.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2ED11ABB65D00628906 /* clavier-01-160px.png */; }; 225CB2EE11ABB65D00628906 /* clavier-01-160px.png in Resources */ = {isa = PBXBuildFile; fileRef = 225CB2ED11ABB65D00628906 /* clavier-01-160px.png */; };
...@@ -213,10 +213,10 @@ ...@@ -213,10 +213,10 @@
2242D91910D66C2100E9963F /* mic_muted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mic_muted.png; path = "liblinphone-sdk/apple-darwin/share/pixmaps/linphone/mic_muted.png"; sourceTree = "<group>"; }; 2242D91910D66C2100E9963F /* mic_muted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mic_muted.png; path = "liblinphone-sdk/apple-darwin/share/pixmaps/linphone/mic_muted.png"; sourceTree = "<group>"; };
2242D9C710D691F900E9963F /* GenericTabViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericTabViewController.h; sourceTree = "<group>"; }; 2242D9C710D691F900E9963F /* GenericTabViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericTabViewController.h; sourceTree = "<group>"; };
2242D9C810D691F900E9963F /* GenericTabViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GenericTabViewController.m; sourceTree = "<group>"; }; 2242D9C810D691F900E9963F /* GenericTabViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GenericTabViewController.m; sourceTree = "<group>"; };
2242E312125235120061DDCE /* oldphone-mono-30s.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "oldphone-mono-30s.caf"; path = "liblinphone-sdk/apple-darwin/share/sounds/linphone/rings/oldphone-mono-30s.caf"; sourceTree = "<group>"; };
2245671C107699F700F10948 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; }; 2245671C107699F700F10948 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
224567C1107B968500F10948 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 224567C1107B968500F10948 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
2245F77E1201D2AF00C4179D /* linphone-Info copy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "linphone-Info copy.plist"; sourceTree = "<group>"; }; 2245F77E1201D2AF00C4179D /* linphone-Info copy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "linphone-Info copy.plist"; sourceTree = "<group>"; };
224E7F4C124CB00900113C4A /* oldphone-mono-30s.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = "oldphone-mono-30s.wav"; path = "liblinphone-sdk/apple-darwin/share/sounds/linphone/rings/oldphone-mono-30s.wav"; sourceTree = "<group>"; };
2258633C11410BAC00C5A737 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; 2258633C11410BAC00C5A737 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
225CB2E811ABB51000628906 /* clavier-01-106px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-106px.png"; path = "Resources/clavier-01-106px.png"; sourceTree = "<group>"; }; 225CB2E811ABB51000628906 /* clavier-01-106px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-106px.png"; path = "Resources/clavier-01-106px.png"; sourceTree = "<group>"; };
225CB2E911ABB51000628906 /* clavier-01-108px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-108px.png"; path = "Resources/clavier-01-108px.png"; sourceTree = "<group>"; }; 225CB2E911ABB51000628906 /* clavier-01-108px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-108px.png"; path = "Resources/clavier-01-108px.png"; sourceTree = "<group>"; };
...@@ -565,7 +565,7 @@ ...@@ -565,7 +565,7 @@
29B97317FDCFA39411CA2CEA /* Resources */ = { 29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
224E7F4C124CB00900113C4A /* oldphone-mono-30s.wav */, 2242E312125235120061DDCE /* oldphone-mono-30s.caf */,
225CB2F911ABB76400628906 /* linphone-banner.png */, 225CB2F911ABB76400628906 /* linphone-banner.png */,
225CB2ED11ABB65D00628906 /* clavier-01-160px.png */, 225CB2ED11ABB65D00628906 /* clavier-01-160px.png */,
225CB2E811ABB51000628906 /* clavier-01-106px.png */, 225CB2E811ABB51000628906 /* clavier-01-106px.png */,
...@@ -686,7 +686,7 @@ ...@@ -686,7 +686,7 @@
225CB2EE11ABB65D00628906 /* clavier-01-160px.png in Resources */, 225CB2EE11ABB65D00628906 /* clavier-01-160px.png in Resources */,
225CB2FA11ABB76400628906 /* linphone-banner.png in Resources */, 225CB2FA11ABB76400628906 /* linphone-banner.png in Resources */,
2245F78A1201D38000C4179D /* MoreViewController.xib in Resources */, 2245F78A1201D38000C4179D /* MoreViewController.xib in Resources */,
224E7F4D124CB00900113C4A /* oldphone-mono-30s.wav in Resources */, 2242E313125235120061DDCE /* oldphone-mono-30s.caf in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
# -*- shell-script -*- # -*- shell-script -*-
GCC_VERSION=4.2 GCC_VERSION=4.2
SDK_VERSION_MAJOR=4
SDK_VERSION=4.0 SDK_VERSION=4.0
if test "${host_alias}" = "i386-apple-darwin" ; then if test "${host_alias}" = "i386-apple-darwin" ; then
...@@ -15,9 +16,10 @@ else ...@@ -15,9 +16,10 @@ else
fi fi
echo "Loading config.site for iPhone platform=${PLATFORM} version=${SDK_VERSION}" echo "Loading config.site for iPhone platform=${PLATFORM} version=${SDK_VERSION}"
SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}4*`
SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin
SYSROOT_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}${SDK_VERSION}.sdk for SYSROOT_PATH in $SDK_PATH_LIST ; do echo $SYSROOT_PATH ; done ;
echo "Selecting SDK path = ${SYSROOT_PATH}"
CC="${SDK_BIN_PATH}/gcc-${GCC_VERSION} -std=c99 -arch ${ARCH} --sysroot=${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION}" CC="${SDK_BIN_PATH}/gcc-${GCC_VERSION} -std=c99 -arch ${ARCH} --sysroot=${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION}"
CXX="${SDK_BIN_PATH}/g++-${GCC_VERSION} -arch ${ARCH} --sysroot=${SYSROOT_PATH}" CXX="${SDK_BIN_PATH}/g++-${GCC_VERSION} -arch ${ARCH} --sysroot=${SYSROOT_PATH}"
LD="${SDK_BIN_PATH}/ld-${GCC_VERSION} -arch ${ARCH}" LD="${SDK_BIN_PATH}/ld-${GCC_VERSION} -arch ${ARCH}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment