×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    21

    How to detect SIM is Changed in j2me app

    I am developing a j2me app in which i required check sim card is changed or not. So how can i do this.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: How to detect SIM is Changed in j2me app

    there might not be any direct apis but you can check for imsi number, and then conclude if sim is changed or not. But i also think you will not be able to start the application when device is rebooted so the point where you need to check can be a problem.

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: How to detect SIM is Changed in j2me app

    For that, you'd need to be able to get and poll whether the IMSI (International Mobile Subscriber Identifier, i.e., the SIM card's serial number) has changed.

    There is a Nokia-specific system property for the IMSI (com.nokia.mid.imsi):

    http://www.developer.nokia.com/Resou...roperties.html

  4. #4
    Registered User
    Join Date
    Mar 2013
    Posts
    21

    Re: How to detect SIM is Changed in j2me app

    for my app i am not using nokia library. is there any way in j2me to get this IMSI number

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: How to detect SIM is Changed in j2me app

    check this http://stackoverflow.com/questions/1...ange-detection , but i think this link also doesnt give a generic solution.

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: How to detect SIM is Changed in j2me app

    Indeed, there is no universal J2ME solution that works on all phones that support J2ME, so manufacturer/model specific solutions are required (and for some models there are no solutions at all).

    And if/when you attempt to do this, you can't trust emulator behaviour, but must test on actual phones. In the case of Nokia, if you base a solution on a given platform release, most probably (but not 100% guaranteed), if it works on one model using that platform release (version) it will probably work on all other models based on the same version. Still, just in the case of Nokia, that still means - for maximum reach - tens of different models to test on as there has been so many Serie 40 and S60/Symbian releases over the years.

  7. #7
    Registered User
    Join Date
    Apr 2013
    Posts
    2

    Re: How to detect SIM is Changed in j2me app

    I'm thinking of either preventing the sim from registering on the network or having some background app that will shutdown the phone or prevent usage if the sim is change.

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: How to detect SIM is Changed in j2me app

    on S40 i think its not possible there are lots of api limitations and you cant make a true daemon app in j2me.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: How to detect SIM is Changed in j2me app

    Quote Originally Posted by usha2112 View Post
    I'm thinking of either preventing the sim from registering on the network or having some background app that will shutdown the phone or prevent usage if the sim is change.
    Java ME is an environment where you can not prevent anything, but you may be prevented from doing things any time, starting with the simplest thing, execution. So this application idea is not feasible.

Similar Threads

  1. How to detect j2me memory leaks?
    By sslaoyao in forum Mobile Java Tools & SDKs
    Replies: 8
    Last Post: 2010-01-21, 09:18
  2. Is it possible to detect whether the phone is in use using J2ME?
    By sunil_bhambani123 in forum Mobile Java General
    Replies: 3
    Last Post: 2008-12-22, 06:14
  3. How to detect if a file is changed
    By xhsoldier in forum Symbian
    Replies: 6
    Last Post: 2007-08-30, 08:15
  4. How to detect the sim card changed?
    By xhsoldier in forum Symbian
    Replies: 2
    Last Post: 2007-01-26, 06:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×