It is currently Tue May 23, 2017 3:40 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Access to Environment paths / Where DCIM is
Unread postPosted: Fri Feb 17, 2017 8:28 am 
Offline

Joined: Thu Feb 16, 2017 7:52 pm
Posts: 2
Want to write a Gallery application,

I need to know where the phone's default Pictures are stored,
This is normally called DCIM for camera images.

I should find this path by asking . (Examples in other languages )
android.os.Environment.DIRECTORY_DCIM;

return photoDir = Environment.getExternalStorageDirectory() + "/" + Environment.DIRECTORY_DCIM + "/";

Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES )

How can I find this path in Basic!


Report this post
Top
 Profile  
 
 Post subject: Re: Access to Environment paths / Where DCIM is
Unread postPosted: Fri Feb 17, 2017 12:54 pm 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1135
Location: From Blighty
Sample program f25_dir.bas in the Sample_Programs(d) will show you how to do this.

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Access to Environment paths / Where DCIM is
Unread postPosted: Fri Feb 17, 2017 1:12 pm 
Offline

Joined: Thu Feb 16, 2017 7:52 pm
Posts: 2
Sorry, f25_dir.bas, that is just how to look at the files in a folder.

I need know from the OS. Environment where the Gallery / DCIM folder is.

Thanks for reply.


Report this post
Top
 Profile  
 
 Post subject: Re: Access to Environment paths / Where DCIM is
Unread postPosted: Fri Feb 17, 2017 2:03 pm 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 639
Mog is pointing in the right direction with f25_dir.bas.
You should search programmatically for the "*.jpg" filename strings by backing up and down from your app's directory. All directories that you will access will be relative to the position where your app finds itself. So you should keep track of where you are in the directory structure and test validity of dirs to avoid error commands while programmatically exploring the directories on device.

Code:
ONCLICK_RndBtn1:
   ARRAY.DELETE Array$[]
   FILE.DIR "../../DCIM/Camera/", Array$[]  % For example Back down and go to DCIM/Camera/ is valid on my phone
   DIALOG.SELECT Index, Array$[]
   GR.MODIFY Screen1[TxtBtn1], "text", Array$[Index]
   GoSub WAITTOUCHUP
RETURN

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred