How to change RecordStoreException J2ME to java Android

60 views Asked by At

I have a code in J2ME with RecordStoreException

public Preferences(String recordStoreName) throws RecorStoreException
{
    mRecordStoreName = recordStoreName;
    mHashTable = new Hashtable();
    load();
}

How can I change it to java Android? Is RecordStore can be used in java Android, because there's no such a package when i try to import. Is there another way to save device id without it in Android?

1

There are 1 answers

0
Mister Smith On

The RMS API is only available in JavaME. It does not exist in regular JavaSE or JavaEE platforms. Android is based on JavaSE, so that API is not available. Android has its own persistence mechanisms, like SQLite or SharedPreferences.