Skip to content

Instantly share code, notes, and snippets.

View MotiurRahman's full-sized avatar

Motiur Rahman MotiurRahman

View GitHub Profile
@MotiurRahman
MotiurRahman / app.js
Last active December 28, 2015 00:59
ListView with multiple templates and events
// ListView with Multiple template and events
//Hi, I have created four custom template and event.
//And add data in a section whose property is coming from custom template.
//And event fire in each template.
var win = Ti.UI.createWindow({
title:'Multiple Templates',
backgroundColor:'#000'
@MotiurRahman
MotiurRahman / app.js
Created November 21, 2013 00:59
Adding Menu to Action Bar in Tab Group apps
// Hi, Here create a tabGroup and add a action bar menu named Action Menu.
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Ti.UI.createWindow({
backgroundColor : '#000'
});
var win2 = Ti.UI.createWindow({
backgroundColor : '#000'
@MotiurRahman
MotiurRahman / App.js
Last active December 29, 2015 13:49
Android and IOS: Remote database synchronization with CommonJS Module. Insert update delete locally as well as remotely
/*1. I Create a simple apps
2. Here a simple database table with 3 fields [id, title and descriptions]
3. In root window will display data from database
4. Here Added edit and delete options in each row, user’s can edit/delete data from database table
5. Add database synchronizer to remote web server (such as ACS) We can create user and insert
data, update data, delete data to the Wev server as well as local database.
6. When user’s close this apps, local database will synchronize with remote database */
@MotiurRahman
MotiurRahman / App.js
Created November 28, 2013 18:46
Android and IOS: Generate list with ACS Custom Objects CommonJS Module
/* Hi here create a custom object named title which save to the remote acs and show
this in a tableView list form the remote acs.
*/
Cloud.Users.login({
login : '[email protected]',
password : '1234'
}, function(e) {
@MotiurRahman
MotiurRahman / App.js
Last active January 26, 2016 17:20
Adnroid: Open new activity on notification clicked
/* Here create a notification if you click the Add Notification button notification will start and if you
close the app and click the notification the app will start again.
*/
var win = Titanium.UI.createWindow({
backgroundColor : '#000'
});
// Create a Label.
var Test = Ti.UI.createLabel({
@MotiurRahman
MotiurRahman / app.js
Last active December 29, 2015 16:59
Android and IOS: Photo upload in Facebook with CommonJS Module
/* Hi after login the facebook, just click the upload photo button and photo will be
uploaded in facebook
*/
var fb = require('facebook');
fb.appid = APP_ID;
fb.permissions = ['publish_stream'];
fb.authorize();
@MotiurRahman
MotiurRahman / App.js
Last active December 29, 2015 22:49
Android and IOS: Read/write contents (100 objects) to file and generate Table view. CRUD operation of a file.
/* Here create a file you can perform here read,insert,update,delete that means CURD operation */
var file = require('ui/common/FileView');
var fileView = new file();
fileView.open();
@MotiurRahman
MotiurRahman / App.js
Last active December 30, 2015 03:19
Android and IOS: User Locations tracking apps (last 100 location)
/* Here if you enable your location service of your set and internet connection it takes the locatio from GPS and save in a
file and it will be shown on a tableView row*/
var location = require('ui/common/UserLocation');
var userLocation = new location();
userLocation.open();
@MotiurRahman
MotiurRahman / app.js
Last active December 30, 2015 08:19
Android and IOS: Push Notification without user login
/* Hi Here is the push notification sample code if you installing this apps code in your device when send any push
notification message from ACS web it will show your notification bar if you loggedin in your apps*/
var Cloud = require("ti.cloud");
function loginUser() {
// Log in to ACS
Cloud.Users.login({
@MotiurRahman
MotiurRahman / app.js
Last active December 30, 2015 16:29
Android: Cursor not showing up when clicked in Text fields
/* I have tested this jira ticket and it dose not reproduce again.
It works fine when click the text Fields show Cursor.
Testing Environment:
Titanium SDK:3.0.2 and later
Android SDK: 4.1 and later
Steps to Reproduce:
1.create a simple project.
2.Paste this code in app.js and tiapp.xml