Skip to content

Instantly share code, notes, and snippets.

@rakhimoni
rakhimoni / app.js
Last active August 29, 2015 14:12
Data insert error in Titanium
/**
* APP.JS ---which diaplys a form
* want to insert values from this form. But value is not inserted in database. And show error in Ti logs
*
* Ti loggs:
*
*
* [ERROR] : TiHttpClient: (TiHttpClient-1) [31929,31929] HTTP Error (org.apache.http.client.HttpResponseException): Forbidden
[ERROR] : TiHttpClient: org.apache.http.client.HttpResponseException: Forbidden
[ERROR] : TiHttpClient: at ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.handleResponse(TiHTTPClient.java:275)
@rakhimoni
rakhimoni / app.js
Last active August 29, 2015 14:27
Report for investigate an issue with the youtube videos
/** Report for investigate an issue with the youtube videos
* Testing Environment:
* CLI Version = 4.0.1
Titanium SDK Version = 4.1.0.GA
Simulator:iPhone 4,
Android: Google Galaxy Nexus - 4.1.1 - API 16 - 720x1280
@rakhimoni
rakhimoni / Ti logs
Last active October 1, 2015 11:15
Android Push Notification
[INFO] : {"success":true,"error":false,"meta":{"status":"ok","code":200,"method_name":"NotifyTokens"}}
[INFO] : ALERT: (KrollRuntimeThread) [3553,3929] Success
[INFO] : AppCompatDelegate: The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
[INFO] : APSCloudPush: receivePayload: {"android":{"alert":"Welcome to push notifications rakhi"}}
[INFO] : APSCloudPush: background: true
[INFO] : APSCloudPush: queuePayload: {"android":{"alert":"Welcome to push notifications rakhi"}}
[INFO] : APSCloudPush: showTrayNotification
[INFO] : APSCloudPush: getTrayPendingIntent
[INFO] : APSCloudPush: getFocusIntent payload: {"android":{"alert":"Welcome to push notifications rakhi"}}
[INFO] : APSCloudPush: processCallbackIfInstantiated payload: {"android":{"alert":"Welcome to push notifications rakhi"}}
@rakhimoni
rakhimoni / app.js
Last active December 14, 2015 06:54
Android Antivity Indicator
Ti.UI.backgroundColor = 'white';
var win1 = Ti.UI.createWindow({
backgroundColor: 'white',
});
var win2 = Ti.UI.createView({
backgroundColor: 'pink',
height:'300',
width:'300',
@rakhimoni
rakhimoni / app.js
Created December 17, 2015 09:30
Countdown Timer in Ios
var win1 = Titanium.UI.createWindow({
backgroundColor:'black'
});
var duration = 60000 * 5; // 5 minutes
var picker = Ti.UI.createPicker({
type:Ti.UI.PICKER_TYPE_COUNT_DOWN_TIMER,
countDownDuration:duration
});
@rakhimoni
rakhimoni / app.js
Last active January 13, 2016 08:42
customized search bar using Titanium
var win = Ti.UI.createWindow({
top : 20,
backgroundColor:"white",
});
var searchHolder = Ti.UI.createView({
height : 55,
width : '100%',
top : 45,
backgroundColor:"pink",
@rakhimoni
rakhimoni / index.js
Created February 2, 2016 12:03
Webview and html content
var str = "Hello world!";
$.webviewLoad.evalJS("var message='" + str + "';");
$.container.open();
@rakhimoni
rakhimoni / app.js
Created February 3, 2016 12:07
Geolocation
var win = Ti.UI.createWindow({
backgroundColor : '#fff'
});
win.addEventListener('click',function(e){
if (Ti.Geolocation.locationServicesEnabled) {
Titanium.Geolocation.purpose = 'Get Current Location';
Titanium.Geolocation.getCurrentPosition(function(e) {
@rakhimoni
rakhimoni / app.js
Created February 7, 2016 09:27
$in operator in arrowdb cloud event query
/* $in operator in arrowdb cloud event query
Test Environment:
Appcelerator Command-Line Interface, version 5.1.0
Titanium SDK Version 5.1.2.GA
Appcelerator Studio, build: 4.4.0.201511241829Mac OS X,Version = 10.10.11.
**/
@rakhimoni
rakhimoni / app.js
Created February 11, 2016 10:19
How to retrive password value with four digits
var win = Ti.UI.createWindow({
backgroundColor : 'orange',
layout:'vertical'
});
var textField = Ti.UI.createTextField({