Package net.rim.device.api.servicebook

Examples of net.rim.device.api.servicebook.ServiceBook


         try
          {
             //check if email service name was passed in, otherwise use default
               if (!emailService.equalsIgnoreCase("")) {
                       
                  ServiceBook sb = ServiceBook.getSB();
                  ServiceRecord[] records = sb.findRecordsByCid("CMIME");
                                   
                  if (records != null)
                  {
                      for (int i = 0; i < records.length; ++i)
                      {
View Full Code Here


        // Determine if Direct TCP is available
        if( ( RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_DATA ) != 0 ) {
            vc.addElement( new TransportObject( "", TRANSPORT_TCP_CELLULAR, null ) );
        }

        final ServiceBook sb = ServiceBook.getSB();
        final ServiceRecord[] records = sb.getRecords();

        for( int i = 0; i < records.length; i++ ) {
            final ServiceRecord serviceRecord = records[ i ];
            if( serviceRecord.isValid() && !serviceRecord.isDisabled() && determineTransportType( serviceRecord ) != null ) {
                vc.addElement( new TransportObject( serviceRecord.getName(), determineTransportType( serviceRecord ),
View Full Code Here

     * @return a list of available services with the specified type. If no service is found, a empty array is returned.
     */
    private static ServiceObject[] getServiceList( final String cid ) {

        final int type = cidToType( cid );
        final ServiceBook sb = ServiceBook.getSB();
        final ServiceRecord[] serviceRecords = sb.findRecordsByCid( cid );
        ServiceObject[] serviceList;

        if( serviceRecords != null ) {

            serviceList = new ServiceObject[ serviceRecords.length ];
View Full Code Here

  /**
   * Create the field
   */
  public Notifications() {
    try {
      ServiceBook sb = ServiceBook.getSB();
      ServiceRecord[] records = sb.findRecordsByCid(CMIME);
      mailStores = new Store[records.length];
      for (int i = 0; i < records.length; i++) {
        ServiceConfiguration sc = new ServiceConfiguration(records[i]);
        Session session = Session.getInstance(sc);
        mailStores[i] = session.getStore();
View Full Code Here

     *
     * @return True if any messages were retrieved, otherwise false
     */
    public boolean getMessages() {
        // Open the service book and get the mail service records
        final ServiceBook serviceBook = ServiceBook.getSB();
        final ServiceRecord[] mailServiceRecords =
                serviceBook.findRecordsByCid("CMIME");

        for (int cnt = mailServiceRecords.length - 1; cnt >= 0; --cnt) {
            final ServiceConfiguration sc =
                    new ServiceConfiguration(mailServiceRecords[cnt]);
            final Store store = Session.getInstance(sc).getStore();
View Full Code Here

        // Get a copy of the ServiceRouting class.
        final ServiceRouting serviceRouting = ServiceRouting.getInstance();

        // Add in our new items by trolling through the ServiceBook API.
        final ServiceBook sb = ServiceBook.getSB();
        final ServiceRecord[] records = sb.getRecords();

        if (records == null) {
            return;
        }
View Full Code Here

    /**
     * Initializes the store
     */
    private void initialize() {
        // Open the service book and get the mail service records
        final ServiceBook serviceBook = ServiceBook.getSB();
        _mailServiceRecords = serviceBook.findRecordsByCid("CMIME");

        // Determine if there is more than one CMIME (email) service book
        if (_mailServiceRecords.length > 1) {
            selectServiceDialog();
        } else if (_mailServiceRecords.length == 1) {
View Full Code Here

TOP

Related Classes of net.rim.device.api.servicebook.ServiceBook

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.