Hampton Roads Drupal Users Group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var currentWin = Ti.UI.currentWindow; | |
// below example would require variable declarations for Name, Description, image, Lat, Longitude | |
// Docs: | |
// http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.Annotation-object | |
// http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.MapView-object | |
// | |
// CREATE MAP VIEW | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// console dump of sample returned object | |
I/TiAPI ( 244): (kroll$4: app://app.js) [797,3312] Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): weatherData => Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): forecastInfo => Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): city => 'Bydgoszcz, Kuyavian-Pomeranian Voivodeship', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This app uses RGraph library to build Android-compatible pie charts using Titanium Mobile. | |
Brief screencast to demo functionality: | |
http://youtu.be/itTEwQmvNfY?hd=1 | |
This was for a work prototype/mockup, so excuse the esoteric text labels and fake activity indicator. | |
I borrowed heavily from prior art. | |
Aaron Saunder's "Titanium Appcelerator Quickie: Google Charts and Appcelerator" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To call, use this statement in app.js: | |
// require('fetchYouTubeJSON').fetchJSONData('https://gdata.youtube.com/feeds/api/users/...'); | |
// fires app-level event to return data, use to populate TableView or similar | |
// | |
// maybe add some cache features? http://pastie.org/1541768 | |
// http://pastebin.com/Eq1DLsdP | |
// once again, ripping from the talented @skypanther | |
exports.fetchYouTubeData = function(url) { | |
// Pulls the JSON feed data and returns it to caller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var googleCountryArray = ["af","sq","sm","ar","az","eu","be","bn","bh","bs","bg","ca","zh-CN","zh-TW","hr","cs","da","nl","en","en-uk","eo","et","fo","fi","fr","fy","gl","ka","de","el","gu","iw","hi","hu","is","id","ia","ga","it","ja","jw","kn","ko","la","lv","lt","mk","ms","ml","mt","mr","ne","no","nn","oc","fa","pl","pt-BR","pt-PT","pa","ro","ru","gd","sr","si","sk","sl","es","su","sw","sv","tl","ta","te","th","ti","tr","uk","ur","uz","vi","cy","xh","zu"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a simple CommonJS module to wrap Titanium Ti.Network.HttpClient calls to interact with Drupal Services. | |
NOTE: Code updated at @TiConf using callback functions. | |
Tested using: | |
Drupal 6.24 | |
Services 3.1 | |
Titanium Mobile SDK 1.8.2 (Android 2.2 SDK) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# inspired by Greg McCormick's (@crushmedianet) post | |
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/ | |
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc. | |
# create following base images + save in APPNAME/Resources/: | |
# appicon-android-512x512.png |
#Overview
I created this simple Staff Directory App as a demonstration for a small internal staff training workshop. Finished product shown below, goal throughout class was to explain code walkthrough and learning resources in pieces, allowing students to create app as a practical exercise.
My goals:
- Show utility of Titanium Mobile to rapidly create simple, x-platform, enterprisey apps (clever term via @thiswayup)
- Demonstrate use of app template (Master/Detail) included as part of Ti Studio.
OlderNewer