Web Developer Guide
samsung pay since version 5 0, samsung internet supports the payment request api, providing a consistent, easy-to-use and secure check-out experience samsung internet also supports samsung pay as a payment method, subject to samsung pay availability by location see here for further details closeby introduced in version 5 2, closeby is samsung’s physical web service, allowing you to discover contextual websites based on the locations around you closeby detects physical web beacons that broadcast web pages using the eddystone-url format to enable closeby and see the list of beacons around you, see the extensions menu while enabled, you may see a silent notification displayed when nearby beacons are detected for a beacon to be displayed by closeby, the page that the url resolves to must be served over https must not be blocked by robots txt must not include malicious contents/ malware must be found and reachable, without timing out must not have an ssl certificate error must not be empty samsung internet for android 4 x custom tabs apps often need to provide users with a way to view web pages previously this required embedding a webview inside your app, or launching a browser and making the user come back to your app later since samsung internet for android 4 0, app developers can have more control over the overall web experience without using android webview, by launching a lightweight custom tab the followings are customizable for custom tabs menu items toolbar color samsung internet custom tabs service connection client apps can use the sample code below for connecting to custom tabs service provided if bindservice throws an exception, custom tabs is not supported in the installed version the package name must be set to samsung internet’s package name i e "com sec android app sbrowser" // package name of samsung internet public static final string samsung_internet_package_name = "com sec android app sbrowser"; // action for the service intent public static final string custom_tabs_connection = "android support customtabs action customtabsservice"; intent serviceintent = new intent custom_tabs_connection ; serviceintent setpackage samsung_internet_package_name ; context bindservice serviceintent, mserviceconnection, context bind_auto_create | context bind_waive_priority ; launching a custom tab once binding the custom tabs service, you can use an action\_view intent to launch a custom tab from your app // package name of samsung internet public static final string samsung_internet_package_name = "com sec android app sbrowser"; // action for the service intent public static final string custom_tabs_connection = "android support customtabs action customtabsservice"; intent serviceintent = new intent custom_tabs_connection ; serviceintent setpackage samsung_internet_package_name ; context bindservice serviceintent, mserviceconnection, context bind_auto_create | context bind_waive_priority ; customizing menu items client apps can add customized menu items to the custom tab the menu items are added using an array of bundles that consist of menu texts and pending intents // key for title string for custom menu item public static final string custom_tabs_menu_title = "android support customtabs customaction menu_item_title"; // key for pending intent public static final string custom_tabs_pending_intent = "android support customtabs customaction pending_intent"; // array list is used for specifying menu related params public static final string custom_tabs_extra_menu_items = "android support customtabs extra menu_items"; arraylist menuitembundlelist = new arraylist<bundle> ; // separate bundle for each menu item bundle menuitem = new bundle ; menuitem putstring custom_tabs_menu_title, menuitemtitle ; menuitem putparcelable custom_tabs_pending_intent, pendingintent ; menuitembundlelist add menuitem ; intent putparcelablearraylist custom_tabs_extra_menu_items, menuitembundlelist ; customizing toolbar color the color of the custom tab’s tool bar can be changed to be in sync in caller apps’ theme using intent extra // intent extra for changing the color for tool bar color of type int indicates a color private static final string custom_tabs_toolbar_color = "android support customtabs extra toolbar_color"; intent putextra custom_tabs_toolbar_color, color ; service worker service worker support was introduced in samsung internet for android 4 0, based on chromium 44 2403 with some additions and changes additions client manipulation client id windowclient navigate url navigator serviceworker serviceworkercontainer getregistrations registration serviceworkerregistration update that returns a promise cache cache addall requests cache matchall request, options changes client manipulation client postmessage message, transfer will result in a serviceworkermessageevent being fired on navigator serviceworker instead of a messageevent being fired on the client’s global window object clients matchall returns clients in mru order registration serviceworkerregistration update will only bypass the browser cache if the previous update check occurred over 24 hours ago cache api cache api is restricted to secure origins can be only used with https fetch related fetch api request flags for navigation requests have been changed from <mode "no-cors", credentials "same-origin"> to <mode "same-origin", credentials "include", redirect "manual"> fetchevent respondwith accepts cors responses for page loading or worker script loading requests web push web push notification allows users to "subscribe" to receive notifications from a web page, and users will receive the notification whether the web page is currently running or not push api depends on service workers to provide the offline functionality needed web push support was introduced in samsung internet for android 4 0 samsung internet for android 3 x quick access as one of the default homepages for samsung internet for android since version 3, the quick access page enables users to visit their favorite sites with a single click it is also loaded whenever users click the url bar giving your sites more exposure and leading more users to you quick access page contains a default list of sites that is adjustable by the user the default list varies according to countries, regions, carriers, etc it is updated independently from the samsung internet for android through the samsung quick access server for more effective exposure, we recommend adding a catchy icon that shows off the characteristics of your page the icon displayed for your site will be determined following this priority the apple-touch-icon declared in the content ex <link rel="apple-touch-icon" href="/mytouchicon png"> the favicon set up in the content ex <link rel="icon" href="/myicon png"> a simple icon created by the samsung quickaccess server shortcut promotion banner based on the w3c manifest for web application standard, samsung android for internet lets web pages look and work more like native android applications with the ‘add to home’ feature, users are able to install your pages to their devices and launch and explore them without being aware of the browser container since version 3 0, samsung internet for android promotes ‘add to home’ with notification banners samsung internet for android will recommend shortcut installation for frequently* visited sites if it has a manifest declared in a link element this will give users easy access to the feature and certainly make users access your contents more frequently of course, samsung internet for android still provides the ‘add to home’ menu so users can install web applications to their home screens without going through the promotion banner * currently, the notification will show when the user visits a site at least 3 times during a 2 week period this policy may change secure web auto login using fingerprint authentication, samsung internet for android provides a more secure and easy way for users to login to sites once the user agrees to save their login info for a site, future sign-ins will be done with a single fingerprint scan after the user identity is verified with fingerprint, the password field is auto-filled and submitted for login where applicable since samsung internet for android 3 2, the number of sites supported for auto login has been highly increased use standard html forms and avoid overriding the ‘enter’ key to make the best use of this feature <form action="example_form asp"> id <input type="text" name="username" value="username"><br/> password <input type="password" name="password" value="password"><br/>> <input type="submit" value="submit"> </form> audio notification since version 3 0, samsung internet for android lets you provide audio contents to users with the experience of native music applications users can keep listening to audio streaming from your sites after switching to other tabs or applications the samsung internet for android icon is shown in the notification bar to indicate that audio streaming is coming from the web and when the user opens the notification drawer, a mini-controller for the audio element is displayed to enable quick and easy control of audio playback this mini-controller is also displayed on the lock screen for user convenience an icon and the title of the current audio streaming are shown in the mini-controller the icon displayed is determined following this priority the apple-touch-icon declared in the content ex <link rel="apple-touch-icon" href="/mytouchicon png"> the favicon set up in the content ex <link rel="icon" href="/myicon png"> a simple icon created by the samsung quickaccess server