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

Web and WebWorks Development

Reply
New Developer
Marimuthu_P
Posts: 62
Registered: ‎08-07-2013
My Device: Blackberry Torch 9800
My Carrier: Mobile App Development

How to get the image path from the Blackberry Device

Hi All,

 

I have developed the simple web application.In that i want to upload a picture from my blackberry device..here i can get the image from device.. But i can't get the image path from the device..so please help me to get the image path from blackberry device using html or javascript.Thanks in Advance..

 

With Regards,

 

Marimuthu_P

Please use plain text.
New Developer
skaplun
Posts: 4
Registered: ‎10-01-2012
My Device: Blackberry Z10 Le
My Carrier: Movistar AR

Re: How to get the image path from the Blackberry Device

Check out this link: https://developer.blackberry.com/native/documentation/cascades/ui/image_resources/content.html

You need to have the "getDir" variable
-----
Knowing the user experience is the best way to develop the best apps.
Please use plain text.
New Developer
Marimuthu_P
Posts: 62
Registered: ‎08-07-2013
My Device: Blackberry Torch 9800
My Carrier: Mobile App Development

Re: How to get the image path from the Blackberry Device

Hi,
Thanks for your reply..Is there any html or javascript code? for get the image path from the blackberry device...Thanks in Advance..

With Regards,

Marimuthu_P
Please use plain text.
Trusted Contributor
lathajagan
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: How to get the image path from the Blackberry Device

    function getPictureFromGallery(onCapturePhotoSuccess,successCallback,failureCallback){
        var details = {
            mode: blackberry.invoke.card.FILEPICKER_MODE_PICKER,
            type: [blackberry.invoke.card.FILEPICKER_TYPE_PICTURE],
            imageCropEnabled: true
        };
        invokeFilePicker(details,onCapturePhotoSuccess,successCallback,failureCallback);
    }
    function invokeFilePicker(details,onCapturePhotoSuccess,successCallback,failureCallback){
        blackberry.invoke.card.invokeFilePicker(details, function (path) {
        onCapturePhotoSuccess("file://"+path,successCallback,failureCallback);
      },
          function (reason) {
            //gives the reason for failure if any
          },
          function (error) {
            if (error) {
                //gives error on faliure
            } else {
                //its on successful launch
            }
          }//failurecallback
        );
    }

 

--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.
New Developer
Marimuthu_P
Posts: 62
Registered: ‎08-07-2013
My Device: Blackberry Torch 9800
My Carrier: Mobile App Development

Re: How to get the image path from the Blackberry Device

Hi lathajagan,

Thanks for your reply, i have developed the web app fully html based..but this is native code...and is any possible way to embed the native code with html...so if possible did you have any javascript code..please send me....thanks again...

With Regards,

Marimuthu_P
Please use plain text.