2014년 12월 1일 월요일

Adding New Screen (Looked at tutorials)

This should be fairly simple, so I'm a bit puzzled why it's not working. Created a new screen called ToDoTwitter and made a button and here's the blocks:

I double-checked screen name--I even copied and pasted it just to be sure. But when I go to my phone and click, nothing happens.



in case the name of your screen is ToDoTwitter, this looks fine
see also 

The recommended method of switching screens in App Inventor


do you test with the companion app?
probably it helps to restart the companion app?
did you build the app and test with the apk file?



If you are developing with WIFI on your device, the change screen might not work using the button on your device's screen while developing.  Press that button and then .use the browser Screen button to change screens while you are still developing.  Try it.

Here is another way to safely change screens other than using a manager screen:

TribleHunter    http://puravidaapps.com/tribblehunter.php   Note, this method works after the apk has been built...use  the browser Screen button to change screens while developing... however when this code is in place in your app.   Having the close screen part of the change screen process will prevent the device's system memory from overflowing and crashing your app.   This method is more suitable in some apps than the screen manager Taifun recommended.   They both work.

However, you probably can do what you want with a single screen using methods described here:  http://ai2.appinventor.mit.edu/reference/other/manyscreens.html   

The usual issue developers encounter is attempting to change screens and not using the exact 'screen name' for the other screen.  For instance "ToDoTwitter" is not the same as "todotwitter" on Android devices; the coding is case sensitive.

Did you get the screen to change?



If you are developing with WIFI on your device, the change screen might not work using the button on your device's screen while developing.  Press that button and then .use the browser Screen button to change screens while you are still developing.  Try it.

Not sure how to do what you're saying here about using the browser screen button? 

Any, this was the issue (doesn't work using WIFI companion app). I'd tried restarting the companion app before I posted my question, thinking that could be it, but no go. I went ahead and built it and installed the apk file and it worked!


댓글 없음:

댓글 쓰기