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

Reply
New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Check for SIM

Hi all,

 

I have an application which sends and recieves SMS.

 

using DatagramConnectionBase.send(Datagram) I am able to send message when the SIM is present in the mobile but when the SIM is not present the application reaches the above code and does nothing, I want to show the alert that the SIM is not present if the SIM is missing.

 

How can we do it.

Highlighted
Developer
Posts: 146
Registered: ‎11-05-2008
My Device: Not Specified

Re: Check for SIM

only try with SIMCardInfo.getIMSI().If sim is not present,it gives exception.And from these u can identiify Sim is present or not.

New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: Check for SIM

Hi,

 

yeah I have used try catch block to check for sim and managed to do it.

 

thanks for your reply

 

Regards

 

LTCCTL