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 url = "https://www.appcelerator.com"; | |
var xhr = Ti.Network.createHTTPClient({ | |
onload: function(e) { | |
// this.responseText holds the raw text return of the message (used for JSON) | |
// this.responseXML holds any returned XML (used for SOAP web services) | |
// this.responseData holds any returned binary data | |
Ti.API.debug(this.responseText); | |
alert('success'); | |
}, | |
onerror: function(e) { |
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
{ | |
"fighters": [ | |
{ | |
"name": "Muhammad Ali", | |
"nickname": "The Greatest" | |
}, | |
{ | |
"name": "Chuck Liddell", | |
"nickname": "The Iceman" | |
}, |
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
Ti.UI.backgroundColor = '#dddddd'; | |
var url = "https://raw.github.com/appcelerator/Documentation-Examples/master/HTTPClient/data/json.txt"; | |
var win = Ti.UI.createWindow(); | |
var table = Ti.UI.createTableView(); | |
var tableData = []; | |
var json, fighters, fighter, i, row, nameLabel, nickLabel; | |
var xhr = Ti.Network.createHTTPClient({ | |
onload: function() { |
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
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
intent.addCategory(Ti.Android.CATEGORY_DEFAULT); |
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
intent.putExtra(Ti.Android.EXTRA_TEXT, 'Some text that we want to share'); |
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_SEND, | |
type: "text/plain" | |
}); |
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
Ti.UI.backgroundColor = '#000000'; | |
var win = Ti.UI.createWindow(); | |
var label = Ti.UI.createLabel({ | |
text: 'Say Something!', | |
color:'#eeeeee', | |
font: { | |
fontSize:'20dp', | |
fontWeight:'bold' | |
}, |
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_SEND, | |
type: "text/plain" | |
}); | |
intent.putExtra(Ti.Android.EXTRA_TEXT, 'Some text that we want to share'); | |
intent.addCategory(Ti.Android.CATEGORY_DEFAULT); | |
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
<!-- TI_APPLICATION --> | |
<activity android:name=".IntentFilterTestActivity" | |
android:label="Intent Filter Test" android:theme="@style/Theme.Titanium" | |
android:configChanges="keyboardHidden|orientation"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
<intent-filter> |
NewerOlder