Search code examples
javablackberryjava-memidp

BlackBerry RecordStore - How to make private or shared?


OK, per the BB manual:

"Applications that use the record store can either make data private or allow sharing. The record store is frequently used to share data between applications. "

Yet, I'm not seeing anything in the examples on how to make a record store private "or allow sharing" within the examples.

Can someone please help clarify? I've very, very new to this stuff!


Solution

  • Ok, I found my own answer:

    http://www.blackberry.com/developers/docs/7.0.0api/javax/microedition/rms/RecordStore.html#openRecordStore%28java.lang.String,%20boolean,%20int,%20boolean%29

    public static RecordStore openRecordStore(String recordStoreName,
                                          boolean createIfNecessary,
                                          int authmode,
                                          boolean writable)
                                   throws RecordStoreException,
                                          RecordStoreFullException,
                                          RecordStoreNotFoundException
    

    "authmode" determines during create determines whether its shared, or private.