I have created a Salesforce1 single page app with VisualForce page displaying HTML. The app uses HTML5 and CSS3. Some Android 4.2 and 4.3 devices will not display the HTML correctly inside the Salesforce1 native app. However, the page with HTML works perfectly when Salesforce1 runs in the Chrome browser on the mobile device.

So which browser am I building for in Salesforce1? Does it use the mobile device's default browser engine? If I update the device browser, will it also update the engine used by the Salesforce1 native app for rendering the visualforce HTML?

up vote 3 down vote accepted

From what I understand, Salesforce1 is using the Salesforce Mobile SDK which is built on top of Phonegap (see Andrew's informative answer here for more on the technologies behind the Salesforce1 app).

So taking a look at what Phonegap has to say on the matter:

The web view used by PhoneGap is the same web view used by the native operating system. On iOS, this is the Objective-C UIWebView class; on Android, this is android.webkit.WebView. Since there are differences in the web view rendering engines between operating systems, make sure that you account for this in your UI implementation.

  • Thanks for the answer Mark. After reading your response, I think I understand what is going on. Since my Salesforce1 app runs fine in Chrome, and just as well inside the Salesforce1 app on Android 4.4. I didn’t understand why it isn’t working on Android 4.2 or 4.3 inside Salesforce1. – user10202 Jul 2 '14 at 0:02
  • 1
    I just read elsewhere that Google changed the OS internals on Android 4.4 and now replaces the webkit-based WebView with Chrome. If I install the Chrome browser on Android 4.3, it renders the HTML itself and that is why my app runs there, but not inside the Salesforce1 app (that uses the PhoneGap/WebView – as you said). My problem is strictly with the WebView. It doesn't fix it for me, but at least I believe I understand what to look at. – user10202 Jul 2 '14 at 0:02

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.