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
Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

SIM card swapping notification

Is there any way to get notified when the sim card is pulled out/ inserted?

Or at least is there a way to check if it is inserted/removed at the moment so I can implement polling mechanism?

 

Thanks.

----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Please use plain text.
Developer
pradeep_ch
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: SIM card swapping notification

Please use plain text.
Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: SIM card swapping notification

How do you propose for me to use it to determine whether a simcard is inserted or not??
----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Please use plain text.
Developer
pradeep_ch
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: SIM card swapping notification

This is just suggestion, You can use a logic like, if sim card is not there then you may got exception , by handling this exception...

I thought like this..

Thanks.
Please use plain text.
Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: SIM card swapping notification

Hmm it seems to work, but its not reliable - I can't know whether the exception is thrown due to missing sim card or something else.
Plus I don't know how will this behave on different devices/os version.

BUT it is some start. Thanks for the idea!
----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Please use plain text.
Developer
shahumang8
Posts: 641
Registered: ‎08-09-2010
My Device: Not Specified

Re: SIM card swapping notification

You got any solution ?

 

Thanks.

Please use plain text.
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: SIM card swapping notification

I feel BB does not provide any API to get such type of notification. 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Please use plain text.
Developer
peter_strange
Posts: 19,602
Registered: ‎07-14-2008
My Device: Not Specified

Re: SIM card swapping notification

I have never looked for this API, so not sure if one exists or not.

 

But I think in most if not all phones, the SIM card can't be changed without removing the battery, so something running at startup could detect a change.

 

If not, then I think there are listeners that you may be able to use that will get triggered in the same circumstances,  I suspect RadioStatusListener will get triggered for example.

 

What exactly are you trying to do?

 

Please use plain text.