The UrbanAirship module is a way to connect to the UrbanAirship AirMail push notification service.
To access this module from JavaScript, you would do the following:
| var tabGroup = Ti.UI.createTabGroup(); | |
| var win1 = Ti.UI.createWindow({ | |
| backgroundColor: 'blue' | |
| }); | |
| win1.addEventListener('blur', function(e){ | |
| Ti.API.info('blur'); | |
| }); | |
| win1.addEventListener('focus', function(e){ | |
| Ti.API.info('focus'); |
| var win = Ti.UI.createWindow({ | |
| backgroundColor: 'white' | |
| }); | |
| var view1 = Ti.UI.createView({ | |
| backgroundColor: 'red', | |
| height: 100, | |
| width: 50, | |
| top: 20, | |
| left: 20, |
| var win = Ti.UI.createWindow({ | |
| backgroundColor: '#fff', | |
| layout: 'vertical' | |
| }); | |
| var createButton = Ti.UI.createButton({ | |
| title: "create files", | |
| top: 20, | |
| height: 50, | |
| width: 250, |
| Titanium.UI.setBackgroundColor('#fff'); | |
| Ti.Geolocation.preferredProvider = "gps"; | |
| Ti.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST; | |
| Ti.Geolocation.distanceFilter = 0; | |
| Ti.Geolocation.purpose = "GPS demo"; | |
| // create tab group | |
| var win = Ti.UI.createWindow({ | |
| layout: 'vertical' |
| var tabGroup; | |
| var win = Ti.UI.createWindow({ | |
| backgroundColor: '#fff', | |
| layout: 'vertical', | |
| exitOnClose: true, | |
| navBarHidden: true | |
| }); | |
| var createButton = Ti.UI.createButton({ |
| var win = Ti.UI.createWindow({ | |
| backgroundColor: '#fff', | |
| layout: 'vertical' | |
| }); | |
| var testButton = Ti.UI.createButton({ | |
| title: "list files", | |
| top: 20, | |
| height: 50, |
| Titanium.UI.setBackgroundColor('#fff'); | |
| // create tab group | |
| var win = Ti.UI.createWindow({ | |
| layout: 'vertical' | |
| }); | |
| var testOneButtonA = Ti.UI.createButton({ | |
| title: "featureEvent.android", | |
| height: 50, |
| <html> | |
| <head></head> | |
| <body style="background-color:#ffffff;margin:10px"> | |
| <script> | |
| var uploadFile = function(){ | |
| var text = document.getElementById('txt'); | |
| var dir = Titanium.Filesystem.getResourcesDirectory(); | |
| sep = Titanium.Filesystem.getSeparator(), | |
| // filename = 'test.txt', |
| <html> | |
| <head> | |
| </head> | |
| <body style="background-color:#1c1c1c;margin:0"> | |
| <div style="border-top:1px solid #404040"> | |
| <div style="color:#fff;;padding:10px"> | |
| Welcome to Titanium | |
| <script> | |
| function openWindow(){ | |
| var win = Titanium.UI.createWindow("app://test.php?fname=Jonathan"); |