+ Start a Discussion
Mauricio RamalhoMauricio Ramalho 

Visualforce pages are not available on native Android app

How to view Visualforce Pages through WebView (native Android using Mobile SDK)?

We are building a native Android app using Salesforce's Android SDK.
To be able to reuse all of our custom features we've added a WebView that directs to our Salesforce Org through the browser, which works like a charm on default SF layouts but on every Visualforce Page we get the error message "You can't view this page, either because you don't have permission or because the page isn't supported on mobile devices". Our users can access the Visualforce pages through any browser but not through Android app.

Things that we have already tried:
  • "Provide access to custom applications (visualforce)" is already selected on Connected App's "Selected OAuth Scopes" field;
  • All profiles are selected on visualforce page's security;
  • "Available for Lightning Experience, Salesforce1, and Lightning Communities" is checked on every Visualforce Page we've tried;
Why this is happening?
Is there any other configuration I need to check on Admin or Code side?

User-added image
Balayesu ChilakalapudiBalayesu Chilakalapudi
Did you enabled the check box Available for Lightning Experience, Salesforce1, and Lightning Communities

User-added image


Let me know if it helped to resolve your issue,

Thanks,
Balayesu
 
Mauricio RamalhoMauricio Ramalho
Yes, it's checked (as I have mentioned on the original post)
Femi OFemi O
Hi Mauricio

Were you ever able to find a solution to this problem?
Sharad Chandra Maheshwari 1Sharad Chandra Maheshwari 1

For all those who have been scratching their head over this issue, the following might help you-

Observation: I was encountering the following issue- After checking 'Available for Lightning Experience, Lightning Communities, and the mobile app' to true, I was able to add the web page to a community. After making changes to the same page using Developer Console, the vf page in community was breaking with the following 2 errors-
1. "Visualforce page 'newTrial' isn't enabled for mobile devices."
2. "One or more of the component's propert value are incorrect. Try adding the correct value in the property editor"

Issue: When I was saving the vf page using developer console, it is 'overwriting' the value for the checkbox 'Available for Lightning Experience, Lightning Communities, and the mobile app' to 'false'. 

Resolution: Make sure that 'Available for Lightning Experience, Lightning Communities, and the mobile app' is set to 'true' after you are done making the changes in developer console.