• Dallas Kuhn
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 14
    Replies
I am using the latest SalesforceMobileSDK (3.0) to build native Android apps. I use single sign-on and get a new restClient every time my main activity has resumed. 
@Override
public void onResume(RestClient client)
{
	restClient = client;
}
When I try use the restClient a day after the initial login (and after the initial authToken expired) 
private void sendRequest(String soql) throws UnsupportedEncodingException
{
	RestRequest restRequest = RestRequest.getRequestForQuery(getString(R.string.api_version), soql);

	restClient.sendAsync(restRequest, new RestClient.AsyncRequestCallback()
	{
		@Override
		public void onSuccess(RestRequest request, RestResponse result)
		{
			//process results here...
		}

		@Override
		public void onError(Exception exception)
		{
			Toast.makeText(MainActivity.this, MainActivity.this.getString(SalesforceSDKManager.getInstance().getSalesforceR().stringGenericError(), exception.toString()), Toast.LENGTH_LONG).show();
		}
	});
}
I get an 'java.io.IOException: No authentication challenges found'. This is all basic stuff and I never got this error with the previous SDK (2.0) using the same code above. After some searching I have discovered that this is caused by an unauthorized response from the server (Salesforce) but I have verified that I am correctly sending the new auth token with the request that i received back from Salesforce in my onResume method.

I have these three scopes on the connected app and in my bootConfig:
<string-array name="oauthScopes">
    <item>api</item>
    <item>web</item>
    <item>refresh_token</item>
</string-array>
I am using a Samsung Galaxy S5 running Android 4.4.2 if that info helps. Is someone able to tell me why i get this and more imortantly how to fix it?
I have developed a native Android app that logs in to Salesforce. The issue I have is after I log in to my app Salesforce1 also opens up on its own and steals focus. I suspect this has something to do with a callbackURI of some sort. I have specified my own unique callbackURI in my app's boot config and also on the connected app on Salesforce. Anyone know what could be causing this and how I can prevent this happening?
I am using the latest SalesforceMobileSDK (3.0) to build native Android apps. I use single sign-on and get a new restClient every time my main activity has resumed. 
@Override
public void onResume(RestClient client)
{
	restClient = client;
}
When I try use the restClient a day after the initial login (and after the initial authToken expired) 
private void sendRequest(String soql) throws UnsupportedEncodingException
{
	RestRequest restRequest = RestRequest.getRequestForQuery(getString(R.string.api_version), soql);

	restClient.sendAsync(restRequest, new RestClient.AsyncRequestCallback()
	{
		@Override
		public void onSuccess(RestRequest request, RestResponse result)
		{
			//process results here...
		}

		@Override
		public void onError(Exception exception)
		{
			Toast.makeText(MainActivity.this, MainActivity.this.getString(SalesforceSDKManager.getInstance().getSalesforceR().stringGenericError(), exception.toString()), Toast.LENGTH_LONG).show();
		}
	});
}
I get an 'java.io.IOException: No authentication challenges found'. This is all basic stuff and I never got this error with the previous SDK (2.0) using the same code above. After some searching I have discovered that this is caused by an unauthorized response from the server (Salesforce) but I have verified that I am correctly sending the new auth token with the request that i received back from Salesforce in my onResume method.

I have these three scopes on the connected app and in my bootConfig:
<string-array name="oauthScopes">
    <item>api</item>
    <item>web</item>
    <item>refresh_token</item>
</string-array>
I am using a Samsung Galaxy S5 running Android 4.4.2 if that info helps. Is someone able to tell me why i get this and more imortantly how to fix it?
I have developed a native Android app that logs in to Salesforce. The issue I have is after I log in to my app Salesforce1 also opens up on its own and steals focus. I suspect this has something to do with a callbackURI of some sort. I have specified my own unique callbackURI in my app's boot config and also on the connected app on Salesforce. Anyone know what could be causing this and how I can prevent this happening?