Community Questions & Answers

Storing data as JSON in a file or in a database.

Hey! I'm building an app where I need to store some data fetched from a remote web service. I had planned on storing as json instead of in a sqlite database, but I'm just wondering if this is a good thing to do? There's no real reason to it other than...

Probably simple Q regarding commonjs

(Building for both Android and Iphone) Hi I am new to commonjs and this is my problem: On startup of my app, I check if I am connected to the net, if so I grab a fresh json file on a server and I set the fresh json (in "json.js"). In...

Unable to alert the distance (km)

Hi, any expert can explain to me why i will getting 'undefined' is not a function (evaluating 'e.toRad( )') ? Below is my code . hope anyone can assist me. Thanks ! ~~~ var lat1, lon1, lat2, lon2; Number.prototype.toDeg = function() { return this * 180...

writing json data

hello, i have retrieved the json data from a file which is located in assets folder (JSON.txt) ,now i want to write json data to a file(JSON.TXT) ,how it would be possible for me to do that.

fetching Json file from server in alloy

hello, i want to fetch a file from a server (say http://localhost:8080/test/data.json), i used Ti.Network.createHTTPClient() methods to bring data like open(), send(),onerror(),onload() but it is not working. so IS it also neccesary that from server side...

Integration with WordPress

I am developing a application for iPad from which my user will post data to his/her wordpress blog. How can i achieve this. In Google i found some resource regarding this integration but as I was new to Titanium, I am getting confused with those resources....

Autocomplete with AJAX?

Hi guys, I googled a bit around and I saw that jquery was supported in Titanium Mobile in the past and of course still is inside a Webview, which would also work for my problem, but maybe there is another solution for this task: I have a database which...

Working with JSON data

How to get data from JSON structure data? ======== Actually, I'm working on getting a pack of locations based on the input address using Google Geo location API. I did get the package return from google API as JSON data, but I have no idea how to execute...

send form fields variables to JSON webservice

I need to send form fields variables to JSON webservice, how do I do that? here is my code building the form fields... ~~~ var complain_form2 = Ti.UI.createWindow(); var scrollView = Ti.UI.createScrollView({ contentWidth : 'auto', contentHeight :...

get the selected value in a picker

I am trying to get the user's selected value from the picker, but actually my picker has some parameters to make the text centered in a label in it, so how do I get the select value my picker code is here ~~~ var transformPicker =...

Problem with JSON on Android

Titanium SDK : 3.2.3 Platform version : Android 4.2+ Device : Android Emulator Hello, I'm currently developping an iOs/Android application and have trouble with Json. It works perfectly fine on iOs but i can't seem to figure out how to make it work for...

Problems With JSON Parse

Issue: When running parse get "Uncaught TypeError: Cannot read property 'TYPE' of undefined" Code ~~~ var xhr = Ti.Network.createHTTPClient({ onload : function() { // Ti.API.debug(this.responseText); console.log("Start " +...

variable null outside function

Hello, I'm very new to titanium and javascript so please excuse me if my question is a simple one. I have the following lines, can someone please help me understand why console.log(arr); gives me a null value. ~~~ sendit.onload = function() { json1 =...

JSON.parse refuses to work

Hey folks, i have modified the example application for handling remote data, to work for my own JSON API. But it refuses to work. When i execute my code with the android emulator the screen remains white and this is the output of the Studio...

How to process hal+json in Appcelerator

Am using 3.2.2.GA sdk, Alloys and Android Emulator 4.2 for my development. I am unable to parse hal+json format in appcelerator json.parse(), as far I searched, we have to use external lib to work with hal+json. Is it possible to parse it in appcel, **My...

remote json data to local database

Application:Mobile,Titanium studio:3.2.1,Device:Emulator,OS:windows 7,Titanium SDK:3.2.1 Not able to insert data to the database and also retrieve.tried both ways using model and also using sql quires 1)using sql query: controller file ~~~ var...

openDetail of json object

I am creating an application for fetching JSON data from REST API and display the data to Table View an i want to get the json object detail when i click on the tableviewrow index.js ~~~ function openDetail(e) { var controller =...

Paginated JSON Data to Nested Table via Dymanic URL

Application type: mobile Titanium SDK: 3.2.1.201402041146 Platform & version: Web/Android Device: iOS simulator, Android emulator Host Operating System: Windows 7 Hi - I am new to Alloy and still finding my way. I've spent time surfind the web looking...

Paginated JSON data to table

I have set up my table and rows to pull JSON data from my online database, but the problem is that I have paginated data. While my data shows up for the first page, I am unsure of how to set up my JSON pull so it will pull the JSON data from other...

Showing 1-50 of 857 1 2 3 4 5 618