Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Developer
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified
Accepted Solution

How to detect BES/MDS

I have been using the coverageInfo class to check if I have MDS so that I put the right parameter in the http connection request as follows:

 

 int coverage = CoverageInfo.getCoverageStatus(CoverageInfo.COVERAGE_MDS,false);
 if((coverage & 0x02) == CoverageInfo.COVERAGE_MDS )

   _MDS_ON = true;

 

But I have noticed that the function:

 

   int allcoverages = CoverageInfo.getCoverageStatus();

sometimes returns different status. ( allcoverage returns 7  while coverage returns 5) 

 

First question: is this the efficient/best way to test if the phone is BES enabled with MDS?

Second question: Why is there a discrepency between the two APIs?

 

Thanks

BlackBerry Development Advisor
Posts: 15,888
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to detect BES/MDS

As a starting point, I recommend having a look at this thread and the code samples within it:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=898&query.id=3725...

 

Can you elaborate on this further:

 


rab wrote:

 

   int allcoverages = CoverageInfo.getCoverageStatus();

sometimes returns different status. ( allcoverage returns 7  while coverage returns 5) 

 


 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Developer
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified

Re: How to detect BES/MDS

According to the documentation ( and my understanding)

 

 CoverageInfo.getCoverageStatus(CoverageInfo.COVERAGE_MDS,false) returns 7 which means there is MDS coverage

while

 CoverageInfo.getCoverageStatus(); returns 5 which means there is no MDS coverage.

 

So the 2 getCoverageStatus() are reporting conflicting results.

 

Thanks

BlackBerry Development Advisor
Posts: 15,888
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to detect BES/MDS

the getCoverageStatus(int, boolean) method accepts the RadioInfo.WAF* constants, not the constants from CoverageInfo..  This allows you to check for coverage over a specific network route.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Developer
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified

Re: How to detect BES/MDS

Thanks for the clarification.

 

Can I rely on CoverageInfo.getCoverageStatus() result alone to confirm that there is MDS or

should I check also the serviceBooks ( findRecordsByCid("IPPP") and  encryptionMode == ServiceRecord.ENCRYPT_RIM) ?

 

or just the later.

 

Thanks

 

BlackBerry Development Advisor
Posts: 15,888
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to detect BES/MDS

CoverageInfo can be used to determine if the BlackBerry is able to make a connection through the MDS Connection Service at a given time.

 

It does not indicate that the user potentially has the ability to do so.

 

So it depends on what type of check you want to do.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Developer
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified

Re: How to detect BES/MDS

The check I am making is to find out if the phone is BES enabled, and hence can use MDS service.

If so, I append the "deviceid=false" to the http url to force the connection to use MDS service.

 

Thanks

BlackBerry Development Advisor
Posts: 15,888
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to detect BES/MDS

CoverageInfo will let you know if the user is able to connect through MDS at that given time.

 

If you want to see if they have the potential to connect through MDS, you can look at the service records in the service book to see if they have the Desktop IPPP service book.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.