Community Questions & Answers
binary data store in file and load it into pdf
I send soap request to web services which return pdf file in binary formate. i store the binary formate data locally into a file and trying to load content into webview. I am unable to load pdf data into web view ~~~ onload funtion(e){ var ResponseData...
Open & write a file outside the Titanium work space
Is it possible to open & write a file in D: (D drive) in my hard disk using the write() method ?....
Is there any default method to store logs in a file ?
for example in php we use error_log(); method to store the user defined messages in a file, is there any default method or any other way to do logging in a file ?....
Webview progressbar and webview input file
Hi ! I would like to make a webview with external URL inside (my website's webapp). Everything work except 2 things : - Progressbar : like a progressbar for a webview on Eclipse ( `onProgressChanged(WebView view, int newProgress)` ), how i could have the...
File and TiBlob not working on iOS
Hello, I'm trying to read a file and encoding it on Base64. Everyrhing is working super good on Android but when I use the same code on iOS I can't make it work. This are the exact steps. I take a photo with the camera and save the thumbnail as...
Use JavaScript files (located in applicationDataDirectory) in html
Hi people! I have a problem. I'm trying to show a local html with javascript files in a webview. I have all stored in applicationDataDirectory (images, html and javascript) and I don't know why the html load properly the images but no the...
Use local images in html (Webview)
Hi! In my app I must download a image... i store it in applicationDataDirectory. then i must put the image in a html document and the html into a webview. this is my code: ~~~ function descargarImagen(urlImagen) { var f //Creamos una...
Tell me the way to save images in gallery android.
I had an image view, converted it in blob using img.toImage(), now how to save it in Gallery ? knowing saveToPhotoGallery works for iphone only, I tried to write this object (img.toImage()) to sdcard using this...
Saving multiple images to app directory
Hi peeps, I need to save an image but in more than 1 form, because I need to cache an image thumbnail and fullscreen image at one time. This is what I have done. ~~~ for(var i = 0; i < image.length; i++){ var thumbFilename = image[i].imageName...
How to save rotated pictures
This one has me puzzled. I am writing an app that lets my users collect field data along with pictures. Pictures can be selected from existing photos in the gallery or by starting the camera from within my app. Since the pictures are large and will later...
How to find out how many times a file has been viewed on ACS?
Hi, I'm currently building a video sharing app and I wanna know the number of views on each video, how can I do that? Is there a way to find out how many api calls did a certain file get? Thanks a lo. I really appreciate it. Abdul
Same image loaded multiple times
Hello, currently i got an annoying problem with some images and I hope someone here could help me: I got quite a simple app with 3 tabs, but somehow all the icons I implemented are loaded multiple times upon the opening of the tab they are placed in. I...
Image upload directly from camera
Hey everyone, This is more of a solution than a question. I've just spent the morning trying to work out how to upload an image file. There are a few code examples on here but none of them seemed to work. I think the key is to specify the headers when...
Copy files to Documents directory on first run
In my app I added some code that will move a few folders from a source folder under **images** into the **Documents** folder when the app first runs. The move works perfectly in the simulator, but does not work on an iPhone (running iOS 4.0.1). Is...
access phone memory and external memory in appcelerator
I would like to send file to server from an android device.Is there a way to open file manager in android ?
Move recorder audio file after recording complete
Can anyone tell me what I'm doing wrong here. I get a "undefined is not a function" on the "move" line below. If I take that out and just have the sound player play the tmpFile then it plays so the sound is getting recorded, I just...
How to get the timestamp of a local file
~~~ var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory + '/' + filename); if ( file ) { createTimestamp = file.createTimestamp(); modificationTimestamp = file.modificationTimestamp(); } ~~~ Both createTimestamp and...
Titanium.Filesystem.externalStorageDirectory Problem
HEllo ,I am getting a problem creating a file in external storage root.I want to create a file in a folder called Download in external Storage Directory root.Unfortunately ,Titanium.Filesystem.externalStorageDirectory returns appdata:// instead of the...
Alternative method to load a js file a tabGroup
I have a big problem with no solution for developing apps for android, is there any alternative method to load a js file in a tabgroup without the typical "url: file.js" in the statement. Thanks!!
Uploading file to server with the filename I want.....Can it be done on Android OS?
Hi, I would like to know is it possible to upload an image file to remote server with self-defined filename on Android ? I am struggling to upload the file with the filename I specified. It is always save as something like e.g Tixhr14578943.jpeg in the...
I want create a Database but Database File is empty
Hello, I want create a Database. I use this Code ~~~ exports.createDb = function() { Ti.Database.install('../Resources/testDB.sqlite', DATABASE_NAME); var db = Ti.Database.open(DATABASE_NAME); db.execute('CREATE TABLE IF NOT EXISTS people (name TEXT,...
Real path of Android pictures from photo gallery
Hi, I would like to do image processing on pictures from the photo gallery. So, I'm working on module that works on android Bitmap by reading an image file. From my Titanium application, I open the photo gallery and send the event.media.file.nativePath...
Data directory not writable - device only
Hello all, I have some code below that downloads an xml file, saves it to applicationDataDirectory and then parses and saves down the images listed in the xml. I then have a menu built by parsing the xml that should be saved. On the simulator this works...
Saving blob object to filesystem
Hi guys, I'm retrieving photo from device photo library and the result i get is this: ~~~ { availableFormats = ( "public.jpeg" ); creationDate = "2013-03-27T01:24:24.000+0000"; ...
Need Help to get File on Android SD Card
I've tried to get a File __directly__ from the SD Card but it doesn't work! :( ~~~ var file = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'file.json'); ~~~ nativePath is: __"file:///mnt/sdcard/com.app/folder/file.json"__ any...
Hide afolder on sdcard
Hi guys I have created a folder contains my app images on sdcard & trying to hide folder on sdcard. Also at the time of lauching app I want to retrieve those images. but its not working. Any help is greatly appreciated
local images for Android
Hi, i have downloaded image from httpclient. here how i save the file : ~~~~ var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, filename); file.write(this.responseData); ~~~~ on iOS, i display the image normally like this...
How select multiple images using Titanium ?
i trying to select multiple images. i'm unable to select multiple images using titanium. can some help me to sort out this problem. i need list of selected images or list of files. please help me get out here. i using titanium sdk 2.1.
Webview HTML with relative path includes not working in 3.0.2
Going from Titanium SDK 3.0.0GA to 3.0.2GA, relative paths in my webview's HTML are no longer working (the path doesn't seem to point to the same place anymore). __Here's what I'm working with (simplified):__ my webview: ~~~ var myWebView =...
receiving and parsing big text files
I need to get a text file from remote host for inserting these data into a sqlite Db. ~~~ var xhr = Titanium.Network.createHTTPClient(); xhr.open("GET","http://example.com/file.txt"); xhr.onload = function() { if (this.status ==...
How to run a. apk by code
I want to update the version automatically of my application once downloaded How to run a. apk by code?
Deleting photographs in Titanium.Media
Hi, i got the following code that takes photographs, but i have a problem, i want that this section only provides 1 photograph, for example i can take any number of photographs but i just want to keep the last photograph deleting the other ones, for that...
Need Help to write some Content in File
Hey guys, my project should be an Android App and I want write some content in the following file: var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'file.json'); In internet I've seen that the use the following...
Query files uploaded in the last 24 hours
Hi, How can I only query for files that were uploaded in the last 24 hours? I've tried for a while and just can't seem to get it. Any help would be very much appreciated. ~~~ Cloud.Files.query({ page: 1, per_page: 20, where: { ...
Trouble using Titanium Media
Hi, im new developing for mobiles with android, my problem is that i would like to take a photograph in titanium and after a while i want to upload that picture to a server online, for that i decided to get the image's URL and use it to indicate wich...
Not snle to find Titanium Mobile Project in New project
Hi, I am a fresher to titanium, I din't find Titanium Mobile Project in File- create New Project . I had only three options i.e Titanium Module project, Project, Android Project. So, Please help me in this. Is Titanium Mobile project and Titanium Module...
image to base64
Hi, someone can explain me how can I encode an image file to a base64 string? Thanks
Titanium apk size is too big
Hi, I searched similar questions but could not find an answer, so let me ask it here. I noticed that apps' apk size created by Titanium Mobile are huge. KicthenSink occupies 26.57MB, and even an empty test app weighs 15.95MB. I think this is unacceptably...
Querry a file with first_name not returning file from titanium cloud.
Hi am trying to query and get file on the basis of first_name but its returning an empty array of file, but when I go to cloud I saw there was a file corresponding to that first_name. I am using titanium sdk 2.1.3 GA and ti.cloud module 2.3.0 running app...
Upload photo from Android camera to PHP script
I've been doing a lot of Googling and forum searching to get a photo uploaded from a Titanium Android app. Here's the code I have at present, bound to a button click: ~~~ var button1 = Titanium.UI.createButton({ color:'#fff', title:'Capture', ...
Filesystem limits?
For an upcomming application I need to use the Filesystem or save files remotely on a server. I am trying to determine the possibilities but can't find much in the docs. I need to know this for both iOS and Android. So here goes: Are there any limitations...
file sharing between two devices connected within same wifi network
How can we share file between two devices connected within same wifi network. Need for for ios and android mobile device. Is there any possibility to achieve this using Titanium, if yes could you share some tutorial or starting point to do such thing.
Does Ti.Filesystem.File.exists() always return true?
I'm using the following setup: - Titanium Mobile 1.7.1 stable - Titanium Studio 1.0.1.201106171427 - Mac OS 10.6.7 x86 with all updates - JRE 1.6.0_26-b03-384-10M3425 Here is some code to reproduce the problem. Note that in my app, 'app.js' does exist...
Ti.Compression Module won't fully extract contents of zip file
I'm attempting to use the Ti.Compression module but I am having problems. I'm following the example code to extract a zip file on the device, but it doesn't fully extract the file. For example, if the zip file contains 100 files, the first time it will...
Opening a PDF not working
Hello, I am trying to open a pdf to no avail. I referred to this http://developer.appcelerator.com/question/72361/open-pdf-file-on-android link to see how I could go about opening a pdf. It still does not work. Below is the code. ~~~ var win =...
File Transfer
I to create an app to transfer PDF files and video from my computer to my android device wirelessly. Can someone please tell me as to how this can be done. I have looked at the documentation for filesystem and networking to no avail. I do not want to use...
File Syncing System
Hello, I want to create a file syncing system between my computer and android device. Instead of describing the system I thought I would just give you guys a sample use case of the system. - USER_1 has a computer and an android device - On the laptop...
Simple File Reader and/or File Writer that is Object Oriented
Does anyone know a simple File reader class and/or File Reader commonJS module that I could use? I'd like to just require it and then use it over and over again....
How to get a reference to a file stored inside your Resources directory in order to write to disk?
I would like to take a XML file that is stored inside my Resources directory and write that file to disk on the iPhone. How do I get a reference to that file? I know how to write a file once I have a reference to it.
Specify filename in multipart file upload
I need to upload a JPG image file to an existing service. The service requires an authentication string which is a hash that includes the file name. Therefore, the filename in the hash (determined BEFORE I make the request) must match the file name IN...