This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParameterByName(target,name){ | |
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); | |
var regexS = "[\\?&]" + name + "=([^&#]*)"; | |
var results=target.match(regexS); | |
if(results == null){ | |
return ""; | |
}else{ | |
return Ti.Network.decodeURIComponent(results[1].replace(/\+/g, " ")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
var apiAccessData={ | |
user_name:'your_user_name_here', | |
api_key:'your_api_key_here', | |
base_url:'https://app.getblimp.com/api/v2', | |
app_id:'815e71539d113d681e3a365b96ddd1984ca8955a' | |
} | |
// | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onMenuClick(e){ | |
if(e.source.id!=='row'){ // row is user-defined | |
var selectedRowId=e.source.parent.rowId; // rowId is user-defined | |
}else{ | |
var selectedRowId=e.row.rowId; | |
} | |
alert(selectedRowId) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// what will happen after the request? define your callbacks here! | |
var onSuccessCallback = function (e) { | |
// you'll receive: | |
//e.data | |
//e.status | |
//e.code | |
// | |
Ti.API.info(e.data); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var intent = Ti.Android.createIntent({ | |
action: Ti.Android.ACTION_MAIN | |
}); | |
intent.addCategory(Ti.Android.CATEGORY_HOME); | |
Ti.Android.currentActivity.startActivity(intent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var touched = false; | |
tableview.addEventListener('click', function(e) | |
{ | |
touched = false; | |
}); | |
tableview.addEventListener('touchstart', function(e){ | |
touched = true; | |
setTimeout(function(){ | |
if (touched) | |
alert("Long press"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android xmlns:android="http://schemas.android.com/apk/res/android"> | |
<tool-api-level>14</tool-api-level> | |
<manifest> | |
<application android:theme="@android:style/Theme.Holo"></application> | |
</manifest> | |
</android> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var onSuccessCallback = function (e) { | |
var response=JSON.parse(e.data); // the magic happens with here | |
response.forEach(function(value, index, arr){ | |
var tweet=value.text; | |
var created=value.created_at; | |
var source=value.source; | |
var user=value.user.screen_name; | |
var out=tweet + '\n' + 'Date: ' + created + '\n' + 'From: ' + source + '\n' + 'By: ' + user + '\n\n'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var onSuccessCallback2=function(e){ | |
Ti.API.info(e); | |
} | |
var url='http://www.posttestserver.com/post.php'; | |
// this is the data you'll send to the web service | |
var payload={ | |
property1:'value1', | |
property2:'value2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var onSuccessCallback = function (e) { | |
var response=JSON.parse(e.data); // the magic happens with here | |
var tweetdata=[]; | |
response.forEach(function(value, index, arr){ | |
var payload={ | |
tweet:value.text, | |
by:value.user.screen_name, | |
when:value.created_at, | |
source:value.source |