Thursday, January 21, 2016

Advice on how to detect the access point or mobile phone use is CMWAP CMNET?




            


When connected to the network, the phone will pop up selection box allows users to choose access mode
After the user selects in the program in order to know which way the user how to use it
Reply:
connection.EnumerateConnections (count);
TPckgBuf & lt; TConnectionInfo & gt; connectionInfo;
for (TUint i = 1; i & lt; = count; ++ i)
{
TInt err = connection.GetConnectionInfo (i, connectionInfo);
}
So just know that there are several connections, you can not judge a Bluetooth or GPRS
Reply:
Use TConnectionType [judgment, I chose CMET, or CMWAP but the value is EConnectionGeneric TConnectionType but instead EConnectionGPRS
Reply:
Know the access point ID, then you can judge CMNET or CMWAP, listed on the S60 generally own access points allow the user to select, then judge.
Reply:
Know the access point ID, then it can judge CMNET or CMWAP

How to judge ???

Beover1984 can sample code to point it?


Reply:
I also hope to get an answer.
Reply:
CCommsDatabase * const comDB = CCommsDatabase :: NewL (EDatabaseTypeIAP);
CleanupStack :: PushL (comDB);
CCommsDbTableView * myIapTableView = comDB- & gt; OpenTableLC (TPtrC (WAP_ACCESS_POINT));
TBuf & lt; 100 & gt; buf;
TUint32 iapId = 1024; //
TUint32 iApPos = 0;
if (myIapTableView- & gt; GotoFirstRecord () == KErrNone)
{
do
{
buf.Zero ();
myIapTableView- & gt; ReadTextL (TPtrC (COMMDB_NAME), buf);
Logger :: Log (buf);
buf.UpperCase ();
iApPos = (TUint32) (KErrNotFound);

if (KErrNotFound! = buf.Find (_L ("cmwap")))
{
// Do something
}
if (KErrNotFound! = buf.Find (_L ("cmnet")))
{

// Do something
}

}
while (KErrNone == myIapTableView- & gt; GotoNextRecord ());
}
CleanupStack :: PopAndDestroy (2, comDB);

No comments:

Post a Comment