// 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 altbeacon = require('co.altitude.altbeacon');
Ti.API.info("module is => " + altbeacon);

label.text = altbeacon.example();

Ti.API.info("module exampleProp is => " + altbeacon.exampleProp);
altbeacon.exampleProp = "This is a test value";

if (Ti.Platform.name == "android") {
	var proxy = altbeacon.createExample({
		message: "Creating an example Proxy",
		backgroundColor: "red",
		width: 100,
		height: 100,
		top: 100,
		left: 150
	});

	proxy.printMessage("Hello world!");
	proxy.message = "Hi world!.  It's me again.";
	proxy.printMessage("Hello world!");
	win.add(proxy);
}


@@ -1,198 +1,4 @@
-// This is a test harness for your module%0A// You should do something interesting in this harness%0A// to test out the module and to provide instructions%0A// to users on how to use it by example.%0A%0A%0A
 // o
@@ -143,46 +143,120 @@
 );%0A%0A
-// TODO: write your module tests her
+if (Ti.Platform.name == %22android%22) %7B%0A%09Ti.API.warn(%22This module is only for iOS%22);%0A%7D%0Aelse %7B%0A%09// load the modul
 e%0A
+%09
 var 
@@ -301,16 +301,17 @@
 acon');%0A
+%09
 Ti.API.i
@@ -349,496 +349,664 @@
 );%0A%0A
-label.text = altbeacon.example();%0A%0ATi.API.info(%22module exampleProp is =%3E %22 + altbeacon.exampleProp);%0Aaltbeacon.exampleProp = %22This is a test value%22;%0A%0Aif (Ti.Platform.name == %22android%22) %7B%0A%09var proxy = altbeacon.createExample(%7B%0A%09%09message: %22Creating an example Proxy%22,%0A%09%09backgroundColor: %22red%22,%0A%09%09width: 100,%0A%09%09height: 100,%0A%09%09top: 100,%0A%09%09left: 150%0A%09%7D);%0A%0A%09proxy.printMessage(%22Hello world!%22);%0A%09proxy.message = %22Hi world!.  It's me again.%22;%0A%09proxy.printMessage(%22Hello world!%22);%0A%09win.add(proxy);
+%09// set our beacon id%0A%09altbeacon.initialize %2245E30186-1BDF-4333-B0A6-0C994CC3B890%22%0A%0A%09// configure the module - this is optional%0A%09altbeacon.configure%0A%09%09debugCentral: true %09%09%09%09// default: false%0A%09%09debugPeripheral: true %09%09%09// default: false%0A%09%09debugProximity: true %09%09%09// default: false%0A%09%09updateInterval: 1.0 %09%09%09// default: 1.0%0A%09%09processPeripheralInterval: 2.0 %09// default: 2.0%0A%09%09restartScanInterval: 3.0 %09%09// default: 3.0%0A%09%09// service: %3CUUID%3E%09%09%09%09// default: %222F234454-CF6D-A40F-ADF2-F4911BA9FFA6%22%0A%09%09// characteristic: %3CUUID%3E%09%09// default: %22A05F9DF4-9D54-4600-9224-983B75B9D154%22%0A%0A%09// start beacon - will broacast and discover other beacons%0A%09altbeacon.startBeacon()
 %0A%7D%0A
-%0A

set example code