2012-05-24 2 views
0

영구 메모리에 볼륨 레벨을 저장하는 데 문제가 있습니다. 저장 볼륨BlackBerry - 볼륨 저장 문제

volumeControl = (VolumeControl) _player.getControl("VolumeControl"); 
volumeControl.setLevel(_currentVolume); 
setVolume(_currentVolume); 

코드 : 플레이어의 볼륨 레벨을 설정하기위한

int _currentVolume = 50; 

코드 : 나는 다음과 같은 코드를 사용하고 있습니다.

public void Save() { 
    StoreInfo info = new StoreInfo(); 
    info.setElement(StoreInfo.VOL2, String.valueOf(volumeControl.getLevel())); 

    _data.addElement(info); 
    synchronized (store) { 
     store.setContents(_data); 
     store.commit(); 
    } 
} 

public void Get() { 
    synchronized (store) { 
     _data = (Vector) store.getContents(); 

     if (!_data.isEmpty()) { 
      StoreInfo info = (StoreInfo) _data.lastElement(); 
     } 
    } 
} 

그러나 코드가 :(작동하지 않는 몇 가지 필요 이 문제에 대한 도움을 받으십시오.

답변

0

Integer.parseInt((String)StoreInfo.getElement(StoreInfo.VOL2))을 어디에 적용 할 수 있는지 잘 모르겠습니다. 10.

+0

2 개월 프로그램 ... 아직 모든 것을 알지 못합니다. 어떻게 해결할 수 있습니까? – user1341204