function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
OttosOttos 

Display image on mobile

Does anyone know how to display image on mobile using mobile function?

Best Answer chosen by Admin (Salesforce Developers) 
cloudcodercloudcoder

Have a look at the following blog post. The trick is to use your oauth_token as a query param on the URL:

 

http://blog.sforce.com/sforce/2011/03/accessing-chatter-user-pics.html

All Answers

cloudcodercloudcoder

Can you please provide a little more information on your use case here. For example, where are you getting the image from (Salesforce?), is it a chatter profile image etc?

 

Q

OttosOttos

in this case, image's colleted in salesforce and I would like to create custom field and display picture in that field (using mobile app on iPad)

flexdevelflexdevel

Hi,

 

same problem here - I am trying to develop a mobile Adobe Air App connecting sfdc on iOS and Android. I am trying to display the profile-images in my App - but the images are not displayed.

 

Thank you for advice...

cloudcodercloudcoder

Have a look at the following blog post. The trick is to use your oauth_token as a query param on the URL:

 

http://blog.sforce.com/sforce/2011/03/accessing-chatter-user-pics.html

This was selected as the best answer
flexdevelflexdevel

Works great, thx

gene.koopmangene.koopman

Quinton,

I'm running into a similar issue, perhaps the same. The images I'm trying to display are attachment images, however, and I fear this is the difference. 

 

The app we're running, was previously developed with PhoneGap, prior to the Mobile SDK being available, here's the line of code:

 

 <img style="height:84px; width:84px;" src="/servlet/servlet.FileDownload?file={!r.imgId}" />

 

This works in the previous version of the app, as well as any mobile browser I try(it's an iPad so Safari and Chrome). The images appear just fine in that context, however when I try it within the Salesforce Mobile SDK...nothing.

 

I tried appending the 'oauth_token' parameter, no dice. What am I missing?

 

Thanks,

Gene

cloudcodercloudcoder

Check out the following article. It has a bunch of example of using images from a hybrid app:

 

http://wiki.developerforce.com/page/Developing_Hybrid_Apps_with_the_Salesforce_Mobile_SDK