Skip to content

Instantly share code, notes, and snippets.

@lbrenman
lbrenman / MOCK_DATA.js
Created August 13, 2016 02:04
Arrow - How to Populate Your Arrow Builder Project With Data
module.exports = {
data: [
{"Name":"Demivee","Type":"Prospect","Phone":"1-(818)173-8443"},
{"Name":"Shufflester","Type":"Prospect","Phone":"93-(232)869-5557"},
{"Name":"Voonte","Type":"Customer","Phone":"62-(269)473-1186"},
{"Name":"Thoughtsphere","Type":"Prospect","Phone":"86-(902)994-3017"},
{"Name":"Zoonder","Type":"Customer","Phone":"1-(202)358-2758"},
{"Name":"Flashspan","Type":"Customer","Phone":"57-(126)114-4912"},
{"Name":"Yoveo","Type":"Customer","Phone":"593-(320)380-5127"},
@lbrenman
lbrenman / app.tss
Created August 12, 2016 01:57
Titanium Master Detail Pass Data from TableView Row Example
/*
This is your global styles file. Selectors and rules you define
here will be applied throughout your app. However, these rules
have the lowest priority of any style settings.
For more information, see the "Style Priorities" section of
http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes
For example, the following would apply to all labels, windows,
@lbrenman
lbrenman / app.tss
Created August 12, 2016 01:54
Titanium Master Detail Basic Example
/*
This is your global styles file. Selectors and rules you define
here will be applied throughout your app. However, these rules
have the lowest priority of any style settings.
For more information, see the "Style Priorities" section of
http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes
For example, the following would apply to all labels, windows,
@lbrenman
lbrenman / places.js
Created August 12, 2016 00:34
Arrow Builder Custom API for Google Places
var Arrow = require('arrow');
var request = require('request');
var apikey = '<YOUR GOOGLE PLACES API KEY>';
var baseurl = 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?radius=500&type=restaurant&key='+apikey+'&location=';
var location = '-33.8670522,151.1957362'
var Places = Arrow.API.extend({
group: 'places',
path: '/api/places',
method: 'GET',
@lbrenman
lbrenman / Lbsfdemoapi.js
Last active July 28, 2016 19:16
Appcelerator Arrow Client SDK Example
var config = {
headers: {},
timeout: 30000,
domain: 'http://localhost',
port: 0
};
var NoCache = 1,
CacheElseNetwork = 2,
NetworkElseCache = 4,

Developer Tip for Managing the Android Soft Keyboard

The Android soft keyboard will display when an input field, such as textField, is in focus (e.g. a finger touch in the textField is sensed by the device). Normally, this is the behavior we want.

However, what if the first screen of your app is a login screen? Then we may not want the keyboard to launch as it may obscure information on the screen that we want the user to see before logging in.

In this case, the reason the keyboard launches immediately is because in the screen above, the textField is the first focusable field on the screen and that is where the focus will be.

@lbrenman
lbrenman / README.md
Last active July 22, 2016 18:51
Appcelerator Titanium Simple Rest Call to Populate a TableView

#Simple Appcelerator Titanium app to make a REST web service call and populate a TableViewRow

Â

@lbrenman
lbrenman / Account.js
Last active July 8, 2016 20:09
Arrow API Swagger Interface
var Arrow = require('arrow');
var Model = Arrow.Model.reduce('appc.salesforce/Account', 'Account', {
fields: {
Name: {
type: String,
description: 'Account Name',
maxlength: 255,
required: true,
optional: false
@lbrenman
lbrenman / MyArrowApp.js
Last active June 3, 2016 17:11
Arrow Client Side SDK Example
var config = {
headers: {},
timeout: 30000,
domain: 'http://localhost',
port: 0
};
var NoCache = 1,
CacheElseNetwork = 2,
NetworkElseCache = 4,
@lbrenman
lbrenman / README.md
Last active June 3, 2016 17:12
Appcelerator Arrow Titanium Client Side SDK Example (SOAP)

Appcelerator Arrow Client Side SDK example

In a prior post, I described how to use the Appcelerator Arrow SOAP connector to expose a SOAP Weather service as a mobile optimized REST API. The Arrow Admin console enables you to test the APIs and also provides sample code to consume the API as shown below:

The Titanium code sample provided in the admin console shows how to manually make an HTTPClient web service call.

Generate the SDK