NotifyChangeOfCurrentNetworkCancel on 6600
I am using RBasicGsmPhone to get notification of cell changes, in an active object. THis code works fine on a 3650, and as well as expected on the emulator. However, when I run it on a 6600, the code hangs in the cancel function, NotifyChangeOfCurrentNetworkCancel. Of course this prevents the applciation from shutting down.
What is a work around for this problem?
Some code to reproduce the problem:
This problem is easy to reproduce. The code below hangs in the cancel function (until there is a real change in network location).
Has anyone else experienced this? I'm thinking a work around may be to not call NotifyChangeOfCurrentNetworkCancel(), but to instead use User::CompleteRequest(iStatus, KErrCancel) (which seems a particularly nasty hack.
theConsole->Printf(_L("CellId = %d\n"), netInfo.iCellId);
theConsole->Printf(_L("Waiting for changes\n"));
theConsole->Printf(_L("Phone change cancelled, \npress any key"));
Well you're trying to use 1.x code on a 2.0 device - so I guess you're just to have hack around the areas where the backwards compatibility isn't as good as you'd like.
RBasicGsmPhone isn't used on the 6600. It's been replaced by RMobilePhone. So you think you can use the 2.0 SDK to create a native 6600 version? Thinks again, RMobilePhone is a private API...
Thanks, I think you must be right.
Hopefully there is some publically available info on RMobilePhone....
where can i find RMobilePhone header information?
I need to use this NotifyChangeOfCurrentNetwork too.
Other think: how can i get the neightbour's cell id's? ( there is more. Netmonitor can)
I need this functions to use on Nokia 6600 ( SDK 2.0 )
No luck and no help
Hi, I havent been able to solve this I'm afraid. It seems that the RMobilePhone API is not published, and that no-one is willing to share it.
I work around the problem by cheating:
1) Never delete or cancel the active object until shutdown
2) At shutdown, I "cancel" the active object, by implementing DoCancel like this:
void CNetworkWatcher: oCancel()
// temporary hack to allow app to exit on a 6600.
TRequestStatus* ptrStatus = &iStatus;
Ugly I know, but I found no other way.