Setting default APN for RealOne Player
I'm writing an app that uses the RealOne Player to stream. By default there is no APN on the
phone suitable for streaming, so I've created one. However, I want to avoid the Default
Access Point menu when Real Player is called.
I have tried setting the phone's default apn, in the hopes that Real will use that, but I
don't seem to be able to manage it.
Using the iap id returned from CApDataHandler::CreateFromDataL, I have called
CApDataHandler::SetAsDefaultL and also tried inserting a new record in the comm db's
preference table. Both are giving me errors that I don't know how to solve. SetAsDefaultL
gives -6 (KErrArgument). InsertConnectionPreferenceL gives -1 (KErrNotFound). My code is
I have also tried CCommsDatabase::SetGlobalSettingL( TPtrC(ASK_USER_BEFORE_DIAL), TFalse );
which I read somewhere would turn off the prompting for all connections, but it doesn't seem
to have had any effect.
Can anyone tell me how to remove the menu?
void myIAP::SetDefault(TUint32 iapId, CCommtestContainer* iContainer) const
CApDataHandler* ApDataHandler = CApDataHandler::NewLC(*comDB);
// report error code (-6)
void myIAP::SetDefault2(TUint32 iapId, CCommtestContainer* iContainer) const
CCommsDatabase* comDB = CCommsDatabase::NewL(EDatabaseTypeIAP);
CCommsDbConnectionPrefTableView* prefView = comDB->OpenConnectionPrefTableLC(ECommDbConnectionDirectionOutgoing);
// start creating new record
aPref.iRanking = 1; // I also tried 0
aPref.iDirection = ECommDbConnectionDirectionOutgoing;
aPref.iDialogPref = ECommDbDialogPrefDoNotPrompt;
bearer.iBearerSet = ECommDbBearerGPRS;
bearer.iIapId = iapId;
aPref.iBearer = bearer;
// insert it
// report error code (-1)
Re: Setting default APN for RealOne Player
I am sorry, but the RealOne has the APN set in its own config file. So it is impossible to set it via some function calls. But it would be possible to modify this config file (it is a plain text file). But you would have to ensure that the RealOne is not running at the moment you make the modifications since this file is read only at the RealOne startup.
The file is placed in the c:\System\Data directory and I am not sure about its name but I think it is RealPlayer.ini (or RealPlayer.dat)