Central Repository API

The Java central Repository API is supported from Java Runtime 2.3 onwards for Symbian. This API is used to access the Symbian central repository.

Using this API, the values stored in the database can be read from and written to. It is used for sharing settings across runtimes.

Note: Java Central Repository API is available for manufacturer and operator domain applications only.

Example

private static final String EXAMPLE_REPOSITORY= "0x20000000";
      private static final String EXAMPLE_KEY1 = "0x00000001";
      private static final String EXAMPLE_KEY2 = "0x00000002";
 
      public modifySetting() throws CentralRepositoryException {
          CentralRepository cenrep = CentralRepository.open(EXAMPLE_REPOSITORY);
         try {
              String value1 = cenrep.getString(EXAMPLE_KEY1);
              int value2 = cenrep.getInt(EXAMPLE_KEY2);

              cenrep.setString(EXAMPLE_KEY1, value3);
              cenrep.setInt(EXAMPLE_KEY2, value4);
          }
          catch (CentralRepositoryException cre) {
              }
          finally {
              cenrep.close();
          }
      }