Skip to content

Instantly share code, notes, and snippets.

View csemrm's full-sized avatar

Mostafizur Rahman csemrm

View GitHub Profile
@csemrm
csemrm / app.js
Created March 23, 2014 04:48
Titanium ACS post Objects: How to post data in ACS server
var Cloud = require('ti.cloud');
Cloud.debug = true;
var win = Ti.UI.createWindow({
backgroundColor : 'white',
layout : 'vertical',
});
var aTableView = Ti.UI.createTableView();
login();
@csemrm
csemrm / app.js
Created March 2, 2014 06:04
Android: Working example for setActive tab
var win1 = Ti.UI.createWindow({
title : 'Win 1'
});
var button = Ti.UI.createButton({
color : '#000',
style : Ti.UI.iPhone.SystemButtonStyle.BORDERED,
title : 'Set Active Tab 1'
});
@csemrm
csemrm / app.js
Last active January 2, 2016 22:09
View Animation using Titanium appcelerator
/*
Hi, I have tested this issue in Ti SDK 3.3.0.RC. Its working good.
Testing Environment:
Titanium SDK: 3.3.0.RC, 3.2.3.GA
Titanium CLI: 3.2.3
IOS Simulator 7.1
@csemrm
csemrm / alloy.js
Created January 4, 2014 04:41
Alloy: Map view in Titanium 3.2.0.GA http://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map Test Environment Mac OS X 10.8.5 Ti SDK 3.2.0.GA Ti CLI 3.2.0 Android
Alloy.Globals.Map = require('ti.map');
var MapModule = require('ti.map');
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
Titanium.Geolocation.getCurrentPosition(function(e) {
if (e.error) {
alert('HFL cannot get your current location');
return;
@csemrm
csemrm / acs.js
Created December 29, 2013 16:04
Android Push notification using device Tokenin Titanium
var currentUser = null;
var loggedIn = false;
var Cloud = require('ti.cloud');
var categories = [];
var event_types = [];
Cloud.debug = true;
@csemrm
csemrm / app.js
Created December 29, 2013 14:55
Titanium ACS Create post objects with custom object in Ti ACS
var Cloud = require('ti.cloud');
Cloud.debug = true;
var win = Ti.UI.createWindow({
backgroundColor : 'white',
});
var post_photo = Ti.UI.createButton({
title : 'event query',
@csemrm
csemrm / app.js
Created December 28, 2013 18:44
app.js Android: Second time a webview is loaded with a HTML5 video the video does not play
var win2 = Titanium.UI.createWindow({
backgroundColor : 'red',
title : 'Red Window'
});
var win3 = Titanium.UI.createWindow({
backgroundColor : 'blue',
title : 'Blue Window'
});
@csemrm
csemrm / logs
Last active January 1, 2016 02:29
Ti.Media.VideoPlayer stuck in VIDEO_PLAYBACK_STATE_SEEKING_
// Simulator Logs
[INFO] : TC3303/1.0 (3.3.0.v20131220192449.95b274b)
[INFO] : Event PlaybackState Fired: 1
[INFO] : Event PlaybackState Fired: 2
[INFO] : 4
[INFO] : timesSet 1
[INFO] : Event PlaybackState Fired: 1
[INFO] : Event PlaybackState Fired: 4
[INFO] : Event PlaybackState Fired: 1
@csemrm
csemrm / app.js
Created December 16, 2013 12:39
How to prevent Auto Lock in you IOS device when apps are running? You can easily manage auto lock status in titanium. Here is my simple code for preventing auto lock option in iOS.
var win = Titanium.UI.createWindow({
backgroundColor : '#ddd',
});
Ti.App.idleTimerDisabled = true;
alert(Ti.App.getIdleTimerDisabled());
win.open();