Downloading video or image

Put your problem here if it does not fit any of the other categories.

Downloading video or image

Postby adnorid » Tue Jun 01, 2010 12:23 pm

I have no problem in downloading file but issue comes when i try to store them in /data/ folder. Which ever file i create(after downloading it) in that folder ( or subfolder under it ) has permission of -rw------- irrespective of file type.
Because of the file permission i am not able to acces file, especially video files where mediaplayer will not play that video.
Is there is any way to set permission programmatically.
adnorid
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Apr 16, 2010 10:03 am

Top

Re: Downloading video or image

Postby JKumar » Wed Jun 02, 2010 8:22 am

HI,

Although you can use internal storage but you are supposed to use the external storage(SDCard) for the media files.

Store your files in SDCard, you will require to use external storage access permission.It will work fine.
Hope the suggestion helps you
Keep posting .It makes us better to understand Android
User avatar
JKumar
Experienced Developer
Experienced Developer
 
Posts: 52
Joined: Thu May 13, 2010 8:17 am
Location: INDIA

Re: Downloading video or image

Postby adnorid » Wed Jun 02, 2010 8:53 am

JKumar wrote:HI,

Although you can use internal storage but you are supposed to use the external storage(SDCard) for the media files.

Store your files in SDCard, you will require to use external storage access permission.It will work fine.


I could do that but the thumbnails i am downloading are not meant to be exposed as viewable media. Those are just icons that will used by an application some later point in time.
adnorid
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Apr 16, 2010 10:03 am

Re: Downloading video or image

Postby vengeance_mj » Wed Jun 02, 2010 8:58 am

I do not know whether this may help you but i think you can only store data in the private folder of your package.
Please correct me if i'm wrong .
So suppose your package name is anddev.org.test you can only save the data in /data/data/anddev.org.test/
vengeance_mj
Senior Developer
Senior Developer
 
Posts: 174
Joined: Thu Oct 29, 2009 2:32 am

Re: Downloading video or image

Postby adnorid » Wed Jun 02, 2010 10:06 am

vengeance_mj wrote:I do not know whether this may help you but i think you can only store data in the private folder of your package.
Please correct me if i'm wrong .
So suppose your package name is anddev.org.test you can only save the data in /data/data/anddev.org.test/


Not necessarily.. You can write files to any folder.Given u have permission to do so. But storing the application related data inside the application package folder (as u have noticed) would be more appropriate..
adnorid
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Apr 16, 2010 10:03 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 18 guests