• Mauricio Ramalho
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
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
I used this arcticle on Salesforce's documentation to plot some graphic on Visualforce Pages using the apex:chart tag, but it seems that it is not possible to use chart tags and bootstrap on the same page.

The exact same code sample, but only adding the Bootstrap header link causes the graphic to blank out and not render at all.

Bootstrap on the header
<apex:page controller="ChartController">
<html lang="en">
    <head>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
    </head>
    <body>
         <apex:chart height="400" width="700" data="{!data}">
              <apex:axis type="Numeric" position="left" fields="data1" 
                 title="Opportunities Closed" grid="true"/>
              <apex:axis type="Category" position="bottom" fields="name" 
                 title="Month of the Year">
            </apex:axis>
            <apex:lineSeries axis="left" fill="true" xField="name" yField="data1"
               markerType="cross" markerSize="4" markerFill="#FF0000"/>
        </apex:chart>
    </body>
</html>
</apex:page>

The data is still there as it is possible to hover the mouse over the invisible data marks.

Am I missing something? Is there a workaround for this?
 
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