Comments (2)
We have stated to work on the issue. In the meanwhile, if you want to add this
feature, here is the steps:
1. Add an observer for network change in -didFinishLaunchingWithOptions:
[[NSNotificationCenter defaultCenter]
addObserver:self selector:@selector(onNetworkEvent:) name:kNgnNetworkEventArgs_Name object:nil];
2. Implement -onNetworkEvent: like this:
-(void) onNetworkEvent:(NSNotification*)notification {
NgnNetworkEventArgs *eargs = [notification object];
switch (eargs.eventType) {
case NETWORK_EVENT_STATE_CHANGED:
default:
{
NgnNSLog(TAG,@"NetworkEvent reachable=%@ networkType=%i",
[NgnEngine getInstance].networkService.reachable ? @"YES" : @"NO", [NgnEngine getInstance].networkService.networkType);
if([NgnEngine getInstance].networkService.reachable){
BOOL onMobileNework = ([NgnEngine getInstance].networkService.networkType & NetworkType_WWAN);
if(onMobileNework){ // 3G, 4G, EDGE ...
//MediaSessionMgr::defaultsSetBandwidthLevel(tmedia_bl_medium); // QCIF, SQCIF
}
else {// WiFi
//MediaSessionMgr::defaultsSetBandwidthLevel(tmedia_bl_unrestricted);// SQCIF, QCIF, CIF ...
}
// unregister the application and schedule another registration
BOOL on3G = onMobileNework; // Downgraded to 3G even if it could be 4G or EDGE
BOOL use3G = [[NgnEngine getInstance].configurationService getBoolWithKey:NETWORK_USE_3G];
if(on3G && !use3G){
// [self networkAlert:kNetworkAlertMsgThreedGNotEnabled];
[[NgnEngine getInstance].sipService stopStackSynchronously];
}
else { // "on3G and use3G" or on WiFi
// stop stack => clean up all dialogs
[[NgnEngine getInstance].sipService stopStackSynchronously];
[[NgnEngine getInstance].sipService registerIdentity];
}
}
break;
}
}
}
Original comment by [email protected]
on 8 Jul 2011 at 12:28
- Changed state: Started
from idoubs.
Original comment by [email protected]
on 23 Jul 2011 at 4:57
- Changed state: Fixed
from idoubs.
Related Issues (20)
- what
- what work in swift project
- Conference call in idoubs iOS
- Where can I download tinyWRAP?
- "#" replaced with "%23" on calling
- no find file: NgnProxyPlugin.mm HOT 1
- iDoubs: Change CSeq sip header value
- About the conflict of amr
- idoubs stack support for ipv6 HOT 1
- Integration in swift
- SIP Session destroyed iOS codebase .
- Undefined symbols for architecture arm64 error for libtinyDAV.a
- Thread 23: EXC_BAD_ACCESS (code=1, address=0xf000000c) when call is unanswered/failed to connect
- Video screen resolution is low, how to adjust the resolution?
- App crashes when making call after killing by swiping and launching app again HOT 1
- Can't compile app HOT 1
- 后台唤醒功能(startKeepAwake、stopKeepAwake)
- On the low success rate of dialing mobile phone number(关于拨打手机号,成功率不高的问题)
- How to run Demo Application Source Code For Audio Calling
- Crash while running on IOS-16 beta with error Method cache corrupted. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from idoubs.