From b685c142265fc169f692ed71b4aac9f43f7e1883 Mon Sep 17 00:00:00 2001 From: Timan Rebel Date: Thu, 3 Jul 2014 15:37:39 +0200 Subject: [PATCH] Added example to app.js --- android/example/app.js | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/android/example/app.js b/android/example/app.js index c48854b..c87b0c6 100644 --- a/android/example/app.js +++ b/android/example/app.js @@ -1,39 +1,10 @@ -// This is a test harness for your module -// You should do something interesting in this harness -// to test out the module and to provide instructions -// to users on how to use it by example. - - -// open a single window -var win = Ti.UI.createWindow({ - backgroundColor:'white' -}); -var label = Ti.UI.createLabel(); -win.add(label); -win.open(); - -// TODO: write your module tests here var Parse = require('eu.rebelcorp.parse'); -Ti.API.info("module is => " + Parse); - -label.text = Parse.example(); - -Ti.API.info("module exampleProp is => " + Parse.exampleProp); -Parse.exampleProp = "This is a test value"; + Parse.start('', ''); -if (Ti.Platform.name == "android") { - var proxy = Parse.createExample({ - message: "Creating an example Proxy", - backgroundColor: "red", - width: 100, - height: 100, - top: 100, - left: 150 - }); + // To enable Android Push Notifications + Parse.enablePush(); - proxy.printMessage("Hello world!"); - proxy.message = "Hi world!. It's me again."; - proxy.printMessage("Hello world!"); - win.add(proxy); -} + // Subscribe of unsubscribe to Parse Channels + Parse.subscribeChannel('user_123'); + Parse.unsubscribeChannel('user_123');