• Learn
    • Code Lab
    • Foldables and Large Screens
    • One UI Beta
    • Samsung Developers Podcasts
  • Develop
    • Mobile/Wearable
    • Galaxy GameDev
    • Galaxy Themes
    • Galaxy Watch
    • Health
    • Samsung Blockchain
    • Samsung DeX
    • Samsung IAP
    • Samsung Internet
    • Samsung Pay
    • Samsung Wallet
    • View All
      • Galaxy AR Emoji
      • Galaxy Accessory
      • Galaxy Edge
      • Galaxy Z
      • Galaxy Performance
      • Galaxy FM Radio
      • Galaxy S Pen Remote
      • Galaxy Sensor Extension
      • PENUP
      • Samsung Automation
      • Samsung Neural
      • Samsung TEEGRIS
      • Samsung eSE SDK
    • Visual Display
    • Smart TV
    • Smart Hospitality Display
    • Smart Signage
    • Digital Appliance
    • Family Hub
    • Platform
    • Bixby
    • Knox
    • SmartThings
    • Tizen.NET
  • Design
    • Design System
    • One UI
    • One UI Watch
    • Smart TV
  • Distribute
    • Galaxy Store
    • TV Seller Office
    • Galaxy Store Games
    • Samsung Podcasts
  • Support
    • Developer Support
    • Remote Test Lab
    • Issues and Bugs Channel
    • Samsung Android USB Driver
    • Galaxy Emulator Skin
  • Connect
    • Blog
    • News
    • Forums
    • Events
    • Samsung Developer Conference
    • SDC22
    • SDC21
    • SDC19 and Previous Events
  • Sign In
Top Global Search Form
Recommendation
  • Blog
  • Code Lab
  • Foldable and Large Screen Optimization
  • Forums
  • Galaxy Emulator Skin
  • Galaxy GameDev
  • Health
  • Remote Test Lab
  • Samsung Developer Conference
  • SDC22
  • Watch Face Studio
