Package com.motorola.oem.access

Access package - query and perform simple SIM card related operations as well to get SIM status indications.

See:
          Description

Interface Summary
AccessSIMStatusListener A listener type for SIM status change notifications.
 

Class Summary
Access This class provides the ability to work with a SIM card.
 

Exception Summary
AccessException Exception type for Access class.
 

Package com.motorola.oem.access Description

Access package - query and perform simple SIM card related operations as well to get SIM status indications.
This package provides the ability to work with a SIM card: get its indications, query status of access (Locked/unlocked), change PIN code, get MSISDN numbers, get SIM card info and more.

Code example - Change SIM Pin1:


         public class OEMAccessTest2MIDlet extends MIDlet 
        {       
                // passed parameters
                private String   Old_Password;
                private String   New_Password;
        
        
                // construcror
        public OEMAccessTest2MIDlet () 
                {       
                        super();                        
            }
        

            public void startApp() throws MIDletStateChangeException
        {        
                        //display
                        System.out.println("OEM Access Test 2 MIDlet");
                        System.out.println("++++++++++++++++++++++++");
                                                
                
                        // get parameters from JAD
                        Old_Password  = getAppProperty("OldPassword");
            New_Password  = getAppProperty("NewPassword");
                
                        
                
                
                        // main function 
                        GetMIDletValues();
        }



            public void pauseApp()
        {
            }



                public void destroyApp(boolean unconditional)
                {
                        notifyDestroyed();
                }


                                        
        
                private void GetMIDletValues ()
                {                                                          
                        // try to change password for SIM Pin1 (async)
                        //-------------------------------
                        try
                        {
                                Access.getInstance().changeSIMPin1(Old_Password, New_Password);
                        }
                        catch (OEMException e)
                        {
                                e.printStackTrace();
                        }       
                }               
        }