• Quang Vu
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi guys

 

I'm totally new to mobile development. I'm modifying the sample hybrid app SFDCAccounts to test out the REST api, but I don't know how to get my userId after successful logon. Would appreciate any help on this. There's a method that has the following comments, but how do I access the 'dictionary' that is returned?

 

/**
* Obtain authentication credentials, calling 'authenticate' only if necessary.
* Most index.html authors can simply use this method to obtain auth credentials
* after onDeviceReady.
* success - The success callback function to use.
* fail - The failure/error callback function to use.
* cordova returns a dictionary with:
* accessToken
* refreshToken
* clientId
* userId
* orgId
* loginUrl
* instanceUrl
* userAgent
*/
var getAuthCredentials = function(success, fail) {
cordova.exec(success, fail, "com.salesforce.oauth","getAuthCredentials",[]);
};

I cloned from below git hub.

 

https://github.com/forcedotcom/SalesforceMobileSDK-Android.git.

 

Created a project in eclipse (after installing Android SDK and ADT plugin).  Now, when I import project (VFConnector) from MobileSDK, I am getting error as "Unable to resolve target 'android-8'. Why this could be?

 

Thanks

Jaydip

  • September 27, 2012
  • Like
  • 0