+ Start a Discussion
ArpiArpi 

geolocation and upload pic

Hello,

 

I have a requirement in which I have to upload a pic and get the current location of salesforce user .My current app is not a mobile app.My question is that do I need to create a mobile app or is there some other way to access the fields geolocation and rich text area for pic upload.

If I have to create a mobile app than how can I integrate my current non mobile app or use some of the objects from it  .

 

Thanks.

Gaurav KheterpalGaurav Kheterpal

What is your current app? Is it a force.com app or hosted somewhere else?

Vinita_SFDCVinita_SFDC

Hello,

 

If the image you are uploading having the metadata like time,lattitude and longitude then you can make use of the field "Geolocation" available in salesforce.

 

The geolocation custom field allows you to create a field that identifies a location by its latitude and longitude.
  • You can then use the geolocation field with the DISTANCE and GEOLOCATION formula functions to calculate distances between locations.
  • For example, you can calculate the distance between two geolocation fields (such as between the warehouse and the store), or between a geolocation field and any fixed latitude-longitude coordinates (such as between the warehouse and 37.775°, –122.418°, also known as San Francisco). For details please refer following link:

https://org62.my.salesforce.com/kA030000000PHGt?srPos=0&srKp=ka0

ArpiArpi

Hello Gaurav,

 

My current app is on salesforce.com not an external site. I have the requirement to get the salesforce user's( on mobile or other handheld devices) current location automatically not be user typing his langitude and longitude and also the user should be able to take pics from his device and uplaod it and both data to be send to salesforce servers custom objects records.

 

 

Thanks

 

ArpiArpi

Hello Vinita,

 

The location should be automatically calculated using the device they are using and also should be able to take and upload pics and save to the app.

 

 

Thanks

ArpiArpi
Also all the objects have a checkbox which says " Available in Touch" so I was wondering if that feature could be used and I may not have to create a new separate mobile app because I want to use lot of my current apps data model.
Gaurav KheterpalGaurav Kheterpal

Hi Arpi,

 

I'm not 100% sure if I understand you right but here are some suggestions

 

* If you just want to upload a photo using VF, follow this link - http://boards.developerforce.com/t5/Visualforce-Development/Rich-Text-Area-image-in-Visual-force-page-and-Data-Loader/td-p/446611

* If you actually want to capture an image and then upload it to Saleforce, it will have to be mobile app. I'm listing an example of a hybrid app which does that - http://wiki.developerforce.com/page/Developing_Hybrid_Apps_with_the_Salesforce_Mobile_SDK

* Here's a link which explains how you can get user's location using VF - http://www.salesforce.com/docs/developer/cookbook/Content/mobile_visualforce.htm

 

I hope these help.

ArpiArpi
Thanks for all the solutions, I wanted to use my current app's data model too so I was wondering if I could use my original salesforce non mobile app but it looks like I cant, I have to create a separate mobile app for this.

Thanks
AshwaniAshwani

Hi,

 

Devoloping a saperate app can be a good idea but if you want only those two functionality described in your earlier post, then these can be acheived by mobile web browsers like google chrome, firefox, safari using HTML5 file API and Geolocation API. Both API are supported in iPhone and Android OSs.  Recently I implemented File API in iphone by which I could able to open camera directly from browser (safari) and upload it to salesforce.

ArpiArpi
Thanks Ashwani I will try that. So you didnt create a mobile app even for File API in iphone, This is what I want if you can giv some guidelines as to how to move forward that would be gr8.