Hallo, I do have following problem.
I save my App settings in a file as follows ...
Sub btnSave_Click
'writing the object
Dim raf As RandomAccessFile
Main.thesettings.Language = pdnLanguage.SelectedIndex
Main.thesettings.Show = pdnShow.SelectedIndex
Main.TheSettings.UserName = txtUsername.Text
Main.TheSettings.ClrPassword = txtPassword.Text
Dim Bconv As ByteConverter
Dim data(0) As Byte
Dim md As MessageDigest
data = Bconv.StringToBytes(txtPassword.Text, "UTF8")
data = md.GetMessageDigest(data, "MD5")
Main.TheSettings.Password = Bconv.HexFromBytes(data)
Main.TheSettings.Client = txtClient.Text
Main.TheSettings.Imei = lblImei.text
Main.TheSettings.TxtLanguage = pdnLanguage.SelectedItem
If File.Exists(File.DirRootExternal, "EcoObjSec.dat") Then
raf.Initialize(File.DirRootExternal, "EcoObjSec.dat",False)
raf.WriteEncryptedObject(Main.TheSettings, "settings", 0)
raf.Close
End If
End Sub
... this works and if I end the App and restart settings are available.
But if I start the Task manager and do clear memory the settings are gone if I
restart the app.
I tried as path ...
File.DirRootExternal
File.DirDefaultExternal
I am using Samsung Galaxy S II
Could anybody help thx in advance
Georg
I save my App settings in a file as follows ...
Sub btnSave_Click
'writing the object
Dim raf As RandomAccessFile
Main.thesettings.Language = pdnLanguage.SelectedIndex
Main.thesettings.Show = pdnShow.SelectedIndex
Main.TheSettings.UserName = txtUsername.Text
Main.TheSettings.ClrPassword = txtPassword.Text
Dim Bconv As ByteConverter
Dim data(0) As Byte
Dim md As MessageDigest
data = Bconv.StringToBytes(txtPassword.Text, "UTF8")
data = md.GetMessageDigest(data, "MD5")
Main.TheSettings.Password = Bconv.HexFromBytes(data)
Main.TheSettings.Client = txtClient.Text
Main.TheSettings.Imei = lblImei.text
Main.TheSettings.TxtLanguage = pdnLanguage.SelectedItem
If File.Exists(File.DirRootExternal, "EcoObjSec.dat") Then
raf.Initialize(File.DirRootExternal, "EcoObjSec.dat",False)
raf.WriteEncryptedObject(Main.TheSettings, "settings", 0)
raf.Close
End If
End Sub
... this works and if I end the App and restart settings are available.
But if I start the Task manager and do clear memory the settings are gone if I
restart the app.
I tried as path ...
File.DirRootExternal
File.DirDefaultExternal
I am using Samsung Galaxy S II
Could anybody help thx in advance
Georg