Created file access using USB in Titanium - android

I'd like to know how can I access the photos that I saved with my Titanium Android app using the USB cable to copy for my PC.
I tried using the Ti.Filesystem.externalStorageDirectory and the Ti.Filesystem.applicationDataDirectory but both saved the file in the device (I could see using the ES File Explorer app) but when the device is connected to computer the same folder is not visible to copy.

AFAIK Ti.Filesystem.applicationDataDirectory will be only limited to your application, so you cannot access it outside the app. But by using Ti.Filesystem.externalStorageDirectory you can save the file to external storage and access it.
Also to make it visible to gallery you have to use scanMediaFiles.
Hope it helps.

Related

as3 Android access csv file in download folder

For my app I want to send the user a text file of data on an e-mail which they save in the download folder on their Android device.
The app will then pull the data from that file and use it in the app. In the desktop version URLLoader works fine with the file copied into the app source directory, but that method does not work on an Android device.
Storage permission is set.
I have tried using the Filestream method and manually copying the file into the app directory on the device, but that does not seem to work.
Ideally I want to be able to set path for the file to the device's download folder so that the user experience is as simple as it can be.
And before you ask, usage will be on wifi only tablets with questionable wifi access - sending e-mails with the file upfront is the only reliable way to handle this.
Thanks for any suggestions.
Adam
In mobile devices the File.applicationDirectory , is a read only folder, try to use File.applicationStorageDirectory
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html#applicationDirectory
https://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html

Hidden area for secret files in Android phone

When I download a pdf file from the Android app, I do not want the user to be able to find it on the phone. Is there such a hidden space on Android phones? I have tried putting a dot in the folder or trying other solutions from the internet but they can reach the windows computers when the phone is connected to the computer via cable. Is there anyone who can suggest a solution?
You should avoid having that file on the external storage completely.
Simply use getFilesDir() for that.
Use the device's internal storage as described in the android docs.
Files stored on the internal storage are only visible to your app and removed when your app is uninstalled.
Source: https://developer.android.com/training/basics/data-storage/files.html

Accessing files from genymotion sd card

I have been using genymoton for quite some time now.
Could someone pls. tell me if there is a way by which I can access the files present in the sd card of genymotion emulator?
Currently I have to upload them to google driver and then download on windows.
You can use shared folder for that. It is well explain on this Google+ post.
Here is the brief:
Go to your VirtualBox VM setting / Shared folder tab
Add a shared folder with the folder you want to shared, and check the "auto mount" option
Start your VM as usual from the Genymotion software
Your shared folder is available in the /mnt/shared directory (multiple shared folders are supported)
This is also possible using the Android Device Monitor.
You already have this if you have the Android SDK installed.
This method works for all connected devices, including emulators like genymotion.
In Android Studio, click the icon that says Android Device Monitor in the toolbar.
(This is also available from Eclipse or you can just type monitor in the command line after moving to the tools folder of your installed sdk)
In the Android Device Monitor, go to the File Explorer tab.
Make sure you have a device selected on the left side.
Find the desired file and select it.
For the sdCard you might need to open the storage folder and open the sdcard there.
Click the button on top that says "Pull a file from the device".
Make sure you select Pull, not Push. Unless if you want to put new files on your device ofcourse.
Save the file to your computer...
and voila! The file from your genymotion is now among your other files on your computer. Ready to be used however you like.
Or alternatively you can also use a third party app like airdroid or any advanced file explorer to exchange files between your device and your computer.
(For installing third party apps you either need to find the apk or flash gapps on your genymotion first and go to the play store.)
Another way that I adopted, just install EsFileEx on genymotion.
Grab your files that you want to copy from e.g
/sdcard/WhatsApp/media/dp.jpeg
Swipe to LAN, here you can see your local machine as 10.0.3.2 or any IP. Here you can access your shared folder/drive of local machine/PC, past copied file here and you done!
NOTE! R/W permission should be set on shared folder/drive of local machine/PC
You can use the eclipse with the ADT plugin and browse the file system like any other android virtual emulators. I have been using this for a while, but eclipse crashes at some times.

Where is android application installed in my sd card

I just want to view the files(especially the .png files) associated with one of the application in my mobile. The application is actually installed(moved) in the SD card.
The issue is ..I could not find the application in the SD card. I am using a file browser called 'File Manager' to browse through the SD card. Can someone help me on this.
It should be here:
/mnt/sdcard/Android/data/your_package_name/
Some hardware implements the path to the external storage different.
/mnt/sdcard/Android/data/your_package_name/
/mnt/sdcard-ext/Android/data/your_package_name/
You may be able to get a better view of what is on the device by using the ADB Shell. If you still have trouble at this point trying running grep or find from the shell.
UPDATE
Most of the time the files associates with your application are in the directory with your application. The application is installed in /data/data/your.package.name/. However you will need root access to get here if you are on a phone, I think the emulator lets you get here. As far as external storage... yea its a pain, to much fragmentation in the market. You have to programmatically check the location of the external storage.
On my device with Android 2.3.6 apps moved on the SD card are located into a directory named .android_secure as .asec files (see http://www.fileinfo.com/extension/asec).
They are not visible from the standard "Archive" browser which shows the hidden directory as empty.
The files are also encrypted so I guess no access to the images within is possible.

Browse through the files in android

I want to develop a code to browse the all folders and files in android emulator including sd card and internal memory storage. In Java there is JFileChooser available, in android how can i implement this functionality...?
You cannot browse all files in an Android device unless it is rooted. You need to have root privileges to access most of the file system (and you don't...).
Also, AFAIK there is no such API, but read data storage section in the android documentation to see what you can do.
This should help you
http://groups.google.com/group/android-developers/browse_thread/thread/42c92c01613beb8b?pli=1
i.e. As a widget not available , but you can use an app called OI File Manager and use its properties

Categories

Resources