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
Created May 22, 2019 18:07
TableView with custom row sample code.
var win = Ti.UI.createWindow({
backgroundColor : '#fff',
layout : 'vertical'
});
// Create a TextField.
var textValue = Ti.UI.createTextField({
height : Titanium.UI.SIZE,
top : 10,
@MotiurRahman
MotiurRahman / app.js
Last active May 10, 2019 08:50
Android: WebView eval JS timeout error android v5.0.X only.
var win = Ti.UI.createWindow({
title: "Test Motiur Rahamn"
});
var view = Ti.UI.createWebView({
url: "test.html"
});
win.add(view);
view.addEventListener('load', function() {
Ti.API.info('WebView load listener called');
@MotiurRahman
MotiurRahman / app.js
Last active May 6, 2019 18:40
Count Test
var ArrowDB = require('arrowdb'),
arrowDBApp = new ArrowDB('zMQgYUudYAS1eJhjvS5nv8GhpN5aGs4E');
arrowDBApp.usersLogin({
login: '[email protected]',
password: '1234'
}, function(err, result) {
if (err) {
console.error(err.message);
} else {
console.log(result.body.response.users[0]);
@MotiurRahman
MotiurRahman / app.js
Created March 22, 2019 13:01
selectionstyle example
var win = Ti.UI.createWindow({ backgroundColor: 'white' });
var data = [{
properties: {
title: 'Title',
subtitle: 'Subtitle',
image: 'KS_nav_views.png', // not used by this template
accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE,
selectionStyle: Titanium.UI.iOS.ListViewCellSelectionStyle.BLUE
@MotiurRahman
MotiurRahman / expandableListView.js
Created March 19, 2019 16:26
Expandable ListView
function list_View() {
var indicatorOpened = "[-]";
var indicatorClosed = "[+]";
var exampleList;
//Simple window for demo purposes
var window = Titanium.UI.createWindow({
backgroundColor: "white",
fullscreen: true,
title: "Collapsible listview example"
@MotiurRahman
MotiurRahman / Privacy Policy
Last active December 9, 2019 14:25
Privacy Policy
Md Motiur Rahman built the oldTest app as a Free app. This SERVICE is provided by Md Motiur Rahman at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Age Calculator unless otherwise defined in this Privacy Policy.
Information Collection and Use
@MotiurRahman
MotiurRahman / app.js
Created February 8, 2019 13:50
Foreground Service
function monitorLocation() {
function start() {
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;
Ti.Geolocation.addEventListener("location", function(e) {
Ti.Media.vibrate();
Ti.API.info("@@@ Location Received: " + JSON.stringify(e.coords));
});
}
var hasPermission = Ti.Geolocation.hasLocationPermissions(Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE);
if (!hasPermission) {
@MotiurRahman
MotiurRahman / alertDialog.js
Last active January 30, 2019 13:12
Simple commonJS pattern
// place this file to the lib folder
function alertDialog() {
var win1 = Titanium.UI.createWindow({
title: 'Tab 1',
backgroundColor: '#ccc',
layout: "vertical"
});
// Create a Button.
var aButton = Ti.UI.createButton({
@MotiurRahman
MotiurRahman / log.txt
Created January 25, 2019 13:36
storekit module issue.
Operating System
Name = Mac OS X
Version = 10.13.6
Architecture = 64bit
# CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 10.14.1
@MotiurRahman
MotiurRahman / App.js
Created January 23, 2019 16:02
Open Titanium app through intent.
/**
app.js file for target App.
*/
var win = Ti.UI.createWindow();
/*Ti.Android.currentActivity.addEventListener('newintent', function(e){
alert('onNewIntent');
});*/
// Create a Button.