code: private void parseSmsSignalInfo(SmsSignalInfo si, boolean isMo, boolean isMt) {
  
          if (si == null)
              return;
  
          if (isMo) {
              try {
                  SmsTpdu tpdu = si.decodeTpdu(true);
                  parseSmsTpdu(tpdu);
              } catch (MAPException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
  
          if (isMt) {
              try {
                  SmsTpdu tpdu = si.decodeTpdu(false);
                  parseSmsTpdu(tpdu);
              } catch (MAPException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
      }
docs: SMS service listener