Ok, I've just done an upgrade and it works but there are few things to watch for. Both the pre-upgrade channel and the upgrade channel must come from the Channel Store (not sideloaded). For testing, both channels must be private channels, and both must be free, since a paid channel doesn't get into the store until approved. You can call roChannelStore.GetUpgrade() to verify that the store knows you have an upgrade. This returns an array containing one AA which contains info about the upgrade.
Here is the complete source of the pre-upgrade app I used.
function main() as Void
screen = CreateObject("roParagraphScreen")
msgport = CreateObject("roMessagePort")
screen.SetMessagePort(msgport)
screen.SetTitle("upgrade test")
screen.AddParagraph("calling GetUpgrade")
screen.Show()
store = CreateObject("roChannelStore")
store.SetMessagePort(msgport)
store.GetUpgrade()
items = invalid
while true
msg = wait(8000, msgport)
if msg = invalid then
exit while
elseif type(msg) = "roChannelStoreEvent" then
if msg.IsRequestSucceeded() then
items = msg.GetResponse()
print "got ";items.count();" items"
exit while
elseif msg.IsRequestFailed() then
print "channel store req failed: ";msg.GetStatusMessage()
return
end if
elseif type(msg) = "roParagraphScreenEvent" then
if msg.IsScreenClosed() then return
end if
end while
if items = invalid or items.count() < 1 then return
item = items[0]
facade = screen
screen = CreateObject("roParagraphScreen")
msgport = CreateObject("roMessagePort")
screen.SetMessagePort(msgport)
screen.SetTitle("upgrade test")
screen.AddParagraph("ready to upgrade to " + item.name + " (" + item.code + ")")
screen.AddButton(1, "Upgrade")
screen.Show()
store.SetMessagePort(msgport)
while true
msg = wait(0, msgport)
if type(msg) = "roParagraphScreenEvent" then
if msg.IsScreenClosed() then return
if msg.IsButtonPressed() then
print "starting upgrade"
if store.DoUpgrade() then
print "upgrade succeeded"
else
print "upgrade failed"
end if
end if
end if
end while
end function
--Mark