diff --git a/CrossPlatformModules.csproj b/CrossPlatformModules.csproj index 7f9a72e2b..eee46e931 100644 --- a/CrossPlatformModules.csproj +++ b/CrossPlatformModules.csproj @@ -79,6 +79,10 @@ data-binding.xml + + + main-page.xml + main-page.xml @@ -98,6 +102,9 @@ + + Designer + Designer @@ -177,6 +184,7 @@ location-example.xml + @@ -298,8 +306,18 @@ webview.xml + + connectivity.d.ts + + + connectivity.d.ts + + + + connectivity.d.ts + file-name-resolver.d.ts @@ -1693,6 +1711,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + @@ -1784,7 +1808,7 @@ False - + \ No newline at end of file diff --git a/apps/connectivity-demo/app.ts b/apps/connectivity-demo/app.ts new file mode 100644 index 000000000..cb572300b --- /dev/null +++ b/apps/connectivity-demo/app.ts @@ -0,0 +1,3 @@ +import application = require("application"); +application.mainModule = "main-page"; +application.start(); diff --git a/apps/connectivity-demo/main-page.ts b/apps/connectivity-demo/main-page.ts new file mode 100644 index 000000000..2ee364995 --- /dev/null +++ b/apps/connectivity-demo/main-page.ts @@ -0,0 +1,16 @@ +import connectivity = require("connectivity"); + +export function onGetConnectionType(args) { + var connectionType = connectivity.getConnectionType(); + switch (connectionType) { + case connectivity.connectionType.none: + args.object.text = "No connection"; + break; + case connectivity.connectionType.wifi: + args.object.text = "WiFi connection"; + break; + case connectivity.connectionType.mobile: + args.object.text = "Mobile connection"; + break; + } +} \ No newline at end of file diff --git a/apps/connectivity-demo/main-page.xml b/apps/connectivity-demo/main-page.xml new file mode 100644 index 000000000..c2695f1ee --- /dev/null +++ b/apps/connectivity-demo/main-page.xml @@ -0,0 +1,5 @@ + + +