titanium-mobile

How to create a request string with passing different values in Titanium?

痴心易碎 提交于 2019-12-08 14:04:50
问题 I am creating a URL-String like this: URLString = %@sale-ws/lots/sales?yardNumber=%@&saleFromDate=%@&range=%@&saleToDate=%@&pageSize=%@&pageNo=%@&sortBy=%@&sortType=%@&filterStartYear=%@&filterEndYear=%@&filterMake=%@&filterModel=%@&filterLocationId=%@&filterLane=%@&filterSellerId=%@&searchInSearchString=%@ So in Titanium i want to pass the values dynamically into a given string. I tried this one but did not get a proper response. var urlParameterStringNew =String.format(URLString,Alloy

Calculate latitudeDelta and longitudeDelta in titanium maps [Android]

不羁的心 提交于 2019-12-08 11:31:23
问题 I need a help in showing the correct zoom level in Titanium maps for Android. I am showing the route from current location to some other location.The distance is different every time. Can it be possible that I calculate the values of latitudeDelta and longitudeDelta based on the distance and show the map zoomed up according to that? If yes, how could it be possible? Thanks in advance! 回答1: As the the documentation states the smaller the delta value, the closer the zoom on your map. That means

Get contact details to titanium from native iOS contact app

喜欢而已 提交于 2019-12-08 06:27:59
问题 I'm new to Titanium. Currently I'm working on a project in this the user needs to use the contact details from iOS contacts App. My app.js looks like this Window = require('ui/handheld/ApplicationWindow'); var win = Window(); win.open(); var button = Ti.UI.createButton({ title : 'Show Contacts', width : 100, height: 50, }); win.add(button); button.addEventListener('click',function(e){ Titanium.Contacts.showContacts({ }); }); When I click on a button the following code is displayed: And when I

Xml data into tableview

六眼飞鱼酱① 提交于 2019-12-08 03:28:13
问题 I asked a similar question and got answer to it, now i come to another bump in the road. I am basically trying to get first the county names in an tableview, and then when i press on a county, all the cities that are in that county should create a tableview, and then all the company that is in that city should appear in a tableview, and the finally a window with some detail about the company. Here is my code: Best regards! Filip XML Code: <?xml version="1.0" encoding="UTF-8"?> <food_company>

Get contact details to titanium from native iOS contact app

浪子不回头ぞ 提交于 2019-12-08 02:45:42
I'm new to Titanium. Currently I'm working on a project in this the user needs to use the contact details from iOS contacts App. My app.js looks like this Window = require('ui/handheld/ApplicationWindow'); var win = Window(); win.open(); var button = Ti.UI.createButton({ title : 'Show Contacts', width : 100, height: 50, }); win.add(button); button.addEventListener('click',function(e){ Titanium.Contacts.showContacts({ }); }); When I click on a button the following code is displayed: And when I select an contact the detail is displayed on the other screen: But I don't want this, When the user

Titanium Creating Image file: file.write(blob) not creating the correct file

独自空忆成欢 提交于 2019-12-07 05:21:38
问题 I am trying to read a .PNG file using Titanium 1.8.1 Here is my code to read file. var f = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'KS_nav_views.png'); var blob = f.read(); When I create a new file using the above blob object, the new file thus created is not same as the original file. Here is my code to create the new file. var outputDir = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory,'output'); outputDir.createDirectory(); var newFile = Titanium

How to retrive values from Database in Titanium Alloy?

烂漫一生 提交于 2019-12-06 22:47:33
I'm new to Titanium API. I want to know how to retrieve values from DB and display in UI. I created a model and inserted a row. My code is as below, Model: var moment = require('alloy/moment'); exports.definition = { config : { "columns": { "id":"text", "LanguageName":"text" }, "adapter": { "type": "sql", "collection_name": "UserLanguage" } }, extendModel: function(Model) { _.extend(Model.prototype, { }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { }); return Collection; } }; View: <Alloy> <Window id="changeLangWindow" title="Plan India"> <Picker

Appcelerator Titanium: how to record video?

橙三吉。 提交于 2019-12-06 12:05:53
How to record video in Appcelerator Titanium and store in a specific location ? I am using an Android 2.3.6 device. This gist: https://gist.github.com/832488 does not seem to work as suggested / expected. It starts the video capture intent var intent = Titanium.Android.createIntent({ action: 'android.media.action.VIDEO_CAPTURE' }); as an activityForResult but the callback in Titanium.Android.currentActivity.startActivityForResult(intent, function(e) { ... }); is never called, none of notifications in code appear and the video is stored in some default location. The KitchenSink app does not

Memory Leak in Titanium tabbed iPhone application

℡╲_俬逩灬. 提交于 2019-12-06 07:15:26
this has been giving me a headache for a couple weeks now -- hope somebody can help. I'm building an app for iOs 5.0, using the 2.1.4 SDK in Titanium mobile. My app pulls data from a database, and displays it in a scrollableview using labels and a table. I've noticed that it crashes after a while, and according to instruments, the views within the scrollableView, along with the labels and tableviews, are never released from memory. I use a lot of commonJS, and my code looks someting like this (stripped down): The ApplicationWindow module, which I call from app.js function ApplicationWindow

Exception Occured While Building Android project

戏子无情 提交于 2019-12-06 06:24:54
问题 OS: Linux mint 14. Following error occurs when I try to run my project. [TRACE] Writing out AndroidManifest.xml [ERROR] Exception occured while building Android project: [ERROR] Traceback (most recent call last): [ERROR] File "/home/aqeel/.titanium/mobilesdk/linux/3.1.0.GA/android/builder.py", line 2528, in <module> [ERROR] builder.build_and_run(False, avd_id, debugger_host=debugger_host, profiler_host=profiler_host) [ERROR] File "/home/aqeel/.titanium/mobilesdk/linux/3.1.0.GA/android/builder