Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Galaxy Watch for Tizen
docfaq q01 why are my watch apps not available in the galaxy store for upgraded gear watches or new devices? you must specify in seller portal that your binary is compatible with all new devices a watch with an upgraded os is considered a new device and republish your app after your updated app is published, it will be available to those new devices on gear s3 and gear sport watches, the tizen os can be upgraded gear s3 can be upgraded from tizen 2 3 2 to tizen 3 0 or 4 0 gear sport can be upgraded from tizen 3 0 to tizen 4 0 if you published your app before these upgrades were available, the option to include the upgraded watch as a compatible device was not available in seller portal for example, if you published your app before tizen 4 0 was released, your selections for compatible gear sport watches in seller portal would have been for tizen 3 0 only likewise, your selections for compatible gear s3 devices would have been for tizen 2 3 2 and 3 0 as a result, a customer who has upgraded their watch to tizen 4 0 will not be able to view your app in the galaxy store in order to have your watch app recognized as compatible with an upgraded watch, you must update the compatible devices for the binary in seller portal in general, if a new device is released or an existing device becomes upgradable to a new os after you have published your app and you want your app available on these devices, you must update your binary to be compatible with these devices and republish your app to update the list of compatible devices for your binary file in seller portal log in to seller portal and open your watch face app click the binary tab at the top of the binary section, in the middle is a box with selected device s and the total number of selected compatible devices click on the number in the detailed device settings window, select each device with which the binary is compatible if your binary is compatible with all listed devices, click select all click save submit your app for validation and, after it has been successfully validated, republish it q02 create product images for galaxy watch detail pages make your galaxy watch face or app stand out in the galaxy store samsung recommends that you use portrait-orientation product images for your galaxy watch detail page users can just tap on a portrait image to open it in full-screen mode, creating an optimal phone experience and allowing your app to stand out in the galaxy store best practices use detailed, close-up images of the product we suggest that you use just the product and logo with minimal or no text for a strong image that shows the quality of your workmanship avoid using identical images for the icon, cover image, and screenshot in this case, the detail page shows three duplicate images rather than three separate views of the product screenshot resolution we suggest the following resolution guidelines for screenshots cover image = 1024 x 500 pixels horizontal screenshots = 1500 x 750 pixels vertical screenshots = 550 x 1100 pixels galaxy store asset creator you can use the galaxy store asset creator to easily export the assets you need to publish your watch face to the galaxy store to use this tool, you need photoshop version 16 0 cc 2015 or later a basic understanding of photoshop download the galaxy store watch asset creator template to get started! lifestyle photo asset packs show off your watch face designs on an actual watch using our "smart" photoshop files download lifestyle photo assets and save time! examples the following screenshot shows a galaxy watch detail page with three portrait screenshots that show detailed aspects of the galaxy watch face the following screenshot shows a galaxy watch detail page with landscape screenshots that are cut off on the sides, making them less visually appealing in the galaxy store q03 find, download, and export galaxy watch images use the lifestyle photo assets to show your watch face designs on an actual watch or, use the galaxy store asset creator to easily export the assets you need to publish your watch face to the galaxy store to use these tools, you need photoshop version 16 0 cc 2015 or later a basic understanding of photoshop download lifestyle photo assets and save time! download the galaxy store watch asset creator template to get started! q04 develop galaxy watch faces with galaxy watch studio you can use galaxy watch studio formerly galaxy watch designer to design your galaxy watch faces to download galaxy watch studio gws , go to /galaxy-watch-tizen/studio/overview html to develop watch faces using gws, see the galaxy watch studio tutorial q05 what is a distributor certificate and how is it used? the distributor certificate is used for signing and verifying your app it identifies the distributor for example, galaxy store and grants privileges to that distributor for testing purposes, it ensures that your signed application is installed on registered devices only in order to test your app on a device, the device must be registered in your personal distributor certificate then, you must build your app, which signs the app using your personal distributor certificate to generate a personal distributor certificate and register a samsung device, using the galaxy watch studio formerly galaxy watch designer , from the main menu bar, click project > distribute certificate for more information, see get your certificates using tizen studio, from the main menu bar, click tizen tools > certificate manager the samsung certificate extension must be installed in order to properly generate a personal distributor certificate for your samsung device for information about the samsung certificate extension, see installing certificate extension for information about the certificate manager, see creating certificates and managing certificate profile the personal distributor certificate is used for testing only when you release your app for sale in the galaxy store, your personal distributor certificate is replaced by an official distributor certificate if you upgrade a registered device for example, you upgrade the tizen os , you may need to re-register the device in your personal distributor certificate for example, if you upgrade your galaxy watch 3 or sport watch to tizen 4 0, you must re- register the device in your personal distributor certificate and rebuild your app before testing it on the device you may encounter one of the following error messages if there is a problem with the distributor certificate message message solution account in device profile mismatch with distributor certificate the device has been upgraded and the duid device unique identifier has changed re-register the device in your personal distributor certificate and rebuild your app launching appmanagerappid has encountered a problem the device is not found in your personal distributor certificate or your personal distributor certificate was not created properly register the device in your personal distributor certificate or re-create your personal distributor certificate and rebuild your app the application installation on the device has failed due to a signature error! error code -12 you used the tizen studio distributor certificate when building your app, not the distributor certificate generated by the samsung certificate extension select or create a distributor certificate for your samsung device using the certificate manager and rebuild your app for information about the samsung certificate extension, see installing certificate extension for information about the certificate manager, see creating certificates and managing certificate profile for more information about distributor certificates, see getting the certificates q06 how to test galaxy watch app in different devices? you can register up to 50 devices to one samsung certificate see creating certificates for more information developer certificate is made of author certificate and distributor certificate to change or add a new device to the certificate, you need to create a new distributor certificate again while keeping the same author certificate for more information, see managing certificate profile q07 what is the deeplink format to redirect users to download android app programmatically from inside galaxy watch app? linking to galaxy app store use the format below to deeplink directly to an app’s detail page, where users can see app description, screen shots etc and then install it to create a link, you need to know app’s fully qualified package name which is declared in android manifest file for android app or config xml / tizen manifest file for galaxy watch app from a galaxy watch app to android app’s store detail page samsungapps //productdetail/ example, samsungapps //productdetail/com example androidapp from a galaxy watch app to galaxy watch app’s store detail page samsungapps //productdetail/ example, samsungapps //productdetail/cnam8ugvz8 from a web site http //apps samsung com/gear/appdetail as?appid= example, http //apps samsung com/gear/appdetail as?appid=cnam8ugvz8 q08 how to update the tau library to the latest version? you can download the latest version of the tau library from downloading tau q09 how to launch android app from a galaxy watch app programmatically? see remote app control q10 when the time zone is changed, the value of the date object constructed in the callback keeps the time zone unchanged for example function test { var now = new date ; console log "hour "+now gethours ; // even when the time zone is changed, it remains unchanged } setinterval function {test ;}, 1000 ; to solve the problem, please see retrieving date and time q11 how to install my galaxy watch application to the device? see testing your app on galaxy watch if your device is galaxy watch s or older, there are 2 ways of transferring your application wgt to galaxy watch device first way is, create an android application -> copy your wgt file to assets folder of the android application -> generate apk -> install this apk through galaxy watch manager to your galaxy watch device second way is, go to command prompt -> go to the directory where the sdb exe tool is located -> make sure your wgt file is in this directory -> type command sdb install wgt q12 how to create an integrated/linked application? the integrated and linked type are deprecated on any samsung watch running tizen 2 3 1 or higher such as gear s2, gear s3, gear sport, and any galaxy watch and are only supported on gear 2, gear s, or any samsung watch running tizen 2 2 or earlier see the video how to create a basic integrated gear application q13 does gear 2 support native applications development? no it is available from the gear s2 based on the tizen 2 3 1 q14 i want to post notifications from my application to the galaxy watch device do i need to create a tizen application for this purpose? no, it is not necessary to create a galaxy watch app to send notifications from your phone every notification that the phone receives is automatically relayed to your galaxy watch device after you enable this functionality in samsung galaxy watch settings q15 does remote test lab support galaxy watch application testing? yes, more information can be found at about remote test lab q16 how do i specify meta data master_app_samsungapps_deeplink? see configuring galaxy watch application q17 where can i find tutorials for galaxy watch application development on the wearable side? see creating your first app q18 i have implemented tizen notification api in my app why are notifications posted by my app not shown in the notification panel of my galaxy watch? notification settings of a galaxy watch can be managed from the galaxy wearable app on your phone if your watch is paired to a phone, check the notification settings in the galaxy wearable app for example, in the galaxy wearable app, you can enable or disable permission for your app to send notifications to your watch also check if "show only when wearing" is enabled if this setting is enabled, notifications won't appear unless you are wearing the watch q19 can i launch the tizen emulator on a system that runs on an amd processor? no, hyper-v/whpx is not supported by amd processors instead, deploy your project directly on your galaxy watch q20 any tips and trick when connecting my galaxy watch to tizen studio? yes, consider the following the pc and watch must be on the same network developer options must be enabled on the watch galaxy watch only supports one sdb connection at a time the watch cannot connect to two different systems that are running tizen studio at the same time see testing your app on galaxy watch for more information q21 do i have to connect my galaxy watch to my pc when i deploy my app from tizen studio? yes, in order to deploy your app from tizen studio to your watch, your watch must be connected to your pc you can connect your watch over wifi
featured
bloganother year will soon be past and, like many of you, we’re looking forward to next year. we’ll be taking some time the next few weeks to be with our families, and will be back in 2022 with more blogs, podcasts, product announcements, and ways for you to succeed with galaxy store and samsung platforms. with the end-of-year holidays upon us, we’re stopping to reflect on what we did in 2021. even with covid making a disruption in everyone’s lives, we’re still here to help developers find answers and hopefully, also find success. here are some of our most memorable moments. 10. developer portal refresh brought a modern look and support for mobile we’ve been working for several years to bring samsung’s developer portal into a single web infrastructure. we moved content from multiple servers and cloud services into a cms that uses open standards and a responsive design for mobile devices. we pored through a decade of content to make sure it was still timely and accurate for your needs today. we integrated the developer forums to use the same samsung account login for both the developer portal and seller portal to give you a more seamless experience. in october of this year, we made a ux refresh to the site and the most amazing thing is how easy that process went. there were no late nights in the weeks prior to launch. we were able to test the new ux in a sandbox rigorously. then the deployment to production happened almost instantaneously. we spent less time worrying about our website and more time creating the content you need to do your work. we understand how important the samsung developer portal is to you and your work. that’s why we took the time to ensure a smooth transition as we made major infrastructure changes. 9. monthly updates keep developers up-to-date on new galaxy store features the galaxy store product management team began publishing monthly newsletters to enlighten developers of the latest features and improvements to seller portal. these updates also usually appear as blog posts in the first week or two of the month. some of the major announcements include: staged app rollouts (october) local currencies in settlement and financial reports (september) private beta testing (july) galaxy store developer api (april) look for more exciting improvements in 2022 as galaxy store continues to innovate. 8. unpacked events bring exciting new product announcements galaxy unpacked in january 2021 brought announcements of the galaxy buds pro, galaxy s21, and the new galaxy smarttag. the event highlighted samsung’s design concepts with one ui 3 and integrated experiences from partners like microsoft and google. the august galaxy unpacked event brought announcements of galaxy z fold3 and galaxy z flip3 phones. these devices have many new hardware and software features for developers to build upon. this blog post highlighted many of the ways that developers can implement features supporting flex mode and s pen remote, while ensuring that users have a seamless experience with app continuity. the most anticipated announcement of the august galaxy unpacked event was the unveiling of galaxy watch4, featuring wear os, powered by samsung. as with the tizen-powered galaxy watch devices, samsung released a new tool, galaxy watch studio converter, to help existing designers bring their watch faces to wear os. designers could also start a new watch face project from scratch with the newly-released watch face studio tool. 7. remote test lab updates allow developers to experience the latest hardware as new devices are announced, developers can use the remote test lab (rtl) to ensure that their apps work properly on the new version of one ui as well as different screen resolutions and pixel densities. in 2021, the rtl development team added support for foldables and galaxy s21 devices, allowing developers to ensure their apps work correctly before the devices are available to consumers. the rtl team also added support for android studio. in september, thousands of devices were added in data centers around the world to ensure that a compatible device is always available. as part of this release, rtl was re-engineered to work exclusively in the chrome browser, so that no external software is needed to test apps on all the latest devices. 6. samsung developer forums activity the samsung developer forums, based on the popular open-source discourse project, were introduced in january 2020, replacing an aging forum infrastructure that didn’t work well on mobile devices. by using the same samsung account authentication method as the samsung developers site, we’re able to provide a nearly-seamless experience across different hosts and platforms. since their introduction, we’ve seen large numbers of visitors stop by the forums with questions. community manager ron liechty has more than 25 years of experience in managing healthy communities—his knowledge and guidance keeps the forums a useful resource for developers. some of these visitors have become our best community members, providing valuable feedback to their peers as well as helping to moderate spam and malicious content. 5. supporting game developers in 2021 games are a noticeable part of the galaxy store experience and we work with many partners and internal teams to ensure that gamers have a great experience on galaxy devices. the galaxy gamedev team works closely with some of the top publishers and developers to improve performance of top titles on mobile. this team creates tools that provide great detail on the performance of the cpu and gpu during intense moments of gameplay. the gamedev team then documents their efforts in a series of best practices and blog posts to help developers everywhere. in addition to our internal team work, we frequently work with our partners at arm to deliver relevant content for game developers. this summer, we published and promoted a number of educational articles, webinars, and training series in cooperation with the arm developer team. best practices for mobile game developers and artists new vulkan extensions for mobile: maintenance extensions new vulkan extensions for mobile: legacy support extensions new game changing vulkan extensions for mobile: descriptor indexing new game changing vulkan extensions for mobile: buffer device address new game changing vulkan extensions for mobile: timeline semaphores mike barnes from the gamedev team, together with eric cloninger from the samsung developers team, presented at the virtual gdc2021 event in july. gdc is an important event for all of us at samsung and we hope to see you all there at the live event in march 2022. 4. new voices appeared on samsung developers podcast, season 2 shortly before the covid-19 pandemic changed our lives, tony morelan from samsung developers attended a podcasting event and came back to the office inspired to start a podcast. he lined up guests from internal teams and important partners. everyone had a great time participating and it gave us a way to continue delivering quality content to developers. as 2020 turned to 2021, we continued bringing interesting guests from across the mobile design and development ecosystem. we used the podcast to talk about the upcoming virtual samsung developer conference and chat with the people that made the event a success. here are some of the highlights from season 2 of the samsung developers podcast: drazen stojcic, urarity – watch faces, design tan nguyen, butterfly-effected gmbh – galaxy themes, marketing, licensing the samsung internet advocacy team – web standards, privacy, foldable devices we’re still hoping for a return to days where we can travel and meet in person, but until that time comes, please join us in listening to these industry veterans and top developers on the samsung developers podcast. season 3 begins in early 2022. 3. blog series instructs readers on design and successful marketing without live events the past two years, we have searched for new ways to continue delivering timely and helpful advice to mobile app designers and developers. as mentioned previously, we worked with arm this year to bring great technical content front and center. we also worked with our network of top designers, developers, and thought leaders on concepts that will help you succeed on galaxy store and in creating better experiences for your users: better for all – in this blog series, we talked with leading designers and experts to help understand the increasingly important concepts behind the diversity, equality, and inclusion movement. this series discussed aspects of language used in apps, themes, and watch designs. it also highlights important guidelines to ensure apps and web sites are accessible to users with sight, mobility, and hearing impairments. better for all: mobile accessibility better for all: inclusive policies with daniel appelquist better for all: equal accessibility better for all: bringing diversity to design with eglantina hasaj and manpreet kaur better for all: diversity in design better for all: developing and designing for diversity refresh for success – it’s not enough to simply submit a title to a digital marketplace and assume success will follow and continue without extra effort. in this series, top galaxy store designers and developers talk about how they maintain their product lines to ensure a steady flow of revenue and new customers. refresh for success: maintain quality themes design with olga gabay from zeru studio refresh for success: improve your process to keep designs fresh with tan nguyen from butterfly-effected, gmbh refresh for success: improve your process and de-clutter your galaxy store with drazen stojcic from urarity prime time design – finding success in designing new products is an intensely unique and personal process. the prime time design series includes interviews with some of the most unique people creating for galaxy store. read how these talented people inspire themselves and how they convert that inspiration into action. prime time design: unpacking the creative process with ramon campos from friss in motion prime time design: unpacking the creative process with pedro machado from health face prime time design: unpacking the creative process with john shih from x9 studio strategies for success – tony morelan was a successful watch face designer before coming to work with the samsung developers team. we’re grateful for his knowledge of design as well as how to turn designs into revenue. in this four-part series, tony points out steps to creating successful galaxy store product submissions. strategies for success: selling your apps strategies for success: understanding consumer trends strategies for success: building your fan base strategies for success: making your brand successful 2. best of galaxy store awards highlight successful developers the galaxy store app on your mobile device is more than just an app. behind the scenes, there is a team of developers, product managers, business leaders, and security experts devoted to ensuring the best possible online experience for consumers in 180 countries. because of their dedication, developers and designers have a great platform for monetizing their work. each year, the samsung developers team works with the galaxy store operations and business development teams to determine the best games, apps, and themes based on revenue, downloads, and impact to consumers. the result is the best of galaxy store awards. in 2018 and 2019, the best of galaxy store awards were presented live, on stage, at the samsung developer conference (sdc). without a live event in 2020 or 2021, the samsung developers team decided to continue the tradition of highlighting and awarding our top galaxy store products. even without an in-person event, we used a live premiere on youtube to have a single moment in time to celebrate with the winners. tony morelan emceed the event, but he had a lot of help from ron liechty, jeanne hsu, susie perez, and shelly wu. we thank them for their hard work. we hope you’ll enjoy watching! look for the “best of galaxy store” sash on apps, games, themes, and watch faces in galaxy store to know that you’re getting a truly unique experience. 1. discovering new opportunities at sdc21 each year, the samsung developer conference is the culmination of an incredible amount of planning and work by hundreds of people. even though the event was virtual in 2021, there was still a huge volume of work. instead of preparing for a live audience, our teams practiced in front of a galaxy phone on a tripod (really). instead of building booths and planning meals, we built a website and social media campaigns to reach a larger audience. eric cloninger and tony morelan kicked off the promotion for sdc21 with a podcast featuring a previous sdc speaker, chris shomo. before the conference, visitors were invited to create whimsical caricatures of themselves using the mysdcstack mini-site and submit their designs to social media. by participating in the event website, watching sessions, and trying the code labs, visitors would earn points toward a prize drawing after sdc. relive the experience of sdc21 by watching the keynote or any of the highlight sessions and technical talks by viewing this playlist wrapping up when sdc is finished, our team takes a collective deep breath, happy to be done. it is a satisfying experience to pull off a big industry event. we don’t know yet how we’ll handle live events, but we remain optimistic that some will occur. we are making plans and we hope we’ll be able to see you, somewhere, in 2022. 🤞 take care. stay warm (or cool). best wishes to you all and happy new year!
Connect Samsung Developer Conference
webtech square products and services using our new technology are displayed in the space by each field, and you can find details in the keynote speech and sessions. platform innovation home & health experience mobile & screen experience sustainability category platform innovation home & health experience mobile & screen experience sustainability smartthings matter/hub the most comprehensive iot platform for matter. the matter-compatible smartthings hub has been deeply integrated across samsung tvs, family hub refrigerators, smart monitors, and mobile chargers. working together, these hubs can form a multi-hub network for wider coverage and better reliability. setting up a new hub is also easier than ever with our new hub replacement tool. smartthings find & galaxy smarttag2 to keep your belongings and loved ones safe, you can use the newly updated smartthings find and smarttag2. with the new lost mode, someone who has found your misplaced key simply can tap their phone to the tag2 to contact you. you can even use tag2 to keep your pets healthy. attach a tag2 to your dog’s collar and keep track of their walking habits. smartthings home view smartthings home view provides an indoor map of your home, allows you to set the location of rooms and easily control your home devices at once, and displays environmental information such as room temperature and humidity, making your smart device experience easier and more intuitive. we also provide various ways to create indoor maps using ai technology. smartthings tv experience find out more about enhanced tv experiences with smartthings, including ring my phone, built-in smart home hub and home monitoring, and on a galaxy smart phone, the quick tv remote functionality. wwst partner find out about upcoming "works with smartthings" partner devices, including interesting gadgets, harman speakers, and presence sensors. calm onboarding calm onboarding is a stepping stone to a convenient life. it allows the user to complete device registration in the background by linking product purchase information, or by temporarily registering nearby devices and completing the final confirmation - the user just needs to have a previously registered device to connect to. smartthings ecosystem wall smartthings has been developed with support for the matter protocol and hca standards. it's an ever-evolving system, continually expanding user device options and enhancing usability. in close partnership with major home iot companies like philips hue / aeotec and other device-focused allies, we're delivering unique advantages to both partners and end-users. back to previous page vision ai pro cooking: bespoke view camera oven and camera wall oven the vision ai pro cooking camera oven optimizes cooking settings while monitoring food. if the oven is set to cook a recognized dish, it recommends a cooking mode, temperature, and time. the user can see how their meal is coming along in real time. during cooking, the oven detects cooking status, and afterwards, creates a time-lapse. screens everywhere at home we are building a screen ecosystem by expanding the tizen os to all of our home appliances. in this booth, we will display a family hub refrigerator with a 32-inch screen and a wall oven with a 7-inch screen, which you can use to experience various services such as multimedia, iot, and ai. samsung food: food your way samsung food offers a single platform to take you from "what’s for dinner?" to food on the table. discover recipe inspiration and storage, meal planning, nutritional information, automatic shopping lists, guided cooking, and sharing recipes and reviews with your friends. we put the world’s food knowledge at your fingertips! expand your health experience with samsung health making healthy habits easier with samsung health and new galaxy watch. samsung health can help you develop healthy habits by providing insights on what you’re doing well and what needs improvement, based on measurement data. leveraging galaxy watch's advanced health sensors tracking of raw or processed health sensor data from a galaxy watch is available through the samsung privileged health sdk. specialized features of the galaxy watch, like body composition and skin temperature measurements, can easily be utilized in wear os applications. the sdk maintains low watch battery consumption during continuous data tracking. empowering research & clinical experiences with samsung health stack samsung health stack is an open source project that provides end-to-end solutions such as application sdk, web portal, and backend systems for various use cases from medical research studies to clinician services using wearable devices. in this booth, you can explore all features of samsung health stack and check out some of its real-world use cases. back to previous page where gaming comes together gaming hub is an all-in-one platform where users can spend more time together and enjoy a variety of games through streaming, with over 3,000 titles from industry-leading partners. in addition, we'll be demonstrating to game developers how to utilize gamepads effectively with live demos, and have content for gamepad manufacturers interested in tv integration. deliver the best multi-device experience between samsung devices multi-control allows you to control two or more devices at the same time with a keyboard or mouse. you can access content such as news and netflix using your mouse, without needing the remote control, and then immediately continue using the mouse to work with your pc. introduction to iris (instant rendering & immediate sign-off) for hdr10+ gaming iris is a software tool that provides real-time, simulated rendering of hdr10+ gaming, hdr10, or sdr on multiple connected displays. this exhibition covers the overview of hdr10+ gaming, iris features, and how game developers can utilize it for their development and qc process. currently, iris works based on an nvidia api for the hdr10+ gaming communication protocols. feel the pleasure and value of being together with witty conversations chat together lets you talk remotely while watching your favorite tv programs. a click on a pop-up notification will start a chat together session. you can chat using either ai-recommended text and emojis, voice input, or mobile application and web browser. we are also developing other tv applications that provide togetherness experiences with a tv chat open api and platform. camera experience for tv any application that uses a camera can join camera experience. so far, we have a video call, workout, health care and gesture applications. you can easily create camera applications for tv by using our open api and platform. cheering together with emoticons and enjoyable events while watching sports cheer together lets you move beyond just watching tv, by providing experience that family and others can share while watching sports, through cheering emoticons and co-participating in events according to the cheering mood. we are planning to auto-generate emoticons with the user's voice to provide them with more ways to express enjoyment. remote test lab for tv remote test lab is a solution that makes it easy for tv application developers to use any real tvs they want. if you have an internet-connected pc, you can configure a remote development environment using a real tv. we support various models based on product and year, and no further effort is required to get access to specific models. all you need is your pc. smart edge blending - merge screens using two freestyle 2023 projectors. to use smart edge blending, two freestyle projectors are placed horizontally or vertically, and the edge blending function, which connects the images, is set up by taking a picture on the smartthings mobile application. samsung wallet: add to wallet add to samsung wallet is an e-wallet service that allows customers using samsung devices to add various digitized contents to samsung wallet. users can add their event tickets, coupons, boarding passes, and other types of data into samsung wallet using "add to samsung wallet" buttons in applications, web pages, e-mail, or social media messages by various content providers. samsung wallet: online payment check out faster in our payment apps. there's no need to enter your credit card number for in-app or online purchases—simply select samsung pay at checkout and authenticate the purchase with your fingerprint or pin. samsung wallet: student / company id add your student or company id to samsung wallet to make access simple. open doors, get into the library and events, pay for lunch, and more with just a tap of your phone or watch. experience the convenience of your student or company id working when your screen is off and your phone is locked, and even when your battery runs out. samsung wallet: mobile driver’s license / state id users will soon be able to add their driver’s license or state id to samsung wallet. initially, mobile driver’s licenses / state ids will work in a limited number of states at select tsa checkpoints to verify an id with just a tap. advanced professional video codec the advanced professional video (apv) codec is a new video codec for prosumers who want cinematic-quality video recording and post-production with smart phones. the apv codec provides perceptually lossless video quality and consumes 20% less storage compared to existing formats. back to previous page net zero home: build a sustainable home with smartthings energy smartthings energy connects everything from solar panels to your ev chargers to build a sustainable home. through partnership, smartthings energy lets you manage your energy production, storage and consumption and lowers your monthly energy bill and carbon footprint. open license for solar cell remote tech the solar cell remote is eco-friendly remote controller made out of recyclable materials that creates no battery waste, and incorporates improvements based on research into the potential environmental pollutants caused in remote control production. by opening the solar cell remote control technology to everyone, eco-friendly technology can be distributed wider. intelligent power saving intelligent power saving is power reduction based on human vision characteristics. a deep learning algorithm identifies regions of non-interest, which helps in reducing power consumption without letting the user notice any changes in the image. relumino mode relumino mode improves visual accessibility by making it easier to recognize objects. the edge thickness and colors in the image can be controlled depending on the user's vision level. the "together mode" supports a social tv watching experience, by displaying the original and relumino mode videos at the same time, allowing users to watch tv with their families. spoken subtitles people with low vision, or who cannot read the subtitles, will better understand foreign content such as movies if the tv gives them narration by reading the subtitles out loud. resource circulation gallery our goal at samsung is to apply recycled resin to 100% of the plastic components used in our products by 2050. we're using materials like fishing nets and recycled glass for samsung galaxy products, crafting tv covers from low-carbon resin captured from carbon emissions, and developing microplastic-filtering technology to reduce marine pollution. circular factory we’re highlighting samsung's processes for upcycling waste, showing how our research is integrated into products. we’re uncovering recyclable materials from waste products and are creating a roadmap for how that waste can be reintegrated into samsung products. back to previous page
tutorials mobile, foldable
blogfoldable 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
tutorials galaxy watch
blogas wearable technology becomes more mainstream, customized smartwatch faces can be an extension of users’ style and personality. with samsung’s watch face studio (wfs) tool, you can design custom watch faces for devices in the wear os smartwatch ecosystem, such as galaxy watch4 and newer smartwatches. after you have made your unique watch face, you can share it with a global audience by uploading it to the google play store. this article describes the basic steps to distribute your watch face through the google play store, such as registration, testing, and publication. to register your watch face in google play, you must have a google play developer account. create a watch face in wfs, design and create your watch face. the wfs interface allows you to easily add and customize watch face components and add theme colors to implement multiple color schemes, for example. as you create a watch face, you can preview it with the “preview” window in wfs or install it on your own smartwatch. if do not have access to a supported smartwatch, you can test your watch face in the remote test lab, which gives you remote access to a variety of samsung galaxy watch devices. because smartwatches have limited hardware, you must be mindful of the amount of memory used by the watch face. the watch face specification defined by google has memory usage limits. to avoid issues related to these memory usage policies, wfs versions 1.6.9 beta and higher support a memory usage plugin that easily estimates the memory use of your watch face. notethe results from the plugin are not guaranteed to match the actual memory capacity check results from google play. figure 1: memory usage plugin prepare screenshots use the “preview” window in wfs to capture screenshots of your watch face in various sizes. you need these to register your watch face in google play. to create watch face screenshots: in the “preview” window, set the watch face to show the screen you want to capture. open the dropdown menu next to the camera icon and select the screenshots you want to create. click the camera icon. the screenshots are saved in the “screenshots” folder within your project folder. figure 2: screenshot creation generate the watch face package watch face projects are bundled into package files for publication. the google play store requires an aab file, while the galaxy store (for china only) requires an apk file. you can generate either or both in wfs: in the wfs project screen, select publish. define the unique package name, location for the generated file, version name and code, and package type. by default, the generated file is located in your project folder: “c:\users\username\watchfacestudio\build\project_name\” (windows) or “/users/username/watchfacestudio/build/project_name/” (macos). figure 3: watch face file generation you must also have a valid keystore used to sign the package file: if you have previously created a keystore, enter its information. if you do not have a keystore, select create new key. in the “new keystore” dialog, define the required details and click ok. figure 4: keystore creation when you are ready to generate the watch face package, in the “publish” dialog, click ok. noteremember that the key alias password and the keystore password must be identical. a warning dialog pops up if you use different passwords. register the watch face to register your watch face application in google play, sign in to your google play developer account. in the google play console, select all apps > create app and fill in the required information, such as the name, default language, and if the watch face is to be free or paid. you must also include any necessary disclosures. you can modify this information later, as needed. test the watch face before your watch face can be made available to the public, you must test it with actual users. testing, internal (recommended) and closed (required), ensures that your watch face behaves according to your design and complies with google play content policies and quality guidelines. for information about the google play content policies and application quality guidelines, see prepare your app for review and wear os app quality. you can easily monitor the testing status, number of installations and users, update status, and more for your applications through the google play dashboard. internal testing you can quickly distribute your builds to a limited number of trusted testers for their feedback. while internal testing is optional, it is strongly recommended. to set up your watch face for internal testing: in the google play console, select view app for the watch face that you want to test. its dashboard page opens. from the side menu, select testing > internal testing. since you have developed a watch face, you must select the wear os form factor. open the dropdown menu next to “create new release” and select manage form factors. in the “form factors” section, add wear os. figure 5: form factor selection unfold the “view tasks” list in the “set up internal testing track” section. the list guides you through the test setup process. for example: completing application setup in google play, such as defining the name and description to be displayed in the google play store uploading the required images for the google play store, such as its icon, screenshots, and feature graphics defining up to 100 internal testers for your application; the list can be modified later, as needed in the "create a new release" task: a. upload the aab file you want to test. you are prompted to sign the file by selecting or creating a signing key. b. name the release and add an optional release note. select preview and confirm the release. google play automatically checks for possible issues, such as missing information. to resolve the issues, follow the instructions for each list item. figure 6: issues list when you are ready to start the test, select start rollout to internal testing. distribute the test link or email invitations to your testers. the test link can take a few hours to become available. closed testing you can get targeted feedback from a wider group of users that you select, without affecting your public ratings and reviews. closed testing also sends your application to google to check for policy compliance before distributing it to your testers. noteif you have a personal google play developer account created after november 13, 2023, you need at least 20 testers to participate in your application’s closed test for a minimum of 14 days before you can apply for access to production. setting up a closed test is similar to setting up an internal test: in your watch face’s dashboard page in the google play console, go to testing > closed testing. to create a closed testing track, select create track and define a name for the testing track. open the dropdown menu next to “create new release” and select wear os only. complete the tasks in the “set up closed testing track” section, such as defining the countries where the application is to be available and the list of testers. figure 7: closed testing setup in the “create a new release” task, select an application package file that you have previously uploaded, or upload a new one. name the release and add an optional release note. select preview and confirm the release and resolve any detected issues. select send the release to google for review. when the release is approved, you can share the testing link with your testers. for more information on creating and managing tests, see set up an open, closed, or internal test. publish the watch face when you have completed closed testing and your watch face is ready to publish, apply for access to production. when access is approved, the watch face is available publicly in the google play store. summary it is easy to transform your watch face concept from design to published product. create the watch face with watch face studio, register it in the google play console and conduct user tests, then publish it in the google play store to share it with the world. if you have questions or need help with the steps presented in this article, you can share your queries on the samsung developers forum. you can also contact us directly for more specialized support through the samsung developer support portal.
Most Fowziya Akther Houya
web
faq check out the most frequently asked questions and answers for samsung developers. most faq distribute q how do i publish my apps and games in galaxy store? please review get started in galaxy store. q can i publish the same apk i have in other app stores? there are certain recommendations you need to follow. please review recommendations to bring your game to galaxy store. q how do i change the country that shows up in my seller portal registration? the country displayed is based on your samsung account. please submit a 1:1 inquiry to the samsung account support team. general q can you tell me when my device is going to get a software update? the developer support team does not have information about os updates for specific device models as this depends on each specific device country and carrier. q when will i get a solution for my support request? it says it is under review. the developer support team is actively working with different engineering teams to address the inquiries that we receive. we try to keep you informed of the status of your request and we will communicate any update as soon as we have one. you are also welcome to ask for an update at any time. q i have a great idea for samsung, can i share it with you to make it happen? samsung electronics and its employees do not accept, review, or consider ideas, suggestions, or concepts that have not been officially requested by us. this is to prevent any potential dispute or misunderstanding as to the similarity between unsolicited submissions and our internally and independently developed products, technology and services. q can you help me unlock my phone bootloader? stringwe do not have information about unlocking devices. please reach out to the samsung customer support team for further guidance. you can find the available channels in your country at www.samsung.com/support. q i am a phone case manufacturer, i need cad models and hardware dimensions from samsung devices. can you provide them? stringunfortunately, we do not have this type of information. q i just bought a samsung device and now it stopped working. can you help me? the samsung developer program technical support team provides guidance to developers and designers who are integrating samsung sdks and/or using samsung tools. for device specific issues and/or questions please contact samsung customer support. you can find the support channels available in your country at www.samsung.com/support. q i have a list of suggestions and improvements for samsung devices and/or apps, can you implement them? thank you for reaching out to us. the samsung developer program technical support team provides guidance to developers and designers who are integrating samsung sdks and/or using samsung tools. we value your feedback, therefore please share it in the samsung members community. you can do so directly from your mobile phone using the samsung members app. develop q where can i find the samsung usb driver to connect my phone to my computer? the samsung usb driver can be downloaded from the samsung android usb driver page. q can you help me build and test app prototypes? tip do you want to test your app on a samsung device but don't have access to one? using the remote test lab service, remote access to an actual samsung device is available! you can install and test your app, capture screenshots, record video, and monitor and download log information. the developer support team can help answer questions related to samsung-specific sdks and tools. the team does not do app development—we only provide guidance on how to use samsung technologies. q can you help me with an issue related to android apis? the samsung developer program technical support team provides guidance to developers and designers who are integrating samsung sdks and/or using samsung tools. if the issue you are seeing is specific to samsung devices, please see the next faq. q can you help me with an issue reproduced only on samsung devices? if you experience an issue in your application only in samsung specific devices, please use the support form and provide the following information:code snippet and/or steps to reproduce the issue—in this case, how frequently does this happen?device information (model id, os version, build number)dumpstate logplease take the dump-state log by doing the following: immediately after reproducing the issue, dial *#9900# and, if the debug level is disabled/low, tap to select mid. this restarts the device.again dial *#9900# and press run dumpstate/logcat/when it is finished, press copy to sdcard (include cp ramdump)in the main folder of the device file system there is a new folder named 'log'. the log file should be there. q how can i download and implement the s pen sdk? note the s pen sdk was deprecated in 2019 and there is no official support, download link, or implementation documentation available. the s pen remote sdk provides support for the s pen in current devices and can be downloaded from the galaxy s pen remote sdk page. q how can i set longer exposure time for my camera app? the exposure time range depends on device capability, which is suitable for general purpose development. even though the camera capability is limited, a configuration beyond the capability still works. but the consistency/validity cannot be guaranteed in this case. can’t find what you’re looking for? get in touch get support
featured design, mobile
blogspring is here and it’s a good time to clean house in your digital world. from your design process to galaxy store presence, it’s important to think about changes that could make things more efficient. to help you get started, members of the samsung developers community have been sharing advice on how they’ve successfully refined their processes and their galaxy store presence. we continue our series with tan nguyen from butterfly-effected, gmbh. a themes and watch faces designer, butterfly-effected has a long history with samsung, having provided content for our first mobile content store, the samsung funclub. read on to learn about tan’s process for quality control that allows him to grow, while keeping their designs fresh. how did you get into designing themes and watch faces? since 2006, we’ve been working with samsung in different areas. for the uefa euro 2016 football championship, samsung planned a promotion and asked us if we could create some themes for them. we were amazed at the number of downloads and created more. after seeing amazing results again, we continued designing more. that´s basically how everything started. has your design approach evolved over time? our process begins with collecting ideas, sketching and then selecting the best ones for production. then we do extensive q&a on the design and the technical part (e.g. are the colors visible in all combinations?). if everything passes, we send them to our partners for their approval before we upload them to the store. in the past, we spent a lot of time on the technical part, because everything was new. now we have more experience and the tools have matured, so we can focus more on the creative part and design. the samsung galaxy themes studio editor has an integrated visibility check that is a helpful tool when finalizing designs. geometric perspective by butterfly-effected, gmbh do you have a system in place to organize your designs and the way you present them? we created our own system to keep track of all the designs, designers, tasks, sales and revenue share for our brands. in addition to galaxy store, we use social media, mainly facebook, to present new products to customers and fans. how often do you revisit your old designs and update them? we take the most downloaded designs (even the free ones) and update them on a regular basis. time is allocated for that, and we update as many as possible without affecting the production of new themes. some themes have more sales after the update, others do not. but in general, there is an increase, so it makes sense to revisit older designs — especially since products without an update tend to experience a drop in sales. black fiber by butterfly-effected, gmbh when new platforms are released, do you check to make sure all designs are working? when a new platform is released, there are usually many different firmware versions. this can make the creation and the q&a process quite complex if the tester’s firmware, remote test lab (rtl) and our phones show different things. we always prioritize checking on products with higher downloads. we use rtl when new issues arise (e.g. color combinations) that we can´t reproduce or fix in galaxy themes studio. what advice would you give a designer about organizing and maintaining their work? backup all source files and keep a file with all the layers. also, it is helpful to use version control software to not lose track of supported devices and firmware. thanks to tan for sharing helpful advice on improving the q&a process and prioritizing updates to keep designs fresh. you can connect with tan and butterfly-effected, gmbh on their facebook themes page and facebook watch faces page. you can also check out butterfly-effected’s full collection of designs in galaxy store. we hope this post helps you start your spring refresh for success. remember, making galaxy store updates is key to keeping your seller account active. you need two activities every three months that trigger an app review by the seller portal team. an activity takes many forms, and can be anything from uploading a new app, to updating a current app, or changing the description or adding/updating photos. however, changing the price of an app does not count. stay tuned next week for the final installment in our ‘refresh for success’ series and follow us on twitter at @samsung_dev for our latest updates.
Samsung Developers
Connect Samsung Developer Conference
websessions dive into the future of connected customer experiences through tech sessions by developers offering further insight into the innovations introduced in the keynote filter filter filter all reset apply there are no results. advanced professional video codec open theater mobile experience, mobile the advanced professional video codec is a new codec for high quality video capture and post-production on smart phones. ai & mlops infrastructure for enterprise-grade llms tech session sustainability / innovation, ai vessl ai's tech session on mlops practices for training, tuning, and deploying llama2-scale llms and generative ai. bringing ai/ml into production: where do we stand? open theater sustainability / innovation, ai unlock the future of education with ai and iot, learn how tech is personalizing classrooms, and gain insights for your own setting. developer center announcement tech session platform innovation, iot, developer program our new developer center makes it easier to get your products integrated and "works with smartthings" certified. experience interactive advertisement on samsung tv plus tech session screen experience, contents&service, smarttv, monetization introduction to the features of interactive advertisements on samsung tv plus and the technology behind them. exploring the digital health ecosystem: samsung health as digital front door mega session health experience, health, wearable, mobile new samsung health features, samsung privileged health sdk, and collaboration for research with samsung health stack. gamepad on tizen tv mega session screen experience, game, developer program, tizen this session provides valuable tips and techniques for game application developers and gamepad manufacturers. games with samsung galaxy mega session mobile experience, game, android, mobile the latest in mobile gaming development technologies, responsive ui for flex mode, and mobile cloud gaming. generative ai for coding: improving productivity in sw development tech session sustainability / innovation, ai introduce samsung's multilingual code generation model and internal ai-powered coding assistant tool. hdr10+ gaming mega session screen experience, game the hdr10+ gaming panel discussion covers an overview of hdr10+ gaming and how game developers can support it. next-gen pet care with dr.tail open theater sustainability / innovation, health, contents&service, mobile merging past health records with cutting-edge veterinary consultations for pet wellness. open license of solarcell remote tech tech session screen experience, esg we explain the eco-friendly solarcell remote technology, and introduce the technology license open to everyone. open source on-device ai sw platform for optimized executions, personalization, pipelines, and mlops tech session platform innovation, ai, open source introduce open source on-device ai software platform nnstreamer, nntrainer programmable picture quality enhancement architecture tech session sustainability / innovation, ai introducing a programmable picture quality enhancement architecture to remove the limitations of the conventional model. relumino for people with low vision open theater sustainability / innovation, esg relumino mode enhances video playback to enable people with low vision to enjoy their favorite content. revolutionizing app design and development: prism open theater screen experience, ui/ux, productivity, ai prism and flux revolutionize the design process by automating the transition from design to code. s/w platform for digital appliance: part i. tizenrt tech session home experience, digital appliances, ai, iot introducing a full-fledged software platform for smart appliances that provides technologies for iot and on-device ai./conference/sdc23/sessions/sw-platform-for-digital-appliance-part-i-tizenrt s/w platform for digital appliance: part ii. tizen tech session home experience, digital appliances, tizen samsung's home appliances aim to create a better and more meaningful home ecosystem using the tizen os. samsung wallet: expanding the ecosystem tech session mobile experience, contents&service, productivity, wearable how samsung wallet is expanding and building experiences that improve our daily lives. smartthings and matter tech session platform innovation, iot, open source, developer program get a brief introduction to matter, new enhancements with smartthings, and new developer tools that make it easy to integrate your devices. smartthings enterprise api for multifamily tech session platform innovation, iot, enterprise, digital appliances learn more about the enterprise api, a new way to unlock the power of the smartthings platform for complex, multi-unit environments. smartthings find service update tech session platform innovation, developer program, iot, enterprise updates on the latest smartthings find developements, including smartthings find sdk. smartthings intelligence platform tech session platform innovation, iot, ai introduction to the smartthings intelligence platform and models for presence detection in the home. the role of ai & iot in making classrooms smarter & enabling personalized education open theater sustainability / innovation, iot, ai, esg unlock the future of education with ai & iot. learn how tech is personalizing classrooms. gain insights for your own setting. tizen sdk tech session screen experience, developer program, smarttv, tizen public launch of remote test lab for tv, enabling application testing on various tv models through your web browser. trends & challenges in ai/llm business, and how samsung co-operates with start-ups tech session sustainability / innovation, ai, enterprise, monetization covering trends in ai tech and business (on llm), upcoming regulations, and samsung's innovation efforts with start-ups. what's new and next in watch face studio 2023 tech session mobile experience, wearable, design, mobile let's learn the main new features of watch face studio 2023 and enjoy the new watch face studio plugin experience. what's new in foldables tech session mobile experience, android, mobile discover new possibilities with the large flex window and how to develop applications and widgets for foldables. what's new in tizen 8.0 tech session platform innovation, tizen, smarttv unveiling of the new features in tizen 8.0, elevating both developer and user experiences. what's new in tizen enterprise platform tech session screen experience, enterprise, tizen, productivity sharing the progress of the tizen enterprise platform and highlighting the new tbm portal and uem framework features. why tizen licensing? tech session screen experience, tizen how tizen platform licensing and becoming a samsung partner can enhance your product and business. works with smartthings 2.0 open theater platform innovation, developer program, iot learn how wwst helps your products stand out, perform their best, and how our new tools let you get to market faster. back to previous page
Learn Code Lab
codelaboptimize game performance with adaptive performance in unity objective learn how to optimize the performance of a demo game on samsung galaxy devices using the adaptive performance in unity the adaptive performance package provides you with tools to properly adjust you’re game and improve its overall game performance overview galaxy gamesdk delivers an interface between game application and device which helps developers optimize their games integrating unity adaptive performance with galaxy gamesdk allows unity developers to use this feature on unity editor within unity package manager and also customize their game contents by c# scripting game performance and quality settings can be adjusted in real time by identifying device performance status and heat trends moreover, using a set of simple ui controls, you can scale the quality of the game to match the device platform the latest version of adaptive performance, now uses new android apis that gather information from samsung hardware to provide more detailed insights into the device's thermal components and cpu optimization there are two providers for adaptive performance the samsung provider 5 0 utilizes apis from the gamesdk, which is supported from samsung galaxy s10 or note10 devices until newer models on the other hand, the android provider 1 2 uses the android dynamic performance framework adpf apis and is supported on devices running android 12 or higher this code lab focuses on using the samsung provider of adaptive performance thermal throttling mobile devices lack active cooling systems, causing temperatures to rise this triggers a warning to the unity subsystems, which lowers hardware demand to control heat and avoid performance degradation the ideal goal is to make performance stable with low temperature adaptive performance, primarily for performance and quality balance management, can help achieve this thermal warning the warning system implemented in gamesdk can trigger both internal unity systems and developer-defined behavior, such as disabling custom scripts and shaders quality settings it also provides you with the option to adjust the quality of the game to maintain stable performance at different warning levels you can scale the quality of your game in real time to meet the desired performance this includes changes in level of detail, animation, physics, and visual effects scalers with adaptive performance enabled, the game's fps becomes more stable and consistently higher over time this is because the game adapts its contents based on thermal warnings provided by samsung's thermal callback system the adaptive performance in unity provides developers with scalers that affect various aspects of the game frame rate resolution batching level of detail lod lookup texture lut multisample anti-aliasing msaa shadow cascade shadow distance shadow map resolution shadow quality sorting transparency view distance physics decals layer culling these general scalers can be used to scale the content based on your settings in the editor however, you may also create custom scalers that integrate with your own systems for instance, your own scalers can disable cpu-expensive scripts from running when thermal warnings are reached the latest version of adaptive performance, v5 0, includes new additions to the scalers decal scaler changes the draw distance of decals it controls how far a decal can be before not being rendered layer culling scaler adjusts the distance that expensive layers, such as transparency or water, when they start being culled it’s a useful scaler for scenes with more expensive shader calculations in every frame, unity calculates how all the physics in a level interacts with everything else, such as when the ball is dropping to the floor physics scaler adjusts the frequency at which this calculation is performed a lower frequency means fewer cpu calculations per second set up your environment you will need the following unity editor version 2022 3 visual studio or any source code editor supported samsung galaxy device remote test lab if physical device is not available requirements samsung account java runtime environment jre 7 or later with java web start internet environment where port 2600 is available sample code here is a sample project for you to start coding in this code lab download it and start your learning experience! adaptive performance sample code 903 96 mb demo game the sample project contains a demo game named boat attack it is an open-source demo game provided by unity it has the following features triangles 800,000 vertices 771,000 shadow casters 133 start your project after downloading the sample project, follow the steps to open your project launch the unity hub click projects > open after locating the unzipped project folder, you can open it in unity editor it initially downloads the needed resources for your project open benchmark_island-flythrough scene found under assets notethe project was tested in unity 2022 3 it is recommended to use this version in this code lab set up adaptive performance components in window > package manager > adaptive performance, you can check if the adaptive performance is already included in the project go to edit > project settings > adaptive performance enable the initialize adaptive performance on startup and select samsung android provider enable the scalers by going to adaptive performance > samsung android > indexer settings check the scaler settings and just use the default values add adaptive performance script to your project you are going to use a script that contains examples of the adaptive performance api code it gives you access to the frame time information, thermal information, and cpu/gpu bottlenecks this script adjusts the performance based on the device's thermal state, allowing longer game time by reducing in-game demands download the adaptive performance script adaptiveperformanceconroller cs 6 15 kb simply drag and drop the script into assets folder create a new object and attach the script to the object change the frame rate based on thermal warnings get to know about thermal warnings throttling warnings allow you to know when your game is about to be forcibly throttled and have sections of lag and lowered frame rate adaptive performance provides these thermal alerts that allow you to take control and adjust settings before the performance downgrades check the registered event handler to trigger thermal status ithermalstatus thermalstatus thermalevent then, check thermalmetrics information in the handler name description value nowarning no warning is the normal warning level during standard thermal state 0 throttlingimminent if throttling is imminent, the application should perform adjustments to avoid thermal throttling 1 throttling if the application is in the throttling state, it should make adjustments to go back to normal temperature levels 2 temperaturelevel 0 0 ~ 1 0 current normalized temperature level in the range of [0, 1] a value of 0 means standard operation temperature and the device is not in a throttling state a value of 1 means that the maximum temperature of the device is reached and the device is going into or is already in throttling state temperaturetrend -1 0 ~ 1 0 current normalized temperature trend in the range of [-1, 1] a value of 1 describes a rapid increase in temperature a value of 0 describes a constant temperature a value of -1 describes a rapid decrease in temperature it takes at least 10s until the temperature trend may reflect any changes adjust the frame rate in the adaptiveperformancecontroller cs, the following code is responsible for changing the frame rate depending on the current thermal alert void onthermalevent thermalmetrics ev { switch ev warninglevel { case warninglevel nowarning application targetframerate = 30; break; case warninglevel throttlingimminent application targetframerate = 25; break; case warninglevel throttling application targetframerate = 15; break; } } change the quality settings the performance bottleneck api informs you via an enum value if there is a bottleneck so you can adjust the workload iadaptiveperformance performancestatus performancemetrics performancebottleneck namespace unityengine adaptiveperformance { public enum performancebottleneck { unknown = 0, cpu = 1, gpu = 2, targetframerate = 3 } } in the adaptiveperformancecontroller cs script, the code below is responsible for controlling the lod of the models depending on the performance bottleneck a model with multiple lod is a prime example of a quality setting that can heavily affect the games performance lowering it lessens the load on the gpu, frees up resources, and eventually prevents thermal throttling change the quality setting by adjusting lod in real time by using the performancebottleneck api switch ap performancestatus performancemetrics performancebottleneck // iadaptiveperformance performancestatus performancemetrics performancebottleneck { case performancebottleneck gpu debug logformat "[adp] performancebottleneck gpu " ; lowerlod ; break; case performancebottleneck cpu debug logformat "[adp] performancebottleneck cpu " ; break; case performancebottleneck targetframerate debug logformat "[adp] performancebottleneck targetframerate " ; break; case performancebottleneck unknown debug logformat "[adp] performancebottleneck unknown" ; break; } create a custom scaler to create custom scalers, you need to create a new class that inherits from adaptiveperformancescaler the adaptive performance package includes this class that can be added to the adaptive performance framework, which adjusts quality settings based on unity's thermal settings download this custom scaler to control the texture quality of the demo game texturescaler cs 1 17 kb simply drag and drop the downloaded file into the project test using device simulator in unity the device simulator in unity allows you to test out adaptive performance functionality without a physical mobile device go to window > general > device simulator go to edit > project settings > adaptive performance enable the initialize adaptive performance on startup and select device simulator provider in the device simulator, you can try to send thermal warnings and create artificial bottlenecks to test different behaviors of the demo game the visual scripts display the scalers available and show if it is enabled enabling a specific scaler means that the adaptive performance w you can override the scalers to test their impact on the demo game's performance and scene some scalers may not affect the scene but may improve the performance in the long run build and launch the apk go to file > build settings connect your galaxy device enable development build and select scripts only build option make sure that the autoconnect profiler is enabled to check the profiler in unity and measure the performance in build to device, click the patch button to install or update the apk in your device test using unity profiler unity has also introduced a new module in its profiler that allows you to monitor the scalers changes and extract frame time information to your editor the profiler allows you to get real-time information from the adaptive performance plugin navigate to windows > analysis > profiler set the play mode to your connected galaxy device once connected, you can analyze the frame time stats and check the state of the scalers during runtime scalers in this profiler are reacting to the thermal trend and are being raised or lowered in response to the thermal warning observe the scalers when enabled or disabled texture scaler the texture scaler is the custom script to lower the texture quality based on thermal levels when enabled and maxed out, the texture fidelity has been lowered this lowers the gpu load and memory usage lod scaler you may notice a subtle change in the appearance of the rocks, trees, and umbrella models this is due to the adaptation of the lod bias that determines which version of the models to use as the thermal levels rise, lower poly models are selected to reduce the number of triangles rendered this reduces the gpu load and minimizes thermal build-up shadow map resolution shadow map resolution creates a blurring effect on the shadows which incidentally lowers the performance load required to render them basically, lower shadow detail means fewer gpu calculations, which lead to less heat build-up check the game performance using gpuwatch gpuwatch is a profiling tool for observing gpu activity in your app the following are the common information shown by the gpuwatch fps counters current average cpu and gpu load cpu load gpu load it is very helpful in profiling your game during the post-development stage so you can further optimize to enable gpuwatch on your galaxy device you can easily reposition the gpuwatch widgets on the screen by enabling unlock widgets under the notification menu of gpuwatch you’re done! congratulations! you have successfully achieved the goal of this code lab now, you can improve and optimize your android game on samsung galaxy devices using adaptive performance in unity by learning about scalers, thermal warnings, and bottleneck apis the performance of your mobile games can be pushed further by utilizing these tools if you face any trouble, you may download this file adaptive performance complete project 1 06 gb to learn more, visit developer samsung com/galaxy-gamedev
Learn Code Lab
codelabimplement flex mode on an unreal engine game objective learn how to implement flex mode on an unreal engine game using android jetpack windowmanager and raw java native interface jni overview the flexible hinge and glass display on galaxy foldable devices, such as the galaxy z fold4 and galaxy z flip4, let the phone remains propped open while you use apps when the phone is partially folded, it will go into flex mode apps will reorient to fit the screen, letting you watch videos or play games without holding the phone for example, you can set the device on a flat surface, like on a table, and use the bottom half of the screen to navigate unfold the phone to use the apps in full screen mode, and partially fold it again to return to flex mode to provide users with a convenient and versatile foldable experience, developers need to optimize their apps to meet the flex mode standard set up your environment you will need the following epic games launcher with unreal engine 4 or later visual studio or any source code editor samsung galaxy foldable device galaxy z fold2, z fold3, or newer galaxy z flip, z flip3, or newer remote test lab if physical device is not available requirements samsung account java runtime environment jre 7 or later with java web start internet environment where port 2600 is available create and set up your project after launching unreal engine from the epic games launcher, follow the steps below to start your project in the select or create new project window, choose games as a new project category and click next select third person as template, then click next to proceed noteyou can implement flex mode on any template or existing projects and use this code lab activity as a reference in the project settings window, set the following type of project c++ target platform mobile / tablet performance characteristics scalable 3d or 2d real-time raytracing raytracing disabled include an additional content pack no starter content project name tutorial_project click create project wait for the engine to finish loading and open the unreal editor once the project is loaded, go to edit > project settings > platforms > android click the configure now button if the project is not yet configured for the android platform then, proceed with the following apk packaging and build settings a apk packaging set target sdk version to 30 set orientation to full sensor change the maximum supported aspect ratio to 2 8 aspect ratio of galaxy z fold3 in decimal to prevent black bars from appearing on the cover display leave it if your game does not need to use the cover display enable use display cutout region?, to prevents black bars at the edge of the main screen otherwise, leave it unchecked b build disable support opengl es3 1 and enable support vulkan notecurrently, there is a problem with opengl es and the split-screen system being investigated the only option right now is to turn off opengl es and use vulkan instead enable native resize event the resize event of a game when switching between displays is disabled in the engine by default however, this behavior can be easily enabled by setting android enablenativeresizeevent=1 in the deviceprofile currently, the only way to create a profile for foldable devices is by creating a specific rule for each device to save time in this code lab, enable the native resize event for all android devices instead locate and open the tutorial_project > config folder in file explorer inside the config folder, create a new folder named android create a new file called androiddeviceprofiles ini and open this file in a text editor, such as visual studio copy below deviceprofile code to the newly created androiddeviceprofiles ini file [deviceprofiles] +deviceprofilenameandtypes=android,android [android deviceprofile] devicetype=android baseprofilename= +cvars=r mobilecontentscalefactor=1 0 +cvars=slate absoluteindices=1 +cvars=r vulkan delayacquirebackbuffer=2 +cvars=r vulkan robustbufferaccess=1 +cvars=r vulkan descriptorsetlayoutmode=2 ; don't enable vulkan by default specific device profiles can set this cvar to 0 to enable vulkan +cvars=r android disablevulkansupport=1 +cvars=r android disablevulkansm5support=1 ; pf_b8g8r8a8 +cvars=r defaultbackbufferpixelformat=0 +cvars=android enablenativeresizeevent=1 ; previewallowlistcvars and previewdenylistcvars are arrays of cvars that are included or excluded from being applied in mobile preview ; if any previewallowlistcvars is set, cvars are denied by default previewallowlistcvars=none this is a copy of the default android deviceprofile from the existing basedeviceprofiles ini file but with the enabled nativeresizeevent console variable cvars notethis step is not required when you only want to implement flex mode yet, it's recommended, to allow applications to run seamlessly from main to cover display without stretching and squashing the game, by enabling the nativeresizeevent create a new plugin and import the foldablehelper foldablehelper is a java file that you can use in different projects it provides an interface to the android jetpack windowmanager library, enabling application developers to support new device form factors and multi-window environments before proceeding, read how to use jetpack windowmanager in android game dev and learn the details of how foldablehelper uses windowmanager library to retrieve information about the folded state of the device flat for normal mode and half-opened for flex mode , window size, and orientation of the fold on the screen download the foldablehelper java file here foldablehelper java 5 64 kb to import the foldablehelper java file to the project, follow the steps below go to edit > plugins in the unreal editor click the new plugin button and select blank to create a blank plugin in the name field, type foldables_tutorial and click the create plugin button in file explorer, locate and open tutorial_project > plugins folder go to plugins > foldables_tutorial > source> foldables_tutorial > private and create a new folder called java copy the foldablehelper java file into java folder open the tutorial_project sln file in visual studio in the same private folder path, add a new filter called java right-click on the java filter and click add > existing item locate the foldablehelper java file, then click add to include this java file in the build modify java activity to use foldablehelper unreal plugin language upl is a simple xml-based language created by epic games for manipulating xml and returning strings using upl, you can utilize the foldablehelper java file by modifying the java activity and related gradle files as follows in visual studio, right-click on source > foldables_tutorial folder, then click add > new item > web > xml file xml create an xml file called foldables_tutorial_upl xml ensure that the file location is correct before clicking add in the newly created xml file, include the foldablehelper java file in the build by copying the java folder to the build directory <root xmlns android="http //schemas android com/apk/res/android"> <prebuildcopies> <copydir src="$s plugindir /private/java" dst="$s builddir /src/com/samsung/android/gamedev/foldable" /> </prebuildcopies> set up the gradle dependencies in the build gradle file by adding the following in the xml file <buildgradleadditions> <insert> dependencies { implementation filetree dir 'libs', include ['* jar'] implementation "org jetbrains kotlin kotlin-stdlib-jdk8 1 6 0" implementation "androidx core core 1 7 0" implementation "androidx core core-ktx 1 7 0" implementation "androidx appcompat appcompat 1 4 0" implementation "androidx window window 1 0 0" implementation "androidx window window-java 1 0 0" } android{ compileoptions{ sourcecompatibility javaversion version_1_8 targetcompatibility javaversion version_1_8 } } </insert> </buildgradleadditions> next, modify the gameactivity <gameactivityimportadditions> <insert> <!-- package name of foldablehelper --> import com samsung android gamedev foldable foldablehelper; </insert> </gameactivityimportadditions> <gameactivityoncreateadditions> <insert> foldablehelper init this ; </insert> </gameactivityoncreateadditions> <gameactivityonstartadditions> <insert> foldablehelper start this ; </insert> </gameactivityonstartadditions> <gameactivityonstopadditions> <insert> foldablehelper stop ; </insert> </gameactivityonstopadditions> </root> gameactivityimportadditions adds the com samsung android gamedev foldable foldablehelper into the gameactivity with the existing imports gameactivityoncreateadditions adds the code to the oncreate method inside the gameactivity gameactivityonstartadditions adds the code to the onstart method inside the gameactivity gameactivityonstopadditions adds the code to the onstop method inside the gameactivity save the xml file then, ensure that the engine uses the upl file by modifying the foldables_tutorial build cs script, located in the same folder as the foldables_tutorial_upl xml file after the dynamicallyloadedmodulenames addrange call, add the following if target platform == unrealtargetplatform android { additionalpropertiesforreceipt add "androidplugin", moduledirectory + "\\foldables_tutorial_upl xml" ; } this means that the game engine will use the upl file if the platform is android otherwise, the foldablehelper won’t work implement a storage struct the next thing to implement is a struct, the native version of java’s foldablelayoutinfo class to store the data retrieved from the java code using a struct, do the following in content browser of unreal editor, right-click on c++ classes > add/import content then, click new c++ class select none for the parent class and click next name the new class as foldablelayoutinfo assign it to the foldables_tutorial plugin then, click create class delete the created foldablelayoutinfo cpp file and only keep its header file in the header file called foldablelayoutinfo h, set up a struct to store all needed data from the windowmanager #pragma once #include "core h" enum efoldstate { undefined_state, flat, half_opened }; enum efoldorientation { undefined_orientation, horizontal, vertical }; enum efoldocclusiontype { undefined_occlusion, none, full }; struct ffoldablelayoutinfo { efoldstate state; efoldorientation orientation; efoldocclusiontype occlusiontype; fvector4 foldbounds; fvector4 currentmetrics; fvector4 maxmetrics; bool isseparating; ffoldablelayoutinfo state efoldstate undefined_state , orientation efoldorientation undefined_orientation , occlusiontype efoldocclusiontype undefined_occlusion , foldbounds -1, -1, -1, -1 , currentmetrics -1, -1, -1, -1 , maxmetrics -1, -1, -1, -1 , isseparating false { } }; implement jni code to implement jni, create a new c++ class with no parent and name it foldables_helper assign the class to the same plugin, then modify the c++ header and source files as follows in the created header file foldables_helper h , include foldablelayoutinfo h #include "foldablelayoutinfo h" then, declare a multicast_delegate to serve as a listener for passing the data from the java implementation to the rest of the engine declare_multicast_delegate_oneparam fonlayoutchangeddelegate, ffoldablelayoutinfo ; lastly, set up the methods and member variables class foldables_tutorial_api ffoldables_helper { public static void init ; static bool haslistener; static fonlayoutchangeddelegate onlayoutchanged; }; moving to the source file foldables_helper cpp , set up the definitions for the methods and member variables created in the header file bool ffoldables_helper haslistener = false; fonlayoutchangeddelegate ffoldables_helper onlayoutchanged; void ffoldables_helper init { haslistener = true; } now, in the same source file, create the native version of the onlayoutchanged function created in the foldablehelper java file since the java onlayoutchanged function only works on android, surround the function with an #if directive to ensure that it compiles only on android #if platform_android #endif within this directive, copy the code below to use the jni definition of the java onlayoutchanged function extern "c" jniexport void jnicall java_com_samsung_android_gamedev_foldable_foldablehelper_onlayoutchanged jnienv * env, jclass clazz, jobject jfoldablelayoutinfo { create the ffoldablelayoutinfo to store the data retrieved from java ffoldablelayoutinfo result; retrieve the field ids of the foldablelayoutinfo and rect objects created in the java file //java foldablelayoutinfo field ids jclass jfoldablelayoutinfocls = env->getobjectclass jfoldablelayoutinfo ; jfieldid currentmetricsid = env->getfieldid jfoldablelayoutinfocls, "currentmetrics", "landroid/graphics/rect;" ; jfieldid maxmetricsid = env->getfieldid jfoldablelayoutinfocls, "maxmetrics", "landroid/graphics/rect;" ; jfieldid hingeorientationid = env->getfieldid jfoldablelayoutinfocls, "hingeorientation", "i" ; jfieldid stateid = env->getfieldid jfoldablelayoutinfocls, "state", "i" ; jfieldid occlusiontypeid = env->getfieldid jfoldablelayoutinfocls, "occlusiontype", "i" ; jfieldid isseparatingid = env->getfieldid jfoldablelayoutinfocls, "isseparating", "z" ; jfieldid boundsid = env->getfieldid jfoldablelayoutinfocls, "bounds", "landroid/graphics/rect;" ; jobject currentmetricsrect = env->getobjectfield jfoldablelayoutinfo, currentmetricsid ; //java rect object field ids jclass rectcls = env->getobjectclass currentmetricsrect ; jfieldid leftid = env->getfieldid rectcls, "left", "i" ; jfieldid topid = env->getfieldid rectcls, "top", "i" ; jfieldid rightid = env->getfieldid rectcls, "right", "i" ; jfieldid bottomid = env->getfieldid rectcls, "bottom", "i" ; retrieve the current windowmetrics and store it in the ffoldablelayoutinfo as an fintvector4 // currentmetrics int left = env->getintfield currentmetricsrect, leftid ; int top = env->getintfield currentmetricsrect, topid ; int right = env->getintfield currentmetricsrect, rightid ; int bottom = env->getintfield currentmetricsrect, bottomid ; // store currentmetrics rect to fvector4 result currentmetrics = fintvector4{ left, top, right, bottom }; do the same for the other variables in the java foldablelayoutinfo // maxmetrics jobject maxmetricsrect = env->getobjectfield jfoldablelayoutinfo, maxmetricsid ; left = env->getintfield maxmetricsrect, leftid ; top = env->getintfield maxmetricsrect, topid ; right = env->getintfield maxmetricsrect, rightid ; bottom = env->getintfield maxmetricsrect, bottomid ; //store maxmetrics rect to fvector4 result maxmetrics = fintvector4{ left, top, right, bottom }; int hingeorientation = env->getintfield jfoldablelayoutinfo, hingeorientationid ; int state = env->getintfield jfoldablelayoutinfo, stateid ; int occlusiontype = env->getintfield jfoldablelayoutinfo, occlusiontypeid ; bool isseparating = env->getbooleanfield jfoldablelayoutinfo, isseparatingid ; // store the values to an object for unreal result orientation = tenumasbyte<efoldorientation> hingeorientation + 1 ; result state = tenumasbyte<efoldstate> state + 1 ; result occlusiontype = tenumasbyte<efoldocclusiontype> occlusiontype + 1 ; result isseparating = isseparating; // boundsrect jobject boundsrect = env->getobjectfield jfoldablelayoutinfo, boundsid ; left = env->getintfield boundsrect, leftid ; top = env->getintfield boundsrect, topid ; right = env->getintfield boundsrect, rightid ; bottom = env->getintfield boundsrect, bottomid ; // store maxmetrics rect to fvector4 result foldbounds = fintvector4{ left, top, right, bottom }; broadcast the result via the onlayoutchanged delegate for use in the engine if ffoldables_helper haslistener { ue_log logtemp, warning, text "broadcast" ; ffoldables_helper onlayoutchanged broadcast result ; } } create a player controller and two ui states this section focuses on adding a player controller and creating two user interface ui states for flat and flex modes these objects are needed for the flex mode logic implementation following are the steps to add a player controller and create two ui states add a new player controller blueprint in content browser, go to content > thirdpersoncpp and right-click on blueprints > add/import content > blueprint class pick player controller as its parent class rename it as flexplayercontroller notethe flexplayercontroller added is generic and can be replaced by your custom player controller in an actual project add a new c++ class with actor component as its parent class name it as foldables_manager and assign it to the foldables_tutorial plugin click the create class button open the flexplayercontroller blueprint by double-clicking it click open full blueprint editor attach the actor component to the flexplayercontroller in the left pane, click add component, then find and select the foldables_manager next, create a pair of userwidget classes for the ui layouts needed flat mode ui for the full screen or normal mode; and flex mode ui for split-screen in add c++ class window, select the show all classes checkbox find and pick userwidget as the parent class then, click next name the new user widget as flatui and attach it to the plugin click next repeat the process but name the new user widget as flexui you might get an error when trying to compile stating that the userwidget is an undeclared symbol to fix this, open the foldables_tutorial build cs file, and in the publicdependencymodulenames addrange call, add "inputcore" and "umg" to the list create a pair of blueprints made from subclasses of these two user widgets right-click on content and create a new folder called foldui inside the newly created folder, right-click to add a new blueprint class in all classes, choose flatui and click the select button rename the blueprint as bp_flatui in the same folder, repeat the process but choose the flexui class and rename the blueprint as bp_flexui double-click on bp_flatui and bp_flexui, then design your two uis like below to visualize switching between flat and flex mode flat ui flex ui notethis code lab activity does not cover the steps on how to create or design ui if you want to learn about how to create your own game design in unreal engine 4, refer to unreal motion graphics ui designer guide implement the flex mode logic after creating the flexplayercontroller and the two ui states bp_flatui and bp_flexui , you can now implement flex mode logic in the foldables_manager open the foldables_manager h and include the necessary c++ header files #pragma once #include "coreminimal h" #include "components/actorcomponent h" #include "engine h" #include "flatui h" #include "flexui h" #include "foldables_helper h" #include "foldables_manager generated h" remove the line below to save a little bit of performance as this component doesn't need to tick public // called every frame virtual void tickcomponent float deltatime, eleveltick ticktype, factorcomponenttickfunction* thistickfunction override; set up the functions needed in foldables_manager the constructor, a function to create the ui widgets the implementation of onlayoutchanged delegate public // sets default values for this component's properties ufoldables_manager ; void createwidgets ; protected // called when the game starts virtual void beginplay override; protected void onlayoutchanged ffoldablelayoutinfo foldablelayoutinfo ; then, set up the variables needed references to the flat and flex ui classes references to the flat and flex ui objects mark the pointers as uproperty to ensure that garbage collection does not delete the objects they point to tsubclassof<uuserwidget> flatuiclass; tsubclassof<uuserwidget> flexuiclass; uproperty class uflatui* flatui; uproperty class uflexui* flexui; finally, define a new private function restoreflatmode , to disable flex mode and return to normal mode private void restoreflatmode ; moving over to foldables_manager cpp, implement the constructor using the constructorhelpers, find the ui classes and set the variables to store these classes also, set the bcanevertick to false to prevent the component from ticking and remove the code block of tickcomponent function // sets default values for this component's properties ufoldables_manager ufoldables_manager { primarycomponenttick bcanevertick = false; static constructorhelpers fclassfinder<uflatui> flatuibpclass text "/game/foldui/bp_flatui" ; static constructorhelpers fclassfinder<uflexui> flexuibpclass text "/game/foldui/bp_flexui" ; if flatuibpclass succeeded { flatuiclass = flatuibpclass class; } if flexuibpclass succeeded { flexuiclass = flexuibpclass class; } } next, set up the beginplay function to link the delegate to the onlayoutchanged function, to initialize the foldables_helper, and to create the widgets ready for use in the first frame // called when the game starts void ufoldables_manager beginplay { super beginplay ; ffoldables_helper onlayoutchanged adduobject this, &ufoldables_manager onlayoutchanged ; ffoldables_helper init ; createwidgets ; } set up the createwidgets function to create the widgets using the ui classes acquired in the constructor add the flatui widget to the viewport, assuming the app opens in normal mode until it receives the foldablelayoutinfo void ufoldables_manager createwidgets { flatui = createwidget<uflatui> aplayercontroller* getowner , flatuiclass, fname text "flatui" ; flexui = createwidget<uflexui> aplayercontroller* getowner , flexuiclass, fname text "flexui" ; flatui->addtoviewport ; } afterward, create the onlayoutchanged function, which will be called via a delegate inside this function, check whether the device’s folded state is half_opened if so, check whether the orientation of the fold is horizontal void ufoldables_manager onlayoutchanged ffoldablelayoutinfo foldablelayoutinfo { //if state is now flex if foldablelayoutinfo state == efoldstate half_opened { if foldablelayoutinfo orientation == efoldorientation horizontal { notefor this third person template, splitting the screen vertically isn’t ideal from a user experience ux point of view for this code lab activity, split the screen only on the horizontal fold top and bottom screen if you want it vertically, you need to use the same principle in the next step but for the x-axis instead of the y-axis you must also ensure that you have a flex ui object for the vertical layout if the device is both on flex mode and horizontal fold, change the viewport to only render on the top screen using the normalized position of the folding feature then in an asynctask on the game thread, disable the flatui and enable the flexui however, if the device is on normal mode, then return to flat ui using restoreflatmode function //horizontal split float foldratio = float foldablelayoutinfo foldbounds y / foldablelayoutinfo currentmetrics w - foldablelayoutinfo currentmetrics y ; gengine->gameviewport->splitscreeninfo[0] playerdata[0] sizex = 1 0f; gengine->gameviewport->splitscreeninfo[0] playerdata[0] sizey = foldratio; asynctask enamedthreads gamethread, [=] { if flatui->isinviewport { flatui->removefromparent ; } if !flexui->isinviewport { flexui->addtoviewport 0 ; } } ; } else { restoreflatmode ; } } else { restoreflatmode ; } } reverse the flex mode implementation logic to create the restoreflatmode function by setting the viewport to fill the screen, then disable the flexui and enable the flatui void ufoldables_manager restoreflatmode { gengine->gameviewport->splitscreeninfo[0] playerdata[0] sizex = 1 0f; gengine->gameviewport->splitscreeninfo[0] playerdata[0] sizey = 1 0f; asynctask enamedthreads gamethread, [=] { if !flatui->isinviewport { flatui->addtoviewport 0 ; } if flexui->isinviewport { flexui->removefromparent ; } } ; } set up a game mode and attach the flexplayercontroller the game mode defines the game rules, scoring, and any game-specific behavior set up the game mode in unreal editor by creating a blueprint class in the content > thirdpersoncpp > blueprints folder pick game mode base as the parent class and rename it as flexgamemode double-click on flexgamemode in the drop-down menu next to player controller class, choose the flexplayercontroller lastly, go to edit > project settings > project > maps & modes and select flexgamemode as the default gamemode build and run the app go to edit > package project > android to build the apk ensure that the android development environment for unreal is already set up to your computer noteif the build failed due to corrupted build tools, consider downgrading the version to 30 or lower using the sdk manager or, simply rename d8 bat to the name of the missing file dx bat in sdk path > build-tools > version number directory and, in lib folder of the same directory, rename d8 jar to dx jar after packaging your android project, run the game app on a foldable galaxy device and see how the ui switches from normal to flex mode if you don’t have any physical device, you can also test it on a remote test lab device tipwatch this tutorial video and know how to easily test your app via remote test lab you're done! congratulations! you have successfully achieved the goal of this code lab now, you can implement flex mode in your unreal engine game app by yourself! if you're having trouble, you may download this file flex mode on unreal complete code 20 16 mb to learn more, visit www developer samsung com/galaxy-z www developer samsung com/galaxy-gamedev
We use cookies to improve your experience on our website and to show you relevant advertising. Manage you settings for our cookies below.
These cookies are essential as they enable you to move around the website. This category cannot be disabled.
These cookies collect information about how you use our website. for example which pages you visit most often. All information these cookies collect is used to improve how the website works.
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and tailor the website to provide enhanced features and content for you.
These cookies gather information about your browser habits. They remember that you've visited our website and share this information with other organizations such as advertisers.
You have successfully updated your cookie preferences.