Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
JChow
Posts: 68
Registered: ‎09-04-2008
My Device: Not Specified

How to detect if user prefer storing pictures to device or media card

Hi 

 

Wonder if there is an API i can tell the "Store pictures" user's preference  in camera options.

 

Use case: bring up appropate folder using FilePicker if user wants to fetch a picture file

 

Using the System class i can detect if the device or media card is available. 

http://www.blackberry.com/developers/docs/5.0.0api/java/lang/System.html

But cannot tell if user prefer to save the pics in device / sd card.

 

Any one has an idea please share. 

thanks.

 

Please use plain text.
Developer
smiley
Posts: 1,417
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: How to detect if user prefer storing pictures to device or media card

By default the camera app


JChow wrote:

Hi 

 

Wonder if there is an API i can tell the "Store pictures" user's preference  in camera options.

 

Use case: bring up appropate folder using FilePicker if user wants to fetch a picture file

 

Using the System class i can detect if the device or media card is available. 

http://www.blackberry.com/developers/docs/5.0.0api/java/lang/System.html

But cannot tell if user prefer to save the pics in device / sd card.

 

Any one has an idea please share. 

thanks.

 



saves in the BlackBerry\camera on the sd card.

 

the filepicker doesnt allow you to pick folder.

 

Please use plain text.
Developer
JChow
Posts: 68
Registered: ‎09-04-2008
My Device: Not Specified

Re: How to detect if user prefer storing pictures to device or media card

thanks for responding. 

 

If you have SD card on your device. then bring up camera app, option page from the menu then at the bottom you can choose to store pictures "On Media Card / On Device" . Actually you get prompted the first time a SD card is detected. But you can always change your preference in the option page.

 

You can use the FilePicker API to select a start path:
http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/picker/FilePicker.html#setP...

String startPath = "file://store/home/user/documents"

filePicker.setPath(startPath); 

 

My goal is to make the start path the same as user preference 

 

thanks

Please use plain text.
Developer
myraddin
Posts: 405
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to detect if user prefer storing pictures to device or media card

[ Edited ]

Bumping an old thread.

 

Anyone knows how to find out User's preference in camera: "Store pictures: On Device / On Media Card"

My app would like to store the files in the same location.

 



"Listen carefully, I shall say this only once"
Please use plain text.
Contributor
newton53
Posts: 43
Registered: ‎11-30-2011
My Device: Dev Alpha, 8520
My Carrier: Vodafone

Re: How to detect if user prefer storing pictures to device or media card

I don't think there's a straightforward way. pretty sure the camera app stores the preference in the persistable store though, kudos to you if you manage to figure out the key.

 

or you can just replicate what the camera app is doing. Give the user a choice, and fall back to using store/home/user if sd card is not present.



I've got 99 problems and eclipse is all of them


Twitter

Please use plain text.
Developer
JChow
Posts: 68
Registered: ‎09-04-2008
My Device: Not Specified

Re: How to detect if user prefer storing pictures to device or media card

I talked to some RIM ppl and quite sure the function is not exposed. Unfortunately i couldn't find a nice way to work around it. newton53's suggestion sounds good to me if you really need to implement something.

Please use plain text.
Developer
myraddin
Posts: 405
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to detect if user prefer storing pictures to device or media card

Well, I guess this thread will at least give answers to the ones seeking the same :smileyhappy:

 

Reading all values from persistant storage to find that one could take milleniums. And it is most probably in a container class so it would al be in vein  :smileyhappy:.

 

But, kudos for the suggestion :Flowers:



"Listen carefully, I shall say this only once"
Please use plain text.