• Mihah
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hello All,

 

I am developing a Hybrid App with SalesforceMobileSDK for Android. I am using the latest SalesforceSDK library from github. I used the SFDCAccounts template and added smartstore functionalities. But I am facing some problems:

 

1. I have a problem with oAuth2 flow. I used the default functionalities from SDK, like they were set in the template. When I install the app and login, I have to allow oAuth and then I successfully login. If i close the app, and open it again everything is OK.. 

 

But If i dont use the app for like 1 hour, when I open it, I first see the home screen, but imediatelly after that the boostrap console lounches again and redirects me to login page where I again have to login and allow the oAuth.. How do I achieve the app to be connected all the time?


If i understand correctly, the SDK should keep the active session and take care of that itself? So is it a bug or do I have to change anything in my configuration?

 

2. I would like to use device functionalities. Is it possible to access the "phone" app, so for example, when a user clicks the button the phone would start to call a number? 

 

Thank you for your answers :)

 

Miha

 

  • June 07, 2013
  • Like
  • 0

Hello All,

 

I am developing a Hybrid App with SalesforceMobileSDK for Android. I am using the latest SalesforceSDK library from github. I used the SFDCAccounts template and added smartstore functionalities. But I am facing some problems:

 

1. I have a problem with oAuth2 flow. I used the default functionalities from SDK, like they were set in the template. When I install the app and login, I have to allow oAuth and then I successfully login. If i close the app, and open it again everything is OK.. 

 

But If i dont use the app for like 1 hour, when I open it, I first see the home screen, but imediatelly after that the boostrap console lounches again and redirects me to login page where I again have to login and allow the oAuth.. How do I achieve the app to be connected all the time?


If i understand correctly, the SDK should keep the active session and take care of that itself? So is it a bug or do I have to change anything in my configuration?

 

2. I would like to use device functionalities. Is it possible to access the "phone" app, so for example, when a user clicks the button the phone would start to call a number? 

 

Thank you for your answers :)

 

Miha

 

  • June 07, 2013
  • Like
  • 0

1) I am trying again to get selected rows (with getSelected() on the controller) from an Enhanced list view in a VF page. Am I doing something wrong or is it just not possible to pass the EnhancedList records to a custom controller? It seems that the Enhanced list recordset should be bound to the controller records but I cannot figure out where this should happen.

 

2) BTW, I also try to change the FilterID in the EnhancedList but it does not refresh properly. Is this a known issue?

 

Here is the code. Any help would be great.

<apex:page standardController="Contact" extensions="pgContactHomeController" showHeader="true" tabStyle="Contact" recordSetVar="myContacts">

	<apex:form >
        <apex:selectList value="{!FilterID}" size="1">
            <apex:actionSupport event="onchange" rerender="listPanel"/>
            <apex:selectOptions value="{!listviewoptions}"/>
        </apex:selectList>
    </apex:form>
    
	<apex:outputPanel layout="block" id="listPanel">
		<apex:enhancedList height="300" ListId="{!FilterID}" rowsPerPage="10" id="ContactList" customizable="True"  reRender="debugPanel"/>
	</apex:outputPanel>    

	<apex:outputPanel layout="block" id="debugPanel">
    	<apex:pageblock id="myBlock">
	  		<apex:outputText value="Records={!recordCount}" /> <br/>
			<apex:outputText value="Selected={!selectedCount}" /> <br/>
			<apex:outputText value="FilterID={!FilterID}" /> <br/>
		</apex:pageblock>
	</apex:outputPanel>
	
</apex:page>
public with sharing class pgContactHomeController {
    private ApexPages.StandardSetController myController;
    public pgContactHomeController(ApexPages.StandardSetController stdController) {
     this.myController = stdController;
    }
public Integer getRecordCount(){
return ((List<Contact>)myController.getRecords()).size();
}
public Integer getSelectedCount(){
return ((List<Contact>)myController.getSelected()).size();
}
public Id getFilterID(){
return (myController.getFilterID());
}
public void setFilterID(ID newID){
myController.setFilterID(newID);
return;
}
}

 

 

 

  • March 04, 2011
  • Like
  • 0