You need to sign in to do that
Don't have an account?
![Dhiraj Sharma 10 Dhiraj Sharma 10](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Upload Photo In Opportunity of salesforce.com through android app
I am making an android application which use salesforce.com API. Maximum task i am able to do through sdk but I have problem when it comes to adding custom field in Opportunity object for photo.I researched and find out this link https://success.salesforce.com/answers?id=90630000000glUkAAIThrough this I made a custom field of Rich Text Area in Opportunity and i am successfully able to upload image. But the problem is how to accomplish the same through android code??? I mean a new field is added into API of Opportunity list as seen below in the detail of field.
Field name: image__c Field Label: image Type is: textarea Length: 131072 This is a custom field. Can be nulled. Createable Updateable
But since its data type is textarea, How to send the image captured from phone camera or selected from gallery while creating new Opportunity.
Field name: image__c Field Label: image Type is: textarea Length: 131072 This is a custom field. Can be nulled. Createable Updateable
But since its data type is textarea, How to send the image captured from phone camera or selected from gallery while creating new Opportunity.
If it's hybrid, you can use the Cordova navigator.camera.getPicture() call as follows
You can then upload it using the following approach
Hope this helps.
If my answer helps resolve your query, please mark it as the 'Best Answer' to benefit others and improve the overall quality of Discussion Forums.
Gaurav Kheterpal
Certified Force.com Developer| Developer Forums Moderator| Dreamforce Speaker