Commit 36c393b2 authored by Jeffrey I. Schiller's avatar Jeffrey I. Schiller

Issue #304. Permit SKEW to work both ways. The Companion App will work

with all versions of App Inventor from YAV - SKEW to YAV + SKEW.
Update Companion Version to 2.03.

Change-Id: Ic7e4726ad39566dfc77a0239c39f2e337d07e98c
parent 77b30424
#| #|
$JSON $JSON
{"YaVersion":"68","Source":"Form","Properties":{"$Name":"Screen1","$Type":"Form","$Version":"10","Uuid":"0","ScreenOrientation":"portrait","Scrollable":"False","Title":"MIT AICompanion","VersionCode":"202","VersionName":"2.02","$Components":[{"$Name":"HorizontalArrangement2","$Type":"HorizontalArrangement","$Version":"2","Uuid":"-1890222609","Width":"-2","$Components":[{"$Name":"Label1","$Type":"Label","$Version":"2","Uuid":"-333340163","Text":"Your IP Address: "},{"$Name":"iplabel","$Type":"Label","$Version":"2","Uuid":"1435778230","Text":"IP ADDRESS","Width":"-2"}]},{"$Name":"Label5","$Type":"Label","$Version":"2","Uuid":"1468302777","Text":" ","Width":"-2"},{"$Name":"Label2","$Type":"Label","$Version":"2","Uuid":"-28249960","Text":"Directions: \\n1) On the Blocks Editor, press \"Connect to Device\" and select WiFi.\\n2) Type the 6-letter code or scan the QR code displayed on the Blocks Editor.\\n3) Click the 'Connect to App Inventor' button below.\\n4) If not connected in 30 seconds, click reset and repeat steps 1-4.","Width":"-2"},{"$Name":"Label6","$Type":"Label","$Version":"2","Uuid":"1263643189","Text":" ","Width":"-2"},{"$Name":"ScanButton","$Type":"Button","$Version":"4","Uuid":"-928166843","Text":"Scan the QR Code","Width":"-2"},{"$Name":"HorizontalArrangement1","$Type":"HorizontalArrangement","$Version":"2","Uuid":"-1363356191","Width":"-2","$Components":[{"$Name":"code","$Type":"TextBox","$Version":"4","Uuid":"2091318480","Hint":"Or type the 6-letter code here.","Width":"-2"}]},{"$Name":"Button1","$Type":"Button","$Version":"4","Uuid":"933636264","Text":"Connect to App Inventor","Width":"-2"},{"$Name":"Label8","$Type":"Label","$Version":"2","Uuid":"-1656721742","Text":"An Error Occurred. Please try pressing \"Connect to App Inventor\" again.","TextColor":"&HFFFF0000","Visible":"False"},{"$Name":"HorizontalArrangement5","$Type":"HorizontalArrangement","$Version":"2","Uuid":"1374735927","Visible":"False","$Components":[{"$Name":"Label7","$Type":"Label","$Version":"2","Uuid":"677206225","Text":"You did not enter 6 characters, please try again.","TextColor":"&HFFFF0000"}]},{"$Name":"RetryButton","$Type":"Button","$Version":"4","Uuid":"796723612","Text":"Reset","Visible":"False","Width":"-2"},{"$Name":"HorizontalArrangement3","$Type":"HorizontalArrangement","$Version":"2","Uuid":"-1743769894","Visible":"False","$Components":[{"$Name":"Label3","$Type":"Label","$Version":"2","Uuid":"-1412894374","Text":"Or you Can Scan a Bar Code","Visible":"False"}]},{"$Name":"HorizontalArrangement4","$Type":"HorizontalArrangement","$Version":"2","Uuid":"1722789622","Visible":"False","$Components":[{"$Name":"Label4","$Type":"Label","$Version":"2","Uuid":"-1681239855","Text":"If the Blocks Editor is already running"},{"$Name":"RestartButton","$Type":"Button","$Version":"4","Uuid":"1759990306","Text":"Restart"}]},{"$Name":"ConnectFailLabel","$Type":"Label","$Version":"2","Uuid":"1331553180","Text":"Your phone does not appear to be connected to a Wireless (WiFi) network.","TextColor":"&HFFFF0000","Visible":"False"},{"$Name":"Expireblock","$Type":"VerticalArrangement","$Version":"2","Uuid":"-1616116264","AlignHorizontal":"3","Visible":"False","$Components":[{"$Name":"expirewarning","$Type":"Label","$Version":"2","Uuid":"-243410660","Text":"This version of the App Inventor Companion is not compatible with your blocks editor. You can download a new version from the Play Store","TextColor":"&HFFFF0000"},{"$Name":"MarketButton","$Type":"Button","$Version":"4","Uuid":"566867955","Text":"Go to the Play Store"}]},{"$Name":"Web1","$Type":"Web","$Version":"2","Uuid":"-1902677450","Url":"http:\/\/osiris.mit.edu\/rendezvous\/"},{"$Name":"Clock1","$Type":"Clock","$Version":"1","Uuid":"1668438698"},{"$Name":"BarcodeScanner1","$Type":"BarcodeScanner","$Version":"1","Uuid":"240579661"},{"$Name":"TinyDB1","$Type":"TinyDB","$Version":"1","Uuid":"-587391114"},{"$Name":"ActivityStarter1","$Type":"ActivityStarter","$Version":"4","Uuid":"506337611","Action":"android.intent.action.VIEW","DataUri":"market:\/\/details?id=edu.mit.appinventor.aicompanion2"},{"$Name":"PhoneStatus1","$Type":"PhoneStatus","$Version":"1","Uuid":"-315198317"}]}} {"YaVersion":"68","Source":"Form","Properties":{"$Name":"Screen1","$Type":"Form","$Version":"10","Uuid":"0","ScreenOrientation":"portrait","Scrollable":"False","Title":"MIT AICompanion","VersionCode":"203","VersionName":"2.03","$Components":[{"$Name":"HorizontalArrangement2","$Type":"HorizontalArrangement","$Version":"2","Uuid":"-1890222609","Width":"-2","$Components":[{"$Name":"Label1","$Type":"Label","$Version":"2","Uuid":"-333340163","Text":"Your IP Address: "},{"$Name":"iplabel","$Type":"Label","$Version":"2","Uuid":"1435778230","Text":"IP ADDRESS","Width":"-2"}]},{"$Name":"Label5","$Type":"Label","$Version":"2","Uuid":"1468302777","Text":" ","Width":"-2"},{"$Name":"Label2","$Type":"Label","$Version":"2","Uuid":"-28249960","Text":"Directions: \\n1) On the Blocks Editor, press \"Connect to Device\" and select WiFi.\\n2) Type the 6-letter code or scan the QR code displayed on the Blocks Editor.\\n3) Click the 'Connect to App Inventor' button below.\\n4) If not connected in 30 seconds, click reset and repeat steps 1-4.","Width":"-2"},{"$Name":"Label6","$Type":"Label","$Version":"2","Uuid":"1263643189","Text":" ","Width":"-2"},{"$Name":"ScanButton","$Type":"Button","$Version":"4","Uuid":"-928166843","Text":"Scan the QR Code","Width":"-2"},{"$Name":"HorizontalArrangement1","$Type":"HorizontalArrangement","$Version":"2","Uuid":"-1363356191","Width":"-2","$Components":[{"$Name":"code","$Type":"TextBox","$Version":"4","Uuid":"2091318480","Hint":"Or type the 6-letter code here.","Width":"-2"}]},{"$Name":"Button1","$Type":"Button","$Version":"4","Uuid":"933636264","Text":"Connect to App Inventor","Width":"-2"},{"$Name":"Label8","$Type":"Label","$Version":"2","Uuid":"-1656721742","Text":"An Error Occurred. Please try pressing \"Connect to App Inventor\" again.","TextColor":"&HFFFF0000","Visible":"False"},{"$Name":"HorizontalArrangement5","$Type":"HorizontalArrangement","$Version":"2","Uuid":"1374735927","Visible":"False","$Components":[{"$Name":"Label7","$Type":"Label","$Version":"2","Uuid":"677206225","Text":"You did not enter 6 characters, please try again.","TextColor":"&HFFFF0000"}]},{"$Name":"RetryButton","$Type":"Button","$Version":"4","Uuid":"796723612","Text":"Reset","Visible":"False","Width":"-2"},{"$Name":"HorizontalArrangement3","$Type":"HorizontalArrangement","$Version":"2","Uuid":"-1743769894","Visible":"False","$Components":[{"$Name":"Label3","$Type":"Label","$Version":"2","Uuid":"-1412894374","Text":"Or you Can Scan a Bar Code","Visible":"False"}]},{"$Name":"HorizontalArrangement4","$Type":"HorizontalArrangement","$Version":"2","Uuid":"1722789622","Visible":"False","$Components":[{"$Name":"Label4","$Type":"Label","$Version":"2","Uuid":"-1681239855","Text":"If the Blocks Editor is already running"},{"$Name":"RestartButton","$Type":"Button","$Version":"4","Uuid":"1759990306","Text":"Restart"}]},{"$Name":"ConnectFailLabel","$Type":"Label","$Version":"2","Uuid":"1331553180","Text":"Your phone does not appear to be connected to a Wireless (WiFi) network.","TextColor":"&HFFFF0000","Visible":"False"},{"$Name":"Expireblock","$Type":"VerticalArrangement","$Version":"2","Uuid":"-1616116264","AlignHorizontal":"3","Visible":"False","$Components":[{"$Name":"expirewarning","$Type":"Label","$Version":"2","Uuid":"-243410660","Text":"This version of the App Inventor Companion is not compatible with your blocks editor. You can download a new version from the Play Store","TextColor":"&HFFFF0000"},{"$Name":"MarketButton","$Type":"Button","$Version":"4","Uuid":"566867955","Text":"Go to the Play Store"}]},{"$Name":"Web1","$Type":"Web","$Version":"2","Uuid":"-1902677450","Url":"http:\/\/osiris.mit.edu\/rendezvous\/"},{"$Name":"Clock1","$Type":"Clock","$Version":"1","Uuid":"1668438698"},{"$Name":"BarcodeScanner1","$Type":"BarcodeScanner","$Version":"1","Uuid":"240579661"},{"$Name":"TinyDB1","$Type":"TinyDB","$Version":"1","Uuid":"-587391114"},{"$Name":"ActivityStarter1","$Type":"ActivityStarter","$Version":"4","Uuid":"506337611","Action":"android.intent.action.VIEW","DataUri":"market:\/\/details?id=edu.mit.appinventor.aicompanion2"},{"$Name":"PhoneStatus1","$Type":"PhoneStatus","$Version":"1","Uuid":"-315198317"}]}}
|# |#
\ No newline at end of file
...@@ -82,8 +82,8 @@ $Source $Yail ...@@ -82,8 +82,8 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'ScreenOrientation "portrait" 'text) (do-after-form-creation (set-and-coerce-property! 'Screen1 'ScreenOrientation "portrait" 'text)
(set-and-coerce-property! 'Screen1 'Scrollable #f 'boolean) (set-and-coerce-property! 'Screen1 'Scrollable #f 'boolean)
(set-and-coerce-property! 'Screen1 'Title "MIT AICompanion" 'text) (set-and-coerce-property! 'Screen1 'Title "MIT AICompanion" 'text)
(set-and-coerce-property! 'Screen1 'VersionCode 202 'number) (set-and-coerce-property! 'Screen1 'VersionCode 203 'number)
(set-and-coerce-property! 'Screen1 'VersionName "2.02" 'text) (set-and-coerce-property! 'Screen1 'VersionName "2.03" 'text)
) )
(define-event Screen1 Initialize() (define-event Screen1 Initialize()
(set-this-form) (set-this-form)
......
...@@ -4,5 +4,5 @@ assets=../assets ...@@ -4,5 +4,5 @@ assets=../assets
source=../src source=../src
build=../build build=../build
icon=AICompanion.png icon=AICompanion.png
versioncode=202 versioncode=203
versionname=2.02 versionname=2.03
...@@ -70,7 +70,7 @@ public class AppInvHTTPD extends NanoHTTPD { ...@@ -70,7 +70,7 @@ public class AppInvHTTPD extends NanoHTTPD {
try { try {
String strversion = parms.getProperty("version", "0"); String strversion = parms.getProperty("version", "0");
int version = (new Integer(strversion)).intValue(); int version = (new Integer(strversion)).intValue();
if ((version > YaVersion.YOUNG_ANDROID_VERSION) || if ((version > (YaVersion.YOUNG_ANDROID_VERSION + YAV_SKEW)) ||
(version < (YaVersion.YOUNG_ANDROID_VERSION - YAV_SKEW))) { (version < (YaVersion.YOUNG_ANDROID_VERSION - YAV_SKEW))) {
scheme.eval("(begin (require com.google.youngandroid.runtime) (process-repl-input ((get-var badversion)) \"foo\"))"); scheme.eval("(begin (require com.google.youngandroid.runtime) (process-repl-input ((get-var badversion)) \"foo\"))");
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment