简体   繁体   English

使用Android的SalesForce?

[英]SalesForce with Android?

I want connect sales Force from my Android Program please suggest which one is correct way to achieve this I am new to sales Force I have some knowledge in Android Application Developement. 我想从我的Android程序连接sales Force,请提出实现这一目标的正确方法。我是Salesforce的新手,我对Android Application Development有一定的了解。

Thanks in Advance. 提前致谢。

You definitely want to use the REST API for mobile apps. 您肯定要对移动应用程序使用REST API。 The SOAP API is really heavy, and is better for Server-to-Server integrations. SOAP API确实很繁重,并且更适合服务器到服务器的集成。 The best way to get started building an Android app for Salesforce.com is to take a look at the Salesforce Mobile SDK for Android: 开始为Salesforce.com构建Android应用程序的最佳方法是查看适用于Android的Salesforce Mobile SDK:

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

There's a very helpful getting started PDF linked on that page. 该页面上有一个非常有用的入门PDF链接。

However, the SDK is meant mostly for starting new apps, so you'll have some work ahead of you integrating it into an existing application. 但是,SDK主要用于启动新应用,因此,在将其集成到现有应用中之前,您需要做一些工作。 The main things you want are the oAuth 2.0 User-Agent login and REST wrappers. 您需要的主要内容是oAuth 2.0 User-Agent登录名和REST包装器。

You may also find this app useful -- I put it together for a presentation at Dreamforce '11, which was shortly before the Mobile SDK for Android came out, so I wrote the oAuth and REST stuff myself. 您可能还会发现此应用程序很有用-我在Dreamforce '11上将其放在一起进行了演示,那是在Android Mobile SDK推出之前不久,因此我自己编写了oAuth和REST东西。 Might be a simpler starting point for you. 可能是您更简单的起点。

https://github.com/tomgersic/DreamforcengerHunt https://github.com/tomgersic/DreamforcengerHunt

Hope that helps! 希望有帮助!

You can either use the RESTful interface or the SOAP webservices. 您可以使用RESTful接口或SOAP Web服务。 The latter is a bit easier to deal with IMHO. 后者更容易与恕我直言打交道。 Under setup in salesforce, download the partner or enterprise WSDL ( partner = generic, enterprise = specific for your SF-instance ). 在salesforce中的设置下, 下载合作伙伴或企业WSDL合作伙伴=通用,企业=特定于您的SF实例 )。 Now with wsdl2java you can create Stubs for those wsdl entries. 现在,使用wsdl2java,您可以为这些wsdl条目创建存根。 Import those into your android app and use them. 将它们导入到您的android应用中并使用它们。 See here for a Java Exampe by Salesforce.com. 请参阅此处以获取Salesforce.com的Java示例。

Be sure your user has the permission to "do API". 确保您的用户具有“执行API”的权限。 You might want to look into SSO if you want to make a "production"/commercial app. 如果要制作“生产” /商业应用程序,则可能需要研究SSO。 Also, to login, remember to use the correct password, you might need to add the API key (generate using the Setup tab in SF). 另外,要登录,请记住使用正确的密码,您可能需要添加API密钥(使用SF中的“设置”选项卡生成)。 Hope this helps. 希望这可以帮助。

Try checking out some of the open-source SDK projects the developer evangelists have added to the forcedotcom github 尝试检查一些开发人员向开发人员添加到forcedotcom github的开源SDK项目

Lots of good examples on different platforms, including android with phonegap/html5 and a native SDK for android (iOS and Android) to get you past authentication and onto building your app. 在不同平台上的很多很好的例子,包括带phonegap / html5 的android和适用于android (iOS和Android)的本地SDK,可帮助您通过身份验证并构建应用。

Salesforce Provides mobile SDK for development on mobile device, here is the link for android SDK: http://wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_Android Salesforce提供了用于在移动设备上进行开发的移动SDK,这是android SDK的链接: http : //wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_Android

You need to: 你需要:

  1. Download SDK. 下载SDK。
  2. Add a sample project included in SDK's native/SampleApps folder(make sure you check include to the workspace while importing the project). 在SDK的native / SampleApps文件夹中添加一个示例项目(确保在导入该项目时选中包含到工作区中)。
  3. Get your remote access form salesforce and update in your app. 获取来自Salesforce的远程访问并在您的应用程序中进行更新。

    --This should get you started with a sample app form salsforce. -这应该使您开始使用salsforce的示例应用程序。

After this you need to modify existing code to your own code. 之后,您需要将现有代码修改为自己的代码。

You can go to trailhead and start browsing on it, while working with your own application you will have to learn a lot about smartStore and smartSync, 您可以先进入并开始浏览,同时在使用自己的应用程序时,您将必须学习很多有关smartStore和smartSync的知识,

I did implemented A smartStore App with using salesforce as database provider, if you want i can upload it to drive and share a link to you and if you have any doubts about using or understanding the flow be free to ask.. 我确实使用Salesforce作为数据库提供程序来实现了smartStore应用程序,如果您希望我可以上载它来驱动并共享指向您的链接,以及是否对使用或理解流程有任何疑问,可以随时提出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM