this will work only in the companion app, but not in the apk file … to be more correct, the apk file will work on your development device, at least as long as you do not delete the AppInventor folder but not in other devices…
see also my answer here
Taifun