Question

Alright, so I've designed a simple app called "Where's my Phone?" that activates whenever a specific text message is received ("findme"). The component history "button" (ListPicker component) is displayed on the screen where a user can check the history of occurrences the app has been activated. I want the list to display all the occurrences the app has been activated.

The only problem is that whenever the app is activated, the ListPicker.Elements variable is overwritten with the most recent entry instead of accumulating a list. Meaning, that every time I send the message "findme" from one emulator to the emulator with the app, the list gets overwritten and displays the most recent occurance.

How can I create a list without the list restarting from the first occurrence?

Here's a snapshot of what I have: enter image description here

Screenshots:
http://i.stack.imgur.com/b4ESN.jpg
http://i.stack.imgur.com/lVYhd.jpg

Any help at all is very much appreciated!

Was it helpful?

Solution

if you want to add items to a list, you have to use the add items to list block, therefore
first define a variable, e.g. myList

enter image description here

then in the Texting.MessageReceived event use the add items to list block

enter image description here

and assign the list to your listpicker in the Listpicker.BeforePicking event

enter image description here

More about working with lists see also here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top