All Search Form
Recommendation
    Suggestion
      All Search Form
      Filter
      Filter
      Filter
      • ALL (100)
      • DOCS
      • SDK
      • API REFERENCE
      • CODE LAB
      • BLOG
      • NEWS/EVENTS
      • OTHERS
        api reference code lab blog news/events

      web

      Samsung Developers

      discover and create with samsung developers using our tools and services, you can provide an exceptional experience to samsung users around the world watch face studio get acquainted with watch face studio, which lets you turn your ideas into wear os watch faces! emulator skins for galaxy s23 check out the newly released emulator skins for galaxy s23, s23+ and s23 ultra. download now! developer forums join a community of samsung experts, developers, and designers in a global conversation. latest blog go to blog find in-depth technical content written by samsung developers {{pagetype}} {{pagecategorydisplay}} {{title}} {{shortdesc}} {{authorname}} featured videos go to youtube video video mar 21, 2023 quick and easy: using a galaxy emulator skin watch this youtube shorts to quickly learn how to make your android virtual device look like a galaxy device using the galaxy emulator skin. mar 21, 2023 video video oct 12, 2022 watch face studio with dark mode create a beautiful watch face that is refined and provides a more comfortable viewing experience in low-light situations. oct 12, 2022 video video feb 9, 2022 how to test your mobile apps through a web browser in this video, you will learn how to test your mobile apps through a web browser using the remote test lab web client. feb 9, 2022 explore more learn code lab code lab is an education platform that engages anyone to understand, through a series of topics, all sdks and tools powered by samsung. learn more > test remote test lab don’t have a samsung device to test your app? no problem! test your apps on the latest samsung galaxy devices in our remote test lab. learn more > distribute galaxy store are you a first timer? haven’t built an app for a samsung device yet? no problem. find everything you need to create your apps, products, and solutions. learn more > support developer support need developer technical support? login with your samsung account to submit a support request ticket and our team will respond within 1 business day. learn more >

      https://developer.samsung.com/
      1. tutorials | mobile

      blog

      [Samsung DeX] Lifecycle on switching between Mobile and Samsung DeX mode

      samsung dex is a new way to launch your android application in a desktop like environment. upon opening samsung dex mode, every app that stayed open in phone mode, undergo certain changes before launching in samsung dex. in this blog i will be telling you what exactly happens when we switch mode from phone mode to samsung dex mode or vice versa. switching between phone and samsung dex mode. by default, applications are automatically killed when they switch between mobile mode to samsung dex mode or vice versa. you can assume that behaviour is like pressing the home button. when user moves from phone mode to samsung dex mode, then all the opened application will move to taskbar. once you click application from taskbar, it will launch again. before kill process, the status of application is changed to "stopped". after complete switching, shortcuts on taskbar has only tasks (application) information and when we select shortcut, application would be newly created. now the question comes how to prevent application from killing during mode switch i.e. phone to dex or vice versa? to prevent killing process, application could use "keepalive" declaration. declare the keepalive attribute to true in your manifest file like below: <meta-data android:name="com.samsung.android.keepalive.density" android:value="true" /> in case of application declaring "keepalive", application would be not killed on switching after application’s status changing to "stopped". but, if the application does not add the android:configchanges flag to the activity's manifest, application would be destroyed and recreated like the case of resizing the window. during mode switch, screen size i.e. screen width, screen height, and screen layout, smallest screen size, screen orientation, ui mode, density are changed. to prevent applications from recreating after switching the mode, android:configchanges flag to the activity's manifest is required. we need to add the following configuration changes in manifest file for your activity. <activity android:configchanges="orientation | screensize | screenlayout | smallestscreensize | uimode | density"> so, if we declare both keepalive and android:configchanges flag to the activity's manifest then there will be no killing of the application. in this case when we re-launch app via shortcut in taskbar, the functions are invoked according to the following sequence. onconfigurationchanged(), onrestart(), onstart(), onresume() callbacks are sequentially called. for more information about how the android life cycle works in samsung dex mode, you can refer to: android life cycle blog here.

      Samsung Developer Program

      https://developer.samsung.com/sdp/blog/en-us/2017/12/07/samsung-dex-lifecycle-on-switching-between-mobile-and-samsung-dex-mode
      1. tutorials | mobile

      blog

      Managing In-App Items Using the Galaxy Store Developer API and Python

      galaxy store provides a platform where developers can sell their apps to galaxy device users. samsung in-app purchase (iap) is a payment service which allows you to sell your app's in-app items that are distributed through galaxy store. if you want to make any changes to your app's in-app items, then you have to update your app using galaxy store seller portal. however, if you want the changes to be reflected immediately within the content, even when the content is in the for sale state, then the galaxy store developer api is the solution for you. the galaxy store developer api provides programmatic access to the same types of functionality provided by the galaxy store seller portal. the iap publish api is a part of the galaxy store developer api, a set of server-to-server apis that allows you to manage in-app items. this api is used to view, register, modify, and remove samsung iap items. you can find the curl commands for this api in the iap publish api guide. in this blog article, i am going to demonstrate how to implement the iap publish api using python. let's get started! get started in this example, you should already know about the in-app purchase sdk and how to create items in seller portal. to learn how to sell in-app items through galaxy store, please read the in-app purchase programming guide. the iap publish api supports crud operations for in-app items: create, read, update, and delete. the available http methods for these operations are post, get, put, patch, and delete, respectively. later, i explain which http method is used for which iap publish api. since i implement this api in python, i need to install python on my pc. the rest of this blog assumes you have already done this. prerequisites: seller account: create a seller account in galaxy store seller portal using the galaxy store seller portal user guide. service account id: get the service account id from seller portal. you can find the details here. authorization: get the access token from the galaxy store authentication server using the accesstoken api. check out this blog to learn about creating an access token using python. iap sdk integrated app: iap helper must be integrated into the app. all binaries registered in the content must support iap. connection with the content of the in-app purchase tab area of seller portal: to create this connection, you must either initially distribute your content using the content publish api or the content must be in the for sale state in seller portal. the following headers are required to call any api, just like any other galaxy store developer api. attribute type description content-type string application/json authorization string bearer <your-access-token> service-account-id header your service account id the iap publish api provides a total of six apis to manage in-app items. after fulfilling the above requirements, i am ready to implement these apis in python. view item list i can view the list of item information within a scope. while sending this request, i have to specify the number of pages of content to return and the number of items to be returned for a page. since this is a rest api, i have to make an http request. to make an http request to a specified url, i need the requests library. so, first i have to import the library in our script. i also import the json library to see the response in json format. # importing the requests library import requests # importing the json library import json as mentioned earlier, i need to send some data as the header in the request. first i set these values before creating the header. then i create a dictionary using the syntax {key: value}. here, the key is the attribute name and the value is the header content. access_token = "<access_token>" authorization = "bearer " + access_token service_account_id = "<your-service-account-id>" # header to be sent to the api headers= { 'authorization': authorization, 'content-type': 'application/json', 'service-account-id': service_account_id } the get method is used to read or retrieve data from the given server using a given url. it doesn't change any data. therefore, i use an http get request for this api. in the get request, the package name of an app, the number of pages, and the number of items are required. as an example, i set the number of pages as 1 and the number of items as 20. packagename = "<package-name-of-your-app>" page = '1' size = '20' now, i define the url and send the get request. # defining the api endpoint item_list = 'https://devapi.samsungapps.com/iap/v6/applications/' + packagename + '/items?page=' + page + '&size=' + size payload={} try: response = requests.get(item_list, headers=headers,data=payload) print(response.status_code) pretty_json = json.loads(response.text) print (json.dumps(pretty_json, indent=2)) except exception as e: print(str(e)) figure 1: response of the view item list api view individual item i use this api to view the detailed information of one item. the item id is a required parameter for this api, being a unique identifier of an in-app item registered in seller portal. the python script for this api is similar to the view item list api; i just need to change the request url. itemname = '<item-id-of-specific-package-id>' # defining the api endpoint individual_item = 'https://devapi.samsungapps.com/iap/v6/applications/' + packagename + '/items/' + itemname try: response = requests.get(individual_item, headers=headers,data=payload) print(response.status_code) pretty_json = json.loads(response.text) print (json.dumps(pretty_json, indent=2)) except exception as e: print(str(e)) figure 2: response of the view individual item api create item this api allows you to create a new item, which can be either consumable or non-consumable. to learn more about the item types, visit the iap programming guide. to register an item, you are required to set nine parameters as the data in an http post request. the post method is used for creating a new resource. first, let's go through an example where i create a new item called 'one_gallon_gas'. i set a title of this item and a description which explains the purpose of this item. to be able to purchase the item multiple times, i set its type as consumable. i set the 'phonebillstatus' attribute as 'true' so that the user can pay by an automatic payment on their phone bill. i set the item status as 'published' to list it for sale in galaxy store. finally, i set the usd price, local price, country id, and currency values. next, i create a dictionary to hold the data which is sent to the api. i need to send serialized data in a form of a string and thus json.dumps is necessary to perform the serialization. # data to be sent payload = json.dumps({ "id": "one_gallon_gas", "description": "fuel for driving game", "status": "published", "type": "consumable", "usdprice": 0.99, "title": " 1 gallon gas", "prices": [ { "countryid": "nga", "currency": "ngn", "localprice": "400.000" }, { "countryid": "per", "currency": "pen", "localprice": "3.900" }, { "countryid": "swe", "currency": "sek", "localprice": "11.000" } ] }) finally, i define the url and send the post request. new_item = "https://devapi.samsungapps.com/iap/v6/applications/" + packagename + "/items" try: response = requests.post(new_item, headers=headers,data=payload) print(response.status_code) #print(response.text) pretty_json = json.loads(response.text) print (json.dumps(pretty_json, indent=2)) except exception as e: print(str(e)) modify item this api allows you to modify an in-app item without updating the app. the item id can't be changed using this api. it is recommended to use the response from the view individual item api to create the input required for this request. in this example, i modify the title and description of an item which i created in the previous section. i also modify the usd price, local price, country id, and currency values. i create a dictionary to hold the data which is sent to the api, as was done in the previous section. # data to be sent payload = json.dumps({ "id": "one_gallon_gas", "title": "3 gallon gas", "description": "modify fuel for driving game fix", "type": "consumable", "status": "published", "itempaymentmethod": { "phonebillstatus": true }, "usdprice": 1, "prices": [ { "countryid": "kor", "currency": "krw", "localprice": "900" }, { "countryid": "usa", "currency": "usd", "localprice": "1" } ] }) since this request is for modification, i send it using a put request, which is a method for updating the entire resource. so, i define the url and send the http request. # defining the api endpoint modify_item = "https://devapi.samsungapps.com/iap/v6/applications/" + packagename + "/items" try: response = requests.put(modify_item, headers=headers,data=payload) print(response.status_code) pretty_json = json.loads(response.text) print (json.dumps(pretty_json, indent=2)) except exception as e: print(str(e)) partial item modification this api is used to modify the title, countryid, or localprice of an in-app item. i can't change the item id using this api. this api only does a partial update unlike the modify item api, so an http patch request is used. the patch request requires only those fields which are to be modified. it doesn't change the other fields of the resource, in contrast to the put request which changes the entire resource. in this example, i modify only the title of the 'one_gallon_gas' item. the python script remains the same as in the previous section. # data to be sent to the api payload = json.dumps({ "id": "one_gallon_gas ", "title": "5 gallon gas" }) # defining the api endpoint partial_modify_item = "https://devapi.samsungapps.com/iap/v6/applications/" + packagename + "/items" try: response = requests.patch(partial_modify_item, headers=headers,data=payload) print(response.status_code) pretty_json = json.loads(response.text) print (json.dumps(pretty_json, indent=2)) except exception as e: print(str(e)) remove item this api allows us to remove an in-app item. here, the item id is the required field in the request url. i add the item id in the request url and send the http delete request. the delete method is used to request the server to delete a resource specified by the given url. itemname = "one_gallon_gas" # defining the api endpoint remove_item = "https://devapi.samsungapps.com/iap/v6/applications/" + packagename + "/items/" + itemname payload = {} try: response = requests.delete(remove_item, headers=headers,data=payload) print(response.status_code) pretty_json = json.loads(response.text) print (json.dumps(pretty_json, indent=2)) except exception as e: print(str(e)) figure 3: response of the remove item api conclusion other than selling paid apps, in-app purchases are the most common and popular way to monetize an app. you can integrate the samsung in-app sdk in your app to generate profit and use the iap publish api to automate item-related tasks. this is the last blog article of this series. i hope you've found this article helpful. you can check out the other blogs about the galaxy store developer api below. blog articles in this series how to create an access token for the galaxy store developer api using python: learn how to create an access token using the galaxy store developer api and python. how to get statistics: galaxy store statistics (gss) is a tool that provides information about your sales, revenue, ratings, and much more, which helps you to make more effective business decisions. you can learn how to get statistical data from your apps using python. how to manage content: manage your content in galaxy store by using the content publish api. in an app production system, managing content is a frequent task. this blog covers the implementation of this api using python to automate your app distribution system.

      Jakia Sultana

      https://developer.samsung.com/sdp/blog/en-us/2022/06/15/managing-in-app-items-using-the-galaxy-store-developer-api-and-python
      1. success story | web

      blog

      PWA Series: ? Discovery and Interview of Nick from makemeacocktail.com

      we at samsung internet care a lot about progressive web apps (pwas), this is why we decided to feature some awesome pwas that we found online. firstly, what are pwas? progressive web app (pwa) is a concept created by frances berriman and alex russel to describe apps taking advantage of new features supported by modern browsers that are built using including html, css, and javascript (yes, just web technologies ❤). this is the introduction to laura’s blog post. i recommend reading her blog post if you are interrested in making a pwa: progressive web apps: making app-like experiences in the browser context i discovered make me cocktail, thanks to dan (the director of web advocacy at samsung internet) during a conversation about pwas that he was using. i found the web app particularly useful, especially the “my bar” feature which is just doing the job and making it easier to find nice recipes using only what we have at home. also, very convenient for noobs like me. we thought why not reach out, learn more about why they choose to develop a pwa for their platform and write a blog post about it! make me a cocktail an interview with nick wilkins from make me a cocktail make me a cocktail was founded in 2010, by nick, with the goal of becoming the best online platform related to cocktail and drink recipes. all of this started because nick became annoyed of browsing the web trying to find a decent cocktail recipes, and so he decided to create his own platform! since then the platform evolved and became more popular with more functionalities and design improvements. why did you decide to make the website a pwa? we originally floated the idea of making the site a pwa when we were investing in a small rewrite of some core underlying structures on the site, and seeing what new technologies had emerged and were emerging in the dev world. at this time we were also investing heavily in performance and trying to understand how we could make our fairly image- and dynamic- rich site, fast and performant for all our users. we were also really keen to explore the possibilities or porting our site over to an app — and this seemed like a great emerging option for this. did you encounter any technical challenges during the process? we decided early on to not make our site a pure fully-works-offline pwa, but to utilise all of the technologies and opportunities a pwa gives you to give the best experience to the user. obviously the service worker was a large part of this, and that was the core technical challenge we encountered. good documentation and tutorials were sparse when we first started to utilise it. browser dev tools weren’t quite as slick for service workers as they are now, so the core hurdles were dealing with understanding the service worker lifecycle and how to test new ones efficiently and cleanly. our knowledge of dev tools and the network pane specifically, really increased here. how did the pwa help you, and how did you utilise the service worker power? ultimately the pwa has helped us in two areas. one is speed and performance. the service worker caching mechanisms and thus serving up assets quickly to users is just a win-win situation. but, we also like to think, and this is a little less tangible, that we’ve given users more accessibility and a better user-experience / option to find data quicker. things like the manifest, the add to home screen options and the like have helped create quicker avenues to data for the end-user. thoughts it really is fairly easy now to create a base pwa without offline capability. depending on your app size and complexity, and your stack, adding full or partial offline capability can be harder and more of a technical challenge. dynamic user based data that you can’t cache upfront (or can’t cache up to date data) comes at a price if you want to go down that route, and it's important to explore all those avenues. there are little cons to implementing the base pwa experience, the cons really come with time and knowledge that you may need to invest. but ultimately it is all worth it. conclusion as said by nick above, creating pwas is the way to give better experiences to users. this is why at samsung internet, we do care a lot about pwas, and we are currently seeking for pwas with good user experience to share with the community or even write about! please contact us by email browser@samsung.com or twitter if you are working on a pwa or know a good pwa ! thank you, kevin (@kevinpicchi, picchi.ch)

      Kevin Picchi

      https://developer.samsung.com/internet/blog/en-us/2020/04/22/pwa-series-discovery-and-interview-of-nick-from-makemeacocktailcom
      1. tutorials

      blog

      Using a Custom Font In Your Xamarin.Forms Tizen Application

      previously, in order to use custom fonts in existing xamarin.forms applications, you had to add the font asset in each platform project and use the fontfamily property to apply the fonts. this was very cumbersome, because each platform required a different syntax for referencing a font file. as we introduced in a previous blog post, using custom fonts in your tizen .net applications was not so simple, either. xamarin.forms 4.5.0 introduced a new uniform way to specify custom fonts across platforms. you could define custom fonts on each platform and reuse them by including them as application resources, which was a feature available in xamarin.forms 4.5.0 pre release 1. we've added tizen support to this feature, so you don't need to write code to use custom fonts. note: this change is effective as of xamarin.forms 4.5.0 pre release 2 and higher. this blog explains how to use custom embedded fonts in xamarin.forms tizen applications. add the font file to your project in visual studio to add fonts as resources, perform the following steps in the visual studio. 1. create a folder to store the font files to create a folder for storing the font files, right-click the project folder and select add > new folder. let's call it resource. 2. add a font file to your project to add a font file to your project, right-click the resource folder you just created and go to add > existing item..., or drag the file from file explore (on windows) or finder (on mac) and drop it into the resource folder. you can add truetype font (.ttf) and opentype font (.otf) files. you can obtain sample font files here. note: be sure to add the font file with build action: embeddedresources. otherwise, the font file will not be distributed as part of your app. in addition, you should register the font file with the assembly, in a file such as assemblyinfo.cs, using the exportfont attribute as follows: using xamarin.forms; [assembly: exportfont("cutefont-regular.ttf")] [assembly: exportfont("ptm55ft.ttf")] [assembly: exportfont("dokdo-regular.ttf")] [assembly: exportfont("fa-regular-400.ttf")] after you add the font file to your project as a resource, you can begin assigning the font to visualelement items that have the fontfamily property, such as label, entry, and so on. font name can be specified in xaml or in c# code. as mentioned, you no longer need to know platform-specific rules for specifying fontfamily attributes. it works whether you use the full path and font name separated by a hash (#) as the font name (as in android) or just the font name (as in ios). note: the font file name and font name may be different. to discover the font name on windows, right-click the .ttf file and select preview. you can then determine the font name from the preview window. use your custom font in xaml <label text="custom font 한글" /> <!-- custom fonts --> <label text="custom font 한글" fontfamily ="cutefont-regular" /> <label text="custom font 한글" fontfamily ="dokdo-regular" /> <label text="custom font 한글" fontfamily ="ptm55ft.ttf#ptmono-regular" /> <label text="custom font 한글" fontfamily ="fa-regular-400.ttf#fontawesome5free-regular" /> <!-- system fonts --> <label text="custom font 한글" fontfamily ="breezesans-thin" /> <label text="custom font 한글" fontfamily ="breezesans-bold" /> use your custom font in c# new label { text = "custom font 한글", }; // custom fonts new label { text = "custom font 한글", fontfamily = "cutefont-regular" }; new label { text = "custom font 한글", fontfamily = "dokdo-regular" }; new label { text = "custom font 한글", fontfamily = "ptm55ft.ttf#ptmono-regular" }; new label { text = "custom font 한글", fontfamily = "fa-regular-400.ttf#fontawesome5free-regular" }; //system fonts new label { text = "custom font 한글", fontfamily = "breezesans-thin" }; new label { text = "custom font 한글", fontfamily = "breezesans-bold" }; all the examples above are also found here. screenshot now that you've reviewed the simple steps in this blog, check out the sample font files, see the many truetype and opentype fonts that are out there, and try custom fonts in your own xamarin.forms tizen applications.

      Kangho Hur

      https://developer.samsung.com/tizen/blog/en-us/2020/02/04/using-a-custom-font-in-your-xamarinforms-tizen-application

      web

      Foldables and Large Screens | Samsung Developers

      foldables and large screens new opportunities in the mobile experience design guidelines design guidelines boost your apps’ value withfoldable & large screen optimization your galaxy becomes simpler, more convenient and better optimized with one ui. one ui provides meaningful innovations and improves your everyday life, ensuring that you adapt in the ever-changing world. also, one ui continues to evolve to bring your joyful experiences to life. rich ui optimized for large screens! foldable devices can provide richer experiences than phones. learn how to optimize your app's ui for large screen devices in our newly updated one ui guide. read more all tags all tags sdc22 galaxy z implement multi-window picture-in-picture on a video player learn how to implement multi-window picture-in-picture (pip) feature on a video player app for a seamless viewing experience on foldable devices. 20 mins start sdc22 gamedev galaxy z implement flex mode on an unreal engine game learn how to implement flex mode on an unreal engine game using android jetpack windowmanager and raw java native interface (jni). 120 mins start sdc22 gamedev galaxy z implement flex mode on a unity game learn how to implement flex mode on a unity game using android jetpack windowmanager and unity's java native interface (jni) wrapper. 90 mins start sdc22 samsung internet galaxy z develop a camera web app on foldables learn how to develop a camera web application that detects partially folded posture and adjusts its layout accordingly to improve user's experience on samsung foldable devices. 30 mins start galaxy z implement app continuity and optimize large screen ui of a gallery app learn how to apply app continuity and large screen optimization on a gallery app for seamless experience on foldable devices. 40 mins start galaxy z configure an app to enable drag and drop in multi-window learn how to implement drag & drop on a note-taking app when in multi-window mode. 30 mins start galaxy z implement flex mode on a video player learn how to implement flex mode on a video player app using android jetpack window manager. 30 mins start if you don’t have any galaxy z devices try remote test lab! remote control test lab provides a foldable device for testing app even when you don’t onw one. check out the video tutorial on the remote test lab to max out your knowledge! video thumbanil blogs go to blog search this wide range of blog articles for tips and valuable know-how in developing apps related to foldable & large screen optimization. galaxy z tech docs get detailed info on the galaxy z (foldable) in the following tech documents. overview the new form factor is not the only thing notable in foldable phones. it opens new opportunities in the mobile experience. app continuity app continuity refers to the capability of an app to seamlessly restore the user state when it receives a configuration change. multi-window the ability to have multiple windows open simultaneously benefits from larger screen real estate. flex mode when your phon is partially folded, it will go into flex mode. apps will reorient to fit the screen, letting you sending messages. ux and ui considerations by considering new layouts and navigation patterns, app developers can explore opportunities to build greater experence. testing the how your app reacts to optimized ui layout, app continuity, multi-active window and flex mode. community forums & tech support ask question and find answers at forums. if you need development support, submit a support request. developer forum tech support our partners meet samsung’s partners already making use of ui optimized for large screens.

      https://developer.samsung.com/foldables-and-largescreens
      1. tutorials | galaxy watch

      blog

      Use Tizen Web To Measure Heart Rate With Galaxy Watches

      health monitoring is a very popular feature in smart watches, and tizen provides various apis for this purpose. one api is humanactivitymonitor, which allows users to monitor health by providing metrics such as heart rate, step count, and stress level. this blog describes how to measure heart rate using this api. a sample web app combined with a widget is attached. this sample app measures heart rate and stores data by timestamp, and the widget shows the last measured heart rate. this blog focuses on how to measure heart rate using the device sensor, stored data, and communication between an app and a widget. create and run a tizen project 1. create a project in tizen studio. because our target is an app that is combined with a widget, select the widget template to create this project. 2. add the tizen advanced ui (tau) framework library to your project. you can create and manage various ui functionalities using the tau library as an alternative to designing a ui with html and css components. 3. link the tau.circle.min.css and tau.min.js in the app’s index.html file. <link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.min.css"> <link rel="stylesheet" media="all and (-tizen-geometric-shape: circle)" href="lib/tau/wearable/theme/default/tau.circle.min.css"> <script src="lib/tau/wearable/js/tau.min.js"> </script> measure heart rate and manage data to measure heart rate using the humanactivitymonitor api, add the following feature and privilege to the config.xml file: <feature name="http://tizen.org/feature/humanactivitymonitor"/> <tizen:privilege name="http://tizen.org/privilege/healthinfo"/> applications must request a user’s permission for privacy-related features. the tizen.ppm.requestpermission() method invokes the permission pop-up. when users give permission through the pop-up, they can then use the app features related to that privilege. to measure heart rate, users must give permission to access the sensor using the following code snippet: function onsuccess() { function onchangedcb(hrminfo) { console.log(‘heart rate:’ + hrminfo.heartrate); tizen.humanactivitymonitor.stop('hrm'); } tizen.humanactivitymonitor.start('hrm', onchangedcb); } function onerror(e) { console.log("error " + json.stringify(e)); } tizen.ppm.requestpermission("http://tizen.org/privilege/healthinfo",onsuccess, onerror); note that the humanactivitymonitor api provides heart rate data directly in bpm (beats per minute). if you need the raw data of the sensor, you can use sensorhrmrawdata. the following screenshot shows how to measure heart rate using the sample app: the web storage api stores data in key-value format. this api offers two types of storage - local and session. in the sample, we use local storage, along with date as key and heartrate as value. the date key retrieves data according to date, week, and month. if you do not want to retrieve history according to date, you can use a different key, such as an integer value; just make sure there is no repetition in key value. create a date object to get the current time stamp. localstorage.setitem() puts the key (date)-value (heartrate) pair in local storage. var date_key = new date(); localstorage.setitem(date_key, hrminfo.heartrate); to retrieve data, filter according to the key. date and month are retrieved from the date object and filter data using localstorage.getitem(localstorage.key(i)). var date = new date(); var lastdate = new date(localstorage.key(i)); if (lastdate.getdate() == date.getdate() && lastdate.getmonth() == date.getmonth()) { console.log(localstorage.key(i)+ " :" + localstorage.getitem(localstorage.key(i))); the following screenshot shows how the history is categorized by day, week, and month: communication between the app and a widget the sample widget shows the last measured heart rate value, and heart rate history is stored in the local storage of the web app. to establish communication between the app and widget, we’ll use the preference api. the preference api stores key-pair values, allowing web widgets to communicate with their parent apps. in the app, data is stored with ‘key’: tizen.preference.setvalue('key', hrminfo.heartrate); in the widget, data is retrieved using the same ‘key’: if (tizen.preference.exists('key')) { console.log(‘last measured: ‘ + tizen.preference.getvalue('key')); } the following screenshot of the sample widget shows the last measured heart rate: launch the app from a widget to launch an app from widget, add the following privilege to config.xml: <tizen:privilege name="http://tizen.org/privilege/application.launch"/> to launch an app, provide your app id in tizen.application.launch(). tizen.application.launch(yourappid); in the sample widget, the user taps measure to launch the heart-rate measuring page or history to launch the heart-rate history page, and preference can be used to determine which one is clicked. to implement, a different key-value pair is set for each page in the widget, and in the web app, key values are checked to detect which page is clicked. for example, in the widget, the open_measure key is set to 1 to link to the measure page. the app then launches. tizen.preference.setvalue(‘open_measure’, 1); tizen.application.launch(yourappid); the app checks for the open_measure key. if the key exists, the user is redirected to the measure page with tau.changepage(). window.onload = function() { if (tizen.preference.exists(' open_measure ')) { tau.changepage(yourpageid); } } you can also use the humanactivitymonitor api to implement a step counter, stress level reading, gps, and other features in your wearable device. because enabling other features is similar to implementing the heart rate monitor, you can use this blog as a guide and the attached sampleheartratemonitor to enable a full range of health monitoring metrics to your galaxy watch.

      Ummey Habiba Bristy

      https://developer.samsung.com/sdp/blog/en-us/2019/10/02/use-tizen-web-to-measure-heart-rate-with-galaxy-watches
      1. events | mobile, game

      blog

      Reboot Recap: Seriously Explicit Lessons In Vulkan

      in april, samsung galaxy gamedev went to croatia for reboot develop blue. we sent two technical staff and an account manager for a whole host of activities, and i’ll admit that we looked at the event (which is new to us) as a rather speculative attempt to connect with game developers. after all, reboot previously had no technical track and has only been running for a handful of years; maybe it would turn out to be a non-event. but reboot managed to exceed all our expectations. we had approximately 60 seriously-interesting and highly-competent game developers in our sessions. alon or bach, who heads our vulkan standards effort, did a great job in a talk on advanced vulkan programming techniques, which are used in croteam’s serious engine for mobile. alon then went on to host a panel discussion on the merits of vulkan. this panel featured some lively and informative input from karlo jež from croteam, christian forfang from arm, and graham wihlidal from ea’s seed group. quiz time! watch the above video of alon presenting at reboot, then answer the following multiple-choice questions (scroll to the end of the blog the answers). 1. what is the most significant performance gain you can reasonably expect to see when you completely fix some badly-chosen pipeline barriers in a trivial vulkan app? a. 25% b. 50% c. 100% d. nothing, there’s no such thing as a badly-chosen pipeline barrier. 2. in general, what’s the preferred draw order for opaque geometry in vulkan? a. left to right b. right to left c. top to bottom d. bottom to top e. front to back f. back to front g. some other order that isn’t listed here. 3. in terms of texture formats, why is a “tiled” buffer generally preferred to a “linear” buffer? a. samsung’s tiling architectures store tiled buffers on chip. b. reducing power consumption is more important for mobile devices than protecting bandwidth. c. there’s a bug in the driver. d. ha! it’s a trick question! tiling isn’t preferred. e. texture fetches cooperate better with the cache that way. 4. to make sure you were paying attention -- and for two special bonus points -- what animal did alon reference in his talk, and why? on the account management side, david pither spent most of his meal and coffee breaks over the three days having enlightening conversations with both developers and publishers who might benefit from collaborating with samsung’s galaxy gamedev group. it was business networking at its best, and we came back with a long list of action items which has kept david busy for weeks. david also set up conversations with folks that we regularly work with like sega, croteam, and ea. it’s always good to keep in touch with the big boys of gaming. we now know more about their technology and publishing roadmaps, which means we now know more about how we can help. my trip home was a bit of a disappointment. getting home roughly 15 hours late isn’t high on my list of “fun ways to start a holiday,” but it certainly won’t stop me (and more importantly) samsung from going back next year. in fact, my enthusiasm levels for the reboot events are so high that we plan to attend the reboot develop red event in banff in october. and of course, we’ll be back in croatia next spring. hopefully, we’ll see you there as well! reboot blue, and reboot red – they’re both firmly in our calendar from here on. soon we’re going reboot purple. we’re adding a lot more technical info over the coming months, so make sure you revisit the blog soon to learn more about vulkan. in the meantime, to keep you going: a gentle intro: vulkan-tutorial.com/introduction a set of beginner's guides: khronos.org/blog/beginners-guide-to-vulkan getting in deep: khronos.org/developers/library/2019-vulkanised-is-back (.pdf format) youtube.com/user/khronosgroup (videos) jet set vulkan : reflecting on the move to vulkan quiz answers 1: c 2: e 3: e 4: a hedgehog – because alon’s fellow speaker’s name is “karlo jež” and jež is croatian for hedgehog!

      Richard Huddy

      https://developer.samsung.com/sdp/blog/en-us/2019/08/05/reboot-recap-seriously-explicit-lessons-in-vulkan
      1. tutorials | mobile, foldable

      blog

      Adapt Your App to Foldable Devices for an Optimal User Experience

      foldable technology for mobile is a groundbreaking experience not only for users but also for developers. the presence of many form factors like immersive display, app continuity, flex mode and ux optimization challenge developers to think outside of the box to adapt to this technology. in this blog, we discuss a checklist to provide a better understanding about the adaptation, modification and design changes that are required. so, let's go through each point, one-by-one. large screen optimization samsung foldable devices have two different physical screens: the cover display and the main display. as the cover display is much smaller than the main display, large screen optimization is one of the key areas of designing ux for foldable devices. in a nutshell, your app can utilize the extra space in the main display by showing more information. just having a different ui design with the same information can do the trick of optimization as well. large screen optimization of a note app to implement this scenario, define different layout files for each display using the alternate resources option. for example, if you want to define a different ui for the main display, create a new directory named layout-sw600dp under the res directory and then create an xml file named activity_main. then add the layout code as required. ui is designed separately for the main display and the cover display flex mode optimization in galaxy z series devices, samsung introduced a new mode called flex mode. this mode allows users to use apps while the book-like phone is partially folded. creative design can really make your app stand out from others in flex mode. google duo app in flex mode in galaxy z series devices using google’s new jetpack library, windowmanager, you can detect the current posture of a galaxy z series device and update the ui accordingly by following these steps: step 1: add the dependencies in the build.gradle. implementation "androidx.window:window:1.0.0-alpha01" step 2: define a windowmanager instance. val windowmanager = windowmanager(this, null) step 3: register the devicestate change listener. the listener notices changes in the device state (for example closed, opened, half_opened). windowmanager.registerdevicestatechangecallback( mainthreadexecutor /* executor */, callback /* consumer<devicestate> */ ) step 4: write a callback function to check devicestate.posture to get the current posture of the device. if the posture is posture_half_opened, the app ui gets updated for flex mode. val callback = consumer<devicestate> { devicestate -> if (devicestate.posture == devicestate.posture_half_opened) { // display is folded, show split ux } else { // display is not folded, show full screen ux } } check out the codelab challenge on flex mode for a more hands-on experience. app continuity while folding and unfolding the device, the app must prevent data loss thus ensuring its continuity. this is achievable by using the onsaveinstancestate() method. first, save the data to retain the current state with onsaveinstancestate(). @override public void onsaveinstancestate(bundle savedinstancestate) { //save the current state } then, restore the data in the oncreate() function. @override protected void oncreate(bundle savedinstancestate) { if (savedinstancestate != null) { //restore the previous state } } stopwatch app continuity while unfolding device to have a better understanding of implementing app continuity, see the codelab challenge on app continuity. responsive ui layout to adapt to new form factors such as a diverse aspect ratio, flex mode, multi-window, and pop-up window, utilize the following guidelines : design a responsive ui layout for your app using constraintlayout. define the activity of your app as resizable, to ensure the maximum compatibility of your app with both the cover display and the main display of the device. set the resizableactivity attribute to true in manifest.xml. <activity android:name=".mainactivity" android:resizeableactivity="true"> … </activity> responsive layout of the spotify app cutout and punch hole of the main display the main display of a galaxy z fold is covered by an area on the top-right side called the “l-cut” whereas the galaxy z fold2 and fold3 have a punch hole in the upper right side and the galaxy z flip devices have a punch hole in the middle. some portion of your app’s ui could be covered by the l-cut or the punch hole. content is covered by the l-cut in a galaxy fold device in landscape mode to avoid such a scenario, depending on your ui content style, define a display cutout mode. for example, the content is letterboxed in landscape mode whereas it is rendered into the cutout area in portrait mode by default. define the display cutout mode in the style.xml as shortedges so that your content is rendered into the cutout area in both portrait and landscape modes. <item name="android:windowlayoutindisplaycutoutmode">shortedges</item> display cutout in the default mode and the shortedges mode, respectively last but not the least, you can test your app on our device cloud, samsung remote test lab, to make sure you have implemented all the checkpoints discussed in this blog. you can also participate in our codelab challenges to have a clear understanding of the implementation details. in this blog we have discussed about how to adapt your app for foldable devices. we hope it is a good guide for you to start with. you can also check out samsung’s official documentation and reach out to our developer community if you have any queries.

      Ummey Habiba Bristy

      https://developer.samsung.com/sdp/blog/en-us/2021/09/14/adapt-your-app-to-foldable-devices-for-an-optimal-user-experience
      1. tutorials | mobile

      blog

      Remote Test Lab: Testing Your App with Auto Repeat

      this blog is the third in a series of posts about remote test lab. in previous blogs, we covered what is remote test lab and its new features. next, we are going to take a deep dive into some useful features of remote test lab. the remote test lab service lets you install and test your applications on real devices. in this blog, we are going to install an application and test it on remote test lab devices with auto repeat. auto repeat is a tool that lets you create a test scenario automatically, repeat the same test several times, and reuse the test later. information: the auto repeat feature is supported on a java-based client only. install your application to get started, launch a remote test lab client, then go to remote test lab and reserve one of the available mobile devices. you can install your application on the remote device by dragging and dropping the application package from your computer into the remote test lab client. through the client, you can watch how the application behaves on the device. you can also install applications by going to management > application manager or selecting test > install application in the device context menu. install your application in any of the ways described above. record and play events recording and playing back events is one of the ways to test your applications automatically. when you record events for repeated testing, we recommend that you start and finish recording at the same screen on the remote test lab client. the following figure shows the most commonly used buttons in the auto-repeat window. ① the add button lets you add more actions manually. ② the record button starts recording actions on your device screen. ③ the play button starts playing a test. ④ the stop button stops playing a test. to start recording a test scenario, proceed as follows: click test > auto repeat in the context menu on the remote test lab client. in the auto repeat window, click the record button. once the record button is clicked, all events on the rtl client are recorded. the recorded events are added to the event list in the auto repeat window. click the stop button when you want to stop recording. the number of events and how long the test took to run appear under the event list. to run the test repeatedly, enter a number into the test repeat field in the test option section. click the play button. monitor the progress of your test in the auto repeat window. you can check the completion progress as well as which step is currently running. click file > save. an xml file is saved to your computer. you can reuse the xml file to test your application on other devices with the same resolution. the following video shows each step of recording events and playing back the test procedure. create test sequences manually you can also create a test scenario by adding events manually. this method can be more complicated but it lets you insert a wide variety of events to your scenario. to add an event to your test scenario, proceed as follows: click the add button in the auto repeat window. select a desired event. the selected event is added to the event list section. fill in the related information in the event properties section. every event has its own properties. properties you do not need to fill in are marked with n/a in the event list section. if a mandatory property is missing, the test isn't performed. click the play button. the following video shows each step of adding events manually. you can create complete test scenarios by recording events or manually add more events to make the test scenarios more sophisticated. remote test lab article series get started with remote test lab for mobile app testing what's new in remote test lab run and test applications with remote debug bridge in android studio (coming soon) web-based client preview (coming soon) go to remote test lab

      RTL Support

      https://developer.samsung.com/sdp/blog/en-us/2021/04/15/remote-test-lab-testing-your-app-with-auto-repeat
      No Search Results
      No Search results. Try using another keyword.
      • <<
      • <
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • >
      • >>
      Samsung Developers
      Samsung Developers
      Quick Link
      • Android USB Driver
      • Code Lab
      • Galaxy Emulator Skin
      • Foldables and Large Screens
      • One UI Beta
      • Remote Test Lab
      • Samsung Developers Podcast
      Family Site
      • Bixby
      • Knox
      • Samsung Pay
      • SmartThings
      • Tizen
      • Samsung Research
      • Samsung Open Source
      • Samsung Dev Spain
      • Samsung Dev Brazil
      Legal
      • Terms
      • Privacy
      • Open Source License
      • Cookie Policy
      Social Communications
      • Facebook
      • Instagram
      • Twitter
      • YouTube
      • Buzzsprout
      • Rss
      • Linkedin
      • System Status
      • Site Map
      • System Status
      • Site Map
      • facebook
      • instagram
      • twitter
      • youtube
      • buzzsprout
      • rss
      • linkedin

      Copyright © 2023 SAMSUNG. All rights reserved.