2014년 12월 11일 목요일

.AfterActivity does not seem to work.

working on a college project and cannot sort out how .AfterActivity works.........
Used Activity Starter to run a python script which successfull runs(and successfully terminates) in the background.
here is where the problem ari
..ses...  the .AfterActivity part should work after the execution of the activity(script) but it doesnt.
 Does my script lack something like a return value? 
i have attached the screenshot of script running sucessfully on my phone and also the blocks amd the python script also

p.s. i have tried all over the web and found nothing relevant to this subject. I have been working on this project from a like a month and would highly appreciate if somenone could help.I am a noob at programming.





script1.py



unfortunately this is a SL4A issue, see also here https://groups.google.com/d/msg/android-scripting/P5vhcB4OJCs/r5LaRvnHEpYJ 



Sir, this is a very important project to me and i have worked really hard. moreover, this is the last step of my project so if u could please suggest some work-around or alternative to my situation i would whole heartedly appreciate it.



there is unfortunately no workaround, you can ask in the SL4A forumhttps://groups.google.com/forum/#!forum/android-scripting and star the SL4A issue 239 here  http://code.google.com/p/android-scripting/issues/detail?id=239



well, probably there is a workaround now with the File component...
in the script before terminating you could write something into a file (for example "READY") and read that file in App Inventor with the file component regularly using the clock component.
If the text "READY" is found in the file, then the activity is terminated
before starting the script, remove the text from the file again



I just looked at your script again and I'm wondering why are you using SL4A at all...
why don't you use the bluetooth component to connect with the Arduino?
Do a search in the forum or on Google to find some examples
I can offer this general bluetooth example https://puravidaapps.com/btchat.php


댓글 없음:

댓글 쓰기