Skip to content

Instantly share code, notes, and snippets.

@rakhimoni
rakhimoni / app.js
Last active April 19, 2016 09:36
PustNotification with ti.cloudpush module 3.4.1
var win = Ti.UI.createWindow({
backgroundColor : '#ccc',
title : 'Android Cloud Push Notification'
});
var CloudPush = require('ti.cloudpush');
CloudPush.debug = true;
CloudPush.enabled = true;
CloudPush.showTrayNotificationsWhenFocused = true;
CloudPush.showTrayNotification = true;
@rakhimoni
rakhimoni / app.js
Created March 10, 2016 05:06
ArrowDb csutom object query using limit
(function(){
var ACS = require('ti.cloud'),
env = Ti.App.deployType.toLowerCase() === 'production' ? 'production' : 'development',
username = Ti.App.Properties.getString('acs-username-'+env),
password = Ti.App.Properties.getString('acs-password-'+env);
// if not configured, just return
if (!env || !username || !password) { return; }
/**
* Appcelerator Cloud (ACS) Admin User Login Logic
@rakhimoni
rakhimoni / index.js
Created April 6, 2016 06:17
Custom search in listviews(windows)
var _listItems = [];
function searchChange(evt) {
_listItems = [];
if (evt.value) {
Ti.API.info(evt.value);
$.list.searchText = evt.value;
for (var i = 0,
j = listItems.length; i < j; i++) {
@rakhimoni
rakhimoni / app.js
Created April 11, 2016 11:49
Facebook login & logout
var fb = require('facebook');
var win = Ti.UI.createWindow({
title : 'Login/Logout',
backgroundColor : '#fff',
});
var label = Ti.UI.createLabel({
text : 'Logged In = ' + fb.loggedIn,
color : '#000',
font : {
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
var https = require('appcelerator.https');
var securityManager = https.createX509CertificatePinningSecurityManager([
{
@rakhimoni
rakhimoni / app.js
Created May 12, 2016 05:08
This example is only able to capture video on the iOS platform.
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title : 'Tab 1',
backgroundColor : '#fff'
});
var camera = Ti.UI.createButton({
title : 'Camera',
height : 50,
@rakhimoni
rakhimoni / app.js
Created May 17, 2016 10:17
Working with openPhotoGallery and get image vales
var win = Ti.UI.createWindow({
backgroundColor:'#336699',
});
var view = Titanium.UI.createView({
borderRadius:10,
@rakhimoni
rakhimoni / index.js
Created May 24, 2016 12:10
Listview sample app
var date = new Date();
Ti.API.info('populateList end' + date.getTime());
var performanceData = [];
for(var i=0,j=2; i<j; i++){
performanceData.push({
"template" : "performance",
"codeLabel" : {
"text" : "P1"
@rakhimoni
rakhimoni / intractions.doc
Created June 1, 2016 08:36
How to install appxbundle on windows phone
To install appxbundle on windows phone via computer we need to make sure the windows device is unlocked and Microsoft visual studio is installed in the computer. Check the following steps:
Step 1. Connect the windows phone to the computer. Open Microsoft visual studio> Navigate to Tools> Windows Phone 8.1 > Application Deployment
Step 2. Select the target to device and browse the appxbundle from computer.
Step 3. After waiting some time, the application deployment window will provide the app completion status. Then press Deploy button and check in the windows phone device .
@rakhimoni
rakhimoni / index.js
Created June 2, 2016 06:45
Windows: Load local content into webview
$.index.open();