怎么获得gprs的状态 Saturday, October 10, 2009

This topic has been posting on NewLc

How to get the status of GPRS
At first , you must create a instance of RMobilePhone. The process and related functions to create the instance can refer to the following link.
http://www.newlc.com/how-retrieve-phone-imei-code-uiq3-0
The following code block demonstrates how to get the status of GPRS.

RMobilePhone iMmPhone;
RPacketService iGprs;
iGprs.Open(iMmPhone);
RPacketService::TStatus lGprsStatus;
err 
= iGprs.GetStatus(lGprsStatus);
TStatus is defined in etelpckt.h.
EStatusUnattached,    //  your phone is not attached to GPRS. i.e. you do not apply for the GPRS feature
EStatusAttached,    //  your phone is attached to GPRS, but there is not data to be sent
EStatusActive,        // there is data to be sent. i.e. your phone is accessing the network
EStatusSuspended  // attached to network & suspended packet data connection
 And you can call the function NotifyStatusChange to be notified as the status of GPRS is changed.
Regarding the signal strength of GPRS, it's wrong concept. Because the "signal strength" is not variable. Either you have it or you don't. This "bar" on phone is full when the phone has GPRS attached and empty other vise.

0 comments: