Community Questions & Answers
SkImageDecoder::Factory returned null when doing a HTTP Request on Android with Ti3.0.0+ and Alloy
Hi Guys, I've noticed some strange behavior when making a HTTP Request using HTTPClient on Android. I was previously using the 2.1.4GA SDK, but had to start using 3.0.0GA+ today after I updated Titanium Studio, the Titanium CLI and Alloy this morning....
PUSHing to a REST API
So I am able to use GET commands to get information from a RESTful API no problem. However, I can't find any clear examples or documentation on how to PUSH new data. Supposedly I can set up a JSON object and change the command in the httpclient from...
pdf file is loading on iphone simulator not on device
I integrated with web-service and downloaded the pdf file and display on webview. For Simulator its working fine, but for iphone/ipad device its not displaying. please let me know what i need to do more. Below is my code In...
How to sharing Safari cache with WebView and Network.HttpClient the way Android Does with Chrome
I'm using the Modules.Facebook framework to log into the application that is being released on both iOS and Android. On Android, after logging into Facebook successfully via Modules.Facebook, both webviews and HttpClient calls recognize Facebook is...
send data sqlite to server mysql
Hello I would like you can help me in sending data from a table in Sqlite in my app, are 51 records with different fields, and this I send it to a server, but ..... the problem is that I would like to send a single once all the data to the external...
Httpclient status code coming as 0
When I test my app on the android emulator and the post request failed, in the onerror hander this.status is coming as 0, wheres in iOS it seems to have a correct status code ie 401. What might be the problem? here is the code I am using to make the...
Android HTTPClient removing request header
Hi, I'm writing a YouTube video uploader for Titanium. All works fine on iOS and joy of joy I have problems with Android. A few things. ~~~ /* This is for a resumable upload */ xhr.open('POST',...
ACS push data from browser to Titanium cloud server
Hi Everyone, The past few days I had been trying to push data to the Titanium cloud server from a browser. I had been using javascript to do the HTTPS request and it works fine when I am trying to log in. ~~~ function simpleHttpRequest() { var...
upload files
Hello I would like to help with this problem, which is to take all the pictures taken with my camera and send them to a server ..... I think I have a variable for each photo and deliver them client.send ({"image1" : imagen1.png, etc}) I have...
Problem with ImageView.setImage(<blob>) on Mobile Web
I am trying to figure out a way to be sure that an ImageView is "loaded" before I perform any actions on it (on Mobile Web) - so far without success. I tried using HTTPClient, which downloads ok, but the ImageView.setImage() method does not seem...
No HTTP response
I have a datastructure in a seperate JS file. In that datastructure there is a function that calls a HTTP request. This worked on android, but now on iPhone the `onerror` and `onload` dont get called. The console prints this ~~~ [WARN] Creating [object...
Retrieving file and sending over HTTPClient sends wrong TiBlob filename. Anyone know of a fix?
//SAVE FILE PATH TO DB AND FILE TO FILESYSTEM function saveFile(e) { var currentTime = new Date(); var month = currentTime.getMonth() + 1; var day = currentTime.getDate(); var year = currentTime.getFullYear(); var blob =...
upload image tu server
Hello I need your help please. I'm trying to upload an image file to my server type from an application in android, using the latest Titanium SDK version. I have this code that modifies watching other questions of different users with similar cases that...
RSS Feed Load New Window
Hi, I am attempting to load a new webview with a "back" button with a click of a tableview row. The issue is that when clicking the row, the window comes up correctly, but does not actually load any content. I'm at a loss of ideas for this...
OpenID Authentication
Hi, it is possible to authenticate an OpenID with titanium? Thanks for any help :)
How can I see the request headers in http client along with the post message? / httpclient problem
Context: Android device, 4.0.3. Titanium SDK 3.1. Using alloy framework. ----- We are trying to locate a bug. I would like to know what my mobile is actually sending in the request. (At this time I've only seen the possibility to get the response...
Populate a variable using an httpclient call
I am attempting to populate a variable in a module by calling remote data using the httpclient. I am doing so by calling a function as follows: ~~~ var currCity = getCurrCityName(); ~~~ And here is the function: ~~~ function getCurrCityName() { ...
Abort of sending by HTTP Client. Show progress of send / receive characters stream.
I am sorry for my English. I will give my best to ask my question. I am new in Titanium and Javascript. My System: IDE : Titanium 3.1.0, OS : Mac OS X 10.8.3, Memory: 4 GB, Developing for iOS and Android. I must send a photo to an server and receive...
Try/catch
I need to turn this into an if/else or try/ catch... I've tried both without success ... this is what I am trying to do .... if the app connects and transmits data then delete table in database, else if it does not connect and transmit then do nothing at...
getResponseHeader not working in onreadystatechange function
Hi Community, Is there any possibility to use getResponseHeader("Last-Modified") function in the onreadystatechange function? I tried it but I am getting NULL in response! What I wanted to achieve is, download resource from server only if it...
httpPostClient status is 500, but response text is normal, and the post information is not sent?
I am sending an image from an http client to a web server. ~~~ xhr.onload = function(){ Ti.API.info("code: "+this.status + " - " + JSON.stringify(this)); } Ti.API.info('Uploading...
xml parsing problem
~~~ Ti.UI.setBackgroundColor('#fff'); var win=Ti.UI.currentWindow; var url='url'; var xhr=Ti.Network.createHTTPClient(); xhr.onload=function(){ var xml=this.responseXML; Ti.API.info(this.responseText); }; xhr.onerror=function(){ alert('try...
httpclient onload not handling conditions
I am trying to get the httpclient to process some code based on the responseText value. This works: ~~~ var client = Titanium.Network.createHTTPClient(); client.onreadystatechange = function () { alert(this.responseText); } ...
Read XML Title
Hello, i want to read Part of XML: ~~~ <whereru:SessionID>XXXX</whereru:SessionID> // READ <whereru:Meldung>Login erfolgreich.</whereru:Meldung> //READ <whereru:Teilnehmerliste> <whereru:Teilnehmer...
regression error on httpclient
Several months ago, I learned how to use the http client in mobile iOS apps (primarily iPhone apps). Last week, I upgraded from Titanium mobile SDK 1.7.3 to 1.8.1 and now the code fails. Today, I boiled down the problem to the example below. It is a real...
get php parameters
Im trying to implement a GET request to a PHP file which is just echo the parameters that get. The app gets the value of a textArea and make a get request to my php file, the request is working properly but if im trying to send "error" form the...
Webservice, XML Response Request, onreadystatechange
###Hello there, ###since a few days i have a problem and i have no idea remaining. Please help! ###I want to send a xml request and become a xml response. ###Then i want to read some information out of the xml response. ### create xml ~~~ ...
Probem with a the WAMP server connection
Hello everyone, I am trying to connect to the WAMP server installed in my PC and using this code: ~~~ var mybouton = Titanium.UI.createButton({ title:"connect", height:"auto", width:150, bottom:10 }); var mytflogin =...
HttpClient request Not work for iPhone
Hello Friend, From last coupele of days i stuck in an issue. For my app i need to call an API. I make Http request it works fine for Android and not for iPhone. Here is the code :- ~~~ var addrReq =...
createHTTPClient SOAP response null when attachment returned
Hi, I'm calling a webservice through SOAP. Basically we parse the SOAP request manually (including a XML attachment). This works fine, we're receiving a response containing the SOAP envelope and the XML attachment. The response looks like...
Using X.509 client certificate as method of user authentication ?
Hello, is there any way to use Titanium.Network.HTTPClient or another known module, Tiitanium API, etc. to open a SSL connection to a server and authenticate the user via a X.509 client certificate ? My question relates to Titanium SDK 3.1 since there...
Retrieve cookies from webbrowser to app ?
Hello, I read a lot of stuffs concerning cookeis / authentication, but I cannot figure how I could open a webpage with a webbrowser from titanium, log me in and retrieve the cookie in the app. That is the last point that I miss. It is so much easier to...
Problem with Network HTTPClient & SOAP on SDK 3.x - TimeOut
Hello, i'm working on iOS, 6.1.x, with sdk 3.1.0. I've a problem with HTTPClient and SOAP upgrading my app from SDK 2.x to 3.x. I obtain always a timeout (xhr.readyState==4 && xhr.status==0). My code, that works perfectly on SDKs < 3,...
ASIHttpRequest Timeout Error
Hi Guys, Using Titanium SDK 2.1 Running on iOS SDK 5.0+ I have now spent 3 days searching for a solution to the problem on "ASIHttpRequest Timeout Error" on HttpClient object running on iOS platform while uploading a large image of size 4 MB....
setRequestHeader not working on iOS
Here is the issue. I have created an object that handles requests for the REST API of a server. The object has an `initClient` function: ~~~ MarketingServer.initClient = function(loadingView, onError, onLoad) { var self =...
Loading Remote Json data in the background
I have an app that has a number of tables contained in views. The table data is downloaded from Json files on my server and this is done as soon as the app loads by including the views as functions in my app.js, when the user opens a view the table is...
HTTPClient returning a false timeout on 3G only.
Hi. I've got an app running on an iPhone. Works fine in the simulator. Upload it to my phone (3GS with 4.0.2) and after a post to an HTTP Client I get the following error: error = "Error Domain=ASIHTTPRequestErrorDomain Code=2\"The request...
ASIHTTPRequestErrorDomain Code=2 while connecting from iOS to .net Webservice
We're building an application for mobile devices, namely iPhone and Android Smartphones. Part of it's functionality is sending a HTTP Request to an .net Webservice running on IISExpress. The function which calls the service looks something like...
How get all videos from a youtube's User?
There's a way to get all videos from an user? i.g -> get all videos from www.youtube.com/UserName I want to get all videos links, thumbnails and legth of the videos... can I do that? Thanks
How to get a large HTML content of Websites in Android
Hey, I need to fetch the html source of some websites, the html is so long, how can i get all or save them in my local; I used HTTP request but i think its not working properly. I need this code for Android my code is this: ~~~ var xhr =...
Map with Google Json
I hope this helps every one ~~~ var win = Ti.UI.createWindow({ title: 'Map Google' }); var address = Ti.UI.createTextField({ hintText: 'Your Address', top: 60, width: 400, left: 10 }); var ok = Ti.UI.createButton({ title: 'Show Map', top:...
Problem with large amount of remote JSON data
Hello, i'm downloading a large amount of data (6MB) with httpClient. I use JSON.parse(this.responseText) to use the data and save then in sqlite. In some devices (tablet samsung galaxy note, samsung galaxy ace) the first time the data is downloaded it...
Titanium.Network.HTTPClient POST does not seem to be a proper post
I'm using the Titanium.Network.HTTPClient to communicate with a web service. I've used the examples from the Kitchen Sink app and I'm able to get things working with GET. However using a POST for authentication using parameters username, password, the...
Titanium HTTPClient Authentication Help
Yes, I am having trouble connecting to a webservice via titanium. Here is my code JUST FYI, I have not disclosed the URL or credentials as they belong to a client and need to remain that way ~~~ var xhr = Titanium.Network.createHTTPClient(); xhr.onload =...
Problem in posting JSON data
Hi Everyone, I want to post JSON data using HTTP request. I have read the official [docs](http://docs.appcelerator.com/titanium/latest/#!/guide/Handling_Remote_Data_with_HTTPClient_and_JSON) and I am working according to them. I am using the following...
Unreadable image file sent to remote server.
Type: mobile TSDK: 3.0.0.GA Platform: IOS SDK 6.0 Device IPhone simulator Host OS: Mountain Lion 10.8.2 Xcode 4.5.2 Titanium Studio Version: 2.1.2.201208301612 I can send the jpg file to the remote server (REST) but the file becomes...
parameter of send httpclient
hi i want to know is it possible to send an array with dimension N in parameter to httpClient ? if yes how to do it? cordialy
httpclient (xhr) in .js
I need a httpclient in a. Js My problem is that it returns undefined. Any suggestions? called ~~~ //conexion.js conexion = function(datosClase){ var xhr = Titanium.Network.createHTTPClient({ onload: function(e) { return...
callback function... help me please!!!
i've a array with elements content one url of the json data: ~~~ jsonData['programas'] = 'https://eurekalab.com.mx/apps/radiocongreso/index.php?option=com_obrss&task=feed&id=2'; ~~~ and i've a function to read this array and save in file for each...
callback function... help!!!
hi i need help to solve this: i've a config.js with this: // array with elements content one url (json data) jsonData['programas'] = 'https://eurekalab.com.mx/apps/radiocongreso/index.php?option=com_obrss&task=feed&id=2'; and jsonLoad.js,...