usertype in list in main activity and service module? - best way?

RiverRaid

Active Member
Licensed User
Longtime User
Hi!
I have a user type in a list:
B4X:
type eintrag (name as string, days as int)
Dim lst as list
Then i fill the list on activity create with the values:
B4X:
For i = 0 to 100
Dim e as eintrag
E.Name = "test" & i
E. Days =i
Next

To show it in a list, i go through all entrys and compare if the currentdays > e.days. if so, i idd them to a listview.

Now i want to create a servicemodule which does the same, but, if a new entry is there, it should show a notification. Not a problem so far :)
I just write (with statemanager) a setting that the item was already shown.

But: now i have 2 datastructures, which add overhead. I`dd like to have only one. THE SERVICEMODULE boots on phonestart, so i have to putthis list in the servicemodule and the activity should get it from there, right?
So.. what would be the best practice to do that, and how would you save, that it was schown already and it shouldnt appear again?

Thanks for your help :)
 

RiverRaid

Active Member
Licensed User
Longtime User
Thanks die your answer! So to be sure:
I have to declare the lust in process-globals. And then i have to fill it in the service module creation. Otherwise, in main.create, the lust would bei loaded after the first start from the activity and not when the device boots?

Thanks die your patience!
 
Upvote 0
Top