Hi All
If you have a service app and the main process_Globals do the following;
Sub Process_Globals
Dim KVS As KeyValueStore
Dim SQLDB As SQL
' // no SD card - fail on boot
If File.ExternalWritable = False Then
'SQLDB.Initialize(File.DirInternal, "db_tpa", True)
KVS.Initialize(File.DirInternal, "db_kvs")
Else
'SQLDB.Initialize(File.DirDefaultExternal , "db_tpa", True)
KVS.Initialize(File.DirDefaultExternal, "db_kvs")
End If
end sub
when the app load after a REBOOT of the phone you will get a message on the screen saying;
Unfortunatly, {appname} has stopped.
To discover this I initially thought it was the notification bar, it was'nt, wrote a simple app that put an icon in the bar and when pressed the main activiy is called and 'hello world is displayed'.
So, went to the real app and rem'd out all the code to simplete the hello world app, and slowly started to re-introduce the code back in, starting with the process_Globals of activity main.
I would like to know why this happens. We are using an SQL db also and it get initialised ok. I can move the KVS into the main SQL db but would still like to know the reason for the failure.
Other should try this to see if they get the same results.
Regards
John.
If you have a service app and the main process_Globals do the following;
Sub Process_Globals
Dim KVS As KeyValueStore
Dim SQLDB As SQL
' // no SD card - fail on boot
If File.ExternalWritable = False Then
'SQLDB.Initialize(File.DirInternal, "db_tpa", True)
KVS.Initialize(File.DirInternal, "db_kvs")
Else
'SQLDB.Initialize(File.DirDefaultExternal , "db_tpa", True)
KVS.Initialize(File.DirDefaultExternal, "db_kvs")
End If
end sub
when the app load after a REBOOT of the phone you will get a message on the screen saying;
Unfortunatly, {appname} has stopped.
To discover this I initially thought it was the notification bar, it was'nt, wrote a simple app that put an icon in the bar and when pressed the main activiy is called and 'hello world is displayed'.
So, went to the real app and rem'd out all the code to simplete the hello world app, and slowly started to re-introduce the code back in, starting with the process_Globals of activity main.
I would like to know why this happens. We are using an SQL db also and it get initialised ok. I can move the KVS into the main SQL db but would still like to know the reason for the failure.
Other should try this to see if they get the same results.
Regards
John.