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

      doc

      Galaxy GameDev

      sign up for the game developer newsletter introduction galaxy smartphones make up the world's largest mobile gaming platform. even a number of major game engine companies, publishers and studios are already collaborating with samsung, we announced the galaxy gamedev program at the 2016 samsung developer conference, where we extended our support beyond major players in the games industry to any developers creating games for galaxy devices. new technologies are essential to creating high fidelity, high performance gaming experience in mobile devices. samsung is committed to bringing new technology to our suite of galaxy products, such as; 64bit, multi-thread rendering and the new generation graphics api - vulkan. samsung's galaxy gamedev team has engineers located in five strategic global locations to cover game developers from all over the world. we ensure that our partners have the engineering support they need to launch the best gaming experiences on galaxy devices and strengthen the android ecosystem. galaxy gamedev provides a variety of technical support options to assist developers. there are 4 key areas:. gpu drivers : gpu driver optimization and streamlining driver updates is a key area to making the most of hardware capabilities and maintaining optimized performance of a gpu. samsung collaborated with google and the major gpu vendors like arm and qualcomm to develop and ship the new android feature game driver. game driver provides the new way of updating gpu driver by store and this delivers more stable and better performing gpu driving for the target games. now this functionality started with the limited number of major galaxy models and continues to scale with more devices soon. tools & sdks : samsung develops and supports its own tools & sdks like gpuwatch and galaxy gamesdk which help game developers to find resource bottlenecks and solve performance issues in real-time. sdks are integrated with major game engines too like unity adaptive performances to guide developers with easy way of use. developer support : our gamedev engineers are available to support developers in multiple ways, from answering general day-to-day development questions all the way to on-site engineering collaboration. a deep engagement with on-site support is available to developers who have signed a confidentiality agreement with samsung. game engines : supporting the optimization of game engines is key to wide distribution of optimization. samsung’s gamedev team are focused on supporting game engines, which ensures that games released through the engine's ecosystem achieve the significant optimizations that would normally be delivered into just one game. partners samsung keeps working closely with more than 50 partners including game studio, publisher, tool developers, game engine companies and gpu vendors.

      https://developer.samsung.com/galaxy-gamedev/overview.html
      1. Develop
      2. GameDev

      doc

      Event Archive

      event archive 2022 event date/location session presenter(s) gdc2022 may 21-25, 2022san francisco, usa unfolding your gaming potential with galaxy gamedev gdc vault michael barnes, head of game ecosystem at samsung research uk gdc2022 may 21-25, 2022san francisco, usa game performance optimization with causal models gdc vault hesham dar, senior data scientist at samsung research uk gdc2022 may 21-25, 2022san francisco, usa what if your phone's avatar is in the game or metaverse? gdc vault jinho lim, principal engineerjeoungju kim, principal engineersanglae kim, staff engineer gdc2022 may 21-25, 2022san francisco, usa new gpu, the ultimate reality! gdc vault gary keen, engineer, samsung research uk 2020 event date/location session presenter(s) unite seoul 2020 201203online how to optimize sustainable gaming performance in mobile devices using adaptive performance (video) munseong kang unity korea webinar 2020 200730online how to maintain stable gaming performance, adaptive performance (video) inae kim, jihyun oh(unity) unite now 2020 200723online build aaa games with adaptive performance (video) benjamin mitchell 2019 event date/location session presenter(s) unity webinar seoul 2019 191212seoul, korea adaptive performance(video_korean) junsik kong, jihyun oh(unity) reboot develop red 2019 191030banff, canada mobilizing call of duty:bringing a blockbuster title to android(video) benjamin mitchell sdc 2019 191030san jose,usa a deep look inside games: gamesdk and unity adaptive performance(video) junsik kong, david berger(unity) sdc 2019 191030san jose,usa vulkanized: mobile game optimization techniques(pdf) igor nazarov,yao wei sdc 2019 191030san jose,usa galaxy gamedev: bringing maximun boost to mobile gamesⅱ (video) jungwoo kim, seunghwan lee, richard huddy unite copenhagen 2019 190923københavn,denmark bringing call of duty to mobile (video/slide) jungwoo kim, anton syniavskyi casual connect london 190528london,uk next level mobile graphics(video) munseoung kang,oleksii vasylenko unite seoul 2019 190521seoul, korea technique of mobile game optimization-vulkan and unity adaptive performance(video) junsik kong, seunghwan lee, david berger(unity) unite seoul 2019 190521seoul, korea keynote (pdf) jungwoo kim unite shanghai 2019 190512shanghai,china gamedev partner practices(pdf) yao wei unite shanghai 2019 190512shanghai,china keynote(pdf) joonyong park google i/o 2019 190507mountainview,usa making high fidelity android games possible with vulkan(video) jungwoo kim, francesco carucci(google), tom olson(arm) unreal summit seoul 2019 190503seoul, korea vulkan mobile optimization white book(video/pdf-korean) joonyong park, dohyun kim reboot develop blue 2019 190419dubrovnik,croatia some seriously explicit lessons in vulkan(video) alon or-bach, karlo jez(croteam) unreal fest europe 2019 190411prague, czech republic vulkan! powering aaa experiences on android(video) oleksii vasylenko,michael parkin-white gdc2019 190318-190322sanfrancisco,usa bringing 'fortnite' to mobile with vulkan and opengles (presented by khronos)(pdf/video) kostiantyn drabeniuk, jack porter(epic games) gdc2019 190318-190322sanfrancisco,usa a quick look inside your game : gpuwatch & gamesdk (presented by samsung)(video) hyokeun lee, junsik kong, david berger(unity) gdc2019 190318-190322sanfrancisco,usa galaxy gamedev: bringing maximum boost to mobile games (presented by samsung)(video) jungwoo kim, dohyun kim, sangmin lee gdc2019 190318-190322sanfrancisco,usa all-in-one guide to vulkan on mobile (presented by samsung and arm) michael parkin-white gdc2019 190318-190322sanfrancisco,usa making use of new vulkan features(presented by khronos)(video) lewis gordon, dr. matthäus chajdas(amd), tiemo jung(gaijin entertainment) 2018 event date/location session presenter(s) sdc2018 181107-181108sanfrancisco,usa going into the new era: galaxy gamedev -update,secrets and leaks(video) jungwoo kim, richard huddy sdc2018 181107-181108sanfrancisco,usa a quick look inside your games : gpuwatch tutorial + gameengine talk(video) hyo-keun lee, niklas smedberg(unity) sdc2018 181107-181108sanfrancisco,usa fortnite behind the story: road to android and vulkan collaboration with galaxy gamedev(video) sangmin lee, jack porter(epic games) siggraph 2018 180812-180816vancouver, canada moving mobile graphics: mobile graphics 101(pdf) andrew garrard vulkanised!2018 180522cambridge,uk the low-level mysteries of pipeline barriers(pdf/video) frederic garnier, andrew garrard android game developer summit 2018 180507mountainview,usa vulkan game optimization(video) jungwoo kim, ito kosei(luminous productions), yoshimasa enji(summertimestudio) unite seoul 2018 180502-180504seoul,south korea keynote(pdf) taeyong kim vulkan developer day in montreal 2018 180430montreal,canada overview and vulkan 1.1 recap(video) alon or-bach gdc2018 180319-180323sanfrancisco,usa vulkan on android: gotchas and best practices(presented by the khronos group)(video) frederic garnier, inae kim, arseny kapoulkine(roblox) gdc2018 180319-180323sanfrancisco,usa getting explicit: how hard is vulkan really?(hosted by the khronos group)(video) alon or-bach, dustin land(id software), dr. matthäus chajdas(amd), hai nguyen(google), arseny kapoulkine(roblox) gdc2018 180319-180323sanfrancisco,usa perfdoc:optimize early with vulkan validation layer tools(presented by arm)(link) jungwoo kim, hans-kristian arntzen(arm) 2017 event date/location session presenter(s) gcon(g-star) 2017 171117busan,south korea future mobile game ecosystem and high fidelity android gaming(pdf) meeso kim, jungwoo kim sdc 2017 171018-171019sanfrancisco,usa developing high-fidelity android games: collaboration best practices(video) eunsil cho,ethan choi(hound13),ito kosei(square enix),ebato takahito(square enix) sdc 2017 171018-171019sanfrancisco,usa vulkan game optimization: deep-dive case study(video) daemyung jang, jungwoo kim sdc 2017 171018-171019sanfrancisco,usa level up your game! new insights and tools for game developers(video) jungwoo kim, jongheun yoo game republic mobile games special 171018sheffield,uk samsung game ecosystem(pdf) david pither html5ct forum 171013seoul,south korea introducing vulkan with practices(pdf) jungwoo kim unreal fest east 2017 171008yokohama,japan developing high performance games for android(pdf) jungwoo kim, hak matsuda(google) khronos-vulkanised!2017 170525cambridge,uk bringing vainglory to vulkan(pdf) fred garnier khronos-vulkanised!2017 170525cambridge,uk panel discussion: worst practices! lessons learnt from game devs pioneering with vulkan(video) alon or-bach, tobias hector(img), fred garnier, dean sekulic(croteam),hans-kristian arntzen(arm), tom olson(arm) google i/o 2017 170519mountain view,usa developing high performance games for android(video) jungwoo kim, bill bilodeau(google), donghyun kim(netmarble) android game developer summit 2017 170516mountainview,usa game optimization(pdf) jungwoo kim, jonas gustavsson unite seoul 2017 170516-170517seoul,south korea keynote (pdf) joonyong park ndc 2017 170425-170427pangyo,south korea developing vulkan game with unity(pdf) seunghwan lee, inae kim, daemyung jang gdc2017 170227sanfrancisco,usa vulkan game development in mobile(pdf) soowan park gdc2017 170227sanfrancisco,usa refocusing on vr innovation: can standards simplify cross-platform virtual reality development?(pdf/video) alon or-bach gdc2017 170227sanfrancisco,usa mobile: the future of vr( pdf/video) alon or-bach casual connect berlin 170208berlin,germany optimizing high-end games for premium mobile devices(video) jonas gustavsson, joe davis hci korea 2017 170208-170210jeongseon,south korea future of vr with vulkan(pdf) daemyung jang 2016 event date/location session presenter(s) gcon(g-star) 2016 161118busan,south korea vulkan and the future of mobile gaming(pdf) meeso kim, jungwoo kim khronos-vulkan devu 161021seoul,south korea vulkan tutorial(pdf) hyokeun lee, minwook kim khronos-vulkan devu 161021seoul,south korea vulkan case study(video) soowan park, joonyong park cedec 2016 160824-160826yokohama,japan the vulkan™ new generation graphics api – an introduction and overview (pdf) jungwoo kim e3 2016 160614-160616los angeles,usa samsung e3 press conference(pdf) jungwoo kim khronos-moving to vulkan 160525cambridge,uk swapchains unchained(video) alon or-bach sdc2016 160427sanfrancisco,usa introducing the galaxy gamedev program(video) taeyong kim, rob dyer, ray tran, carl callewaert sdc2016 160427sanfrancisco,usa introducing vulkan for galaxy s7(video) jungwoo kim, valentyn kulikovskiy sdc2016 160427sanfrancisco,usa unreal engine: developing console-level games with vulkan(video) jungwoo kim, niklas smedberg(epic games)

      https://developer.samsung.com/galaxy-gamedev/event-archive.html
      1. Develop
      2. GameDev

      doc

      Best Practices

      gamedev best practices to share our experiences and know-hows from gamedev supports, we've authored the following technical blogs. you can find our stories and some useful tips here. using variable rate shading to improve performance on mobile games "samsung developers blog" , 22 nov 2022 foldable device features with unity and unreal engine 4 "samsung developers blog" , 16 sep 2022 how to use jetpack windowmanager in android game dev "samsung developers blog" , 20 july 2022 optimizing mobile game performance: runescape " runescape" , jagex , 2021 lighting up xcom 2 on android with galaxy gamedev " xcom 2 " , feral interactive , 2021 using conservative morphological anti-aliasing to improve game visuals " msaa " , samsung r&d uk , 2021 accelerating performance in xbox game studios' forza street " forza street " , electric square / microsoft , 2020 jet set vulkan:reflecting on the move to vulkan " sky gamblers: infinite jets " , atypical games , 2019 adaptive performance in call of duty mobile " call of duty mobile " , tencent , 2019 l2m : binding and format optimization " lineage2 mobile " , nc soft , 2019 a year in a fortnite " fortnite " , epic games , 2019 the challenges of porting traha to vulkan " traha " , moai games / nexon , 2019

      https://developer.samsung.com/galaxy-gamedev/best-practice.html
      1. Develop
      2. GameDev

      doc

      Resources

      resources to ensure all developers benefit from our collaboration with galaxy gamedev members, we have authored and gathered the following collection of technical documents and resources. articles introduction to gpu technologies introduction to vulkan render passes game asset optimization opengl es usage vulkan usage gpu framebuffer memory: understanding tiling tool guides arm mobile studio arm perfdoc vulkan layer gamebench android gpu inspector google systrace qualcomm snapdragon profiler renderdoc sdk and samples glslang lunarg vulkan samples spirv-cross vulkan-samples lunarg vulkan samples mali vulkan sdk mali opengl es sdk adreno vulkan sdk sascha willems' vulkan demo

      https://developer.samsung.com/galaxy-gamedev/resources.html
      1. Develop
      2. GameDev

      doc

      Resources

      adaptive performance resources the following is a collection of documents and resources for adaptive performance. announcements, articles, and blogs unity forums announcement - adaptive performance package best practices for mobile game developers and artists, 2021 may build stunning mobile games that run smoothly with adaptive performance, 2021 mar android game analysis with arm mobile studio, 2020 sep create astc textures faster with the new astcenc 2.0 open source compression tool, 2020 sep higher fidelity and smoother frame rates with adaptive performance, 2019 apr vulkan extensions for mobile new game changing vulkan extensions for mobile: timeline semaphores, 2021 jul new game changing vulkan extensions for mobile: buffer device address, 2021 jul new game changing vulkan extensions for mobile: descriptor indexing, 2021 jun new vulkan extensions for mobile: legacy support extensions, 2021 jun new vulkan extensions for mobile: maintenance extensions, 2021 jun video sessions and talks gdc 2021 - galaxy gamedev: bringing high quality gaming experiences to mobile unite now 2020 - build better aaa mobile games with adaptive performance sdc19 - a deep look inside games: gamesdk and unity adaptive performance unite 2019 - bringing call of duty to mobile gdc 2019 keynote - improve mobile game performance in real time with adaptive performance gdc 2019 - megacity on mobile: how we optimized it with adaptive performance unity documentation android game development mobile solutions optimize your mobile game performance release marketing user guide, v2.1.1

      https://developer.samsung.com/galaxy-gamedev/adaptive-performance-resources.html
      1. Learn
      2. Code Lab

      codelab

      Optimize Unity Game Performance

      optimize unity game performance objective learn how to optimize the performance of a demo game using the adaptive performance package from within unity. the adaptive performance package provides you with tools, including relevant information from the mobile device. the tools allow you to edit different features in the game with useful scalers that give you the ability to improve the 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. samsung galaxy s10 / note10 devices and onwards support adaptive performance. thermal throttling mobile devices don’t have an active cooling system, so temperature continues to rise and it will limit the cpu / gpu clock to control heat and consequently degrading the performance. 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 the throttling system to adjust the cpu/gpu clock. adjust quality it also provides you with the option to adjust the quality of the game to maintain stable performance at different warning levels. dynamic quality setting you can scale the quality of your game in real-time to meet the desired performance. this includes changes in network, animation, physics, level of detail, and visual effects. scalers with the latest addition to the adaptive performance tool v2.0, available in the 2020 version of unity, here’s a list of features that can be managed within the adaptive performance scalers in the project settings: frame rate resolution batching level of detail (lod) look up texture (lut) multisample anti-aliasing (msaa) shadow cascade shadow distance shadow map resolution shadow quality sorting transparency view distance there are other available features in the adaptive performance settings menu that can be edited similarly with different scale ranges. variable refresh rate another latest addition provided in v2.0 is the variable refresh rate (vrr). this will increase frame rate for devices that support refresh rates above 60. simulator the newest and useful feature that allows you to facilitate mobile development would be the device simulator. this allows developers to display the game as it would be presented on a device. megacity demo game you will use a demo game, named megacity, and optimize its performance using adaptive performance tools. megacity contains the following: 8 million triangles 6 million entities 2000 cars 100 audio source (heavy for mobile in general case) unity 2019.1 visual studio 2017 android sdk + ndk 16b profiling: gpu watch gpuwatch gpuwatch is a profiling tool for observing gpu activity in your app. the following gpu related information are measured by the gpuwatch: fps counters current average cpu / gpu load cpu load gpu load gpu frequency frame info render pass stats vertex / fragment shader load set up your environment you will need the following: visual studio 2017 android sdk (latest) ndk r16b or later java se development kit (jdk) 8 or later unity 2019.1.14f1 or later https://unity3d.com/get-unity/download/archive run unity hub and add megacity project sample code here is a sample code for you to start coding in this code lab. download it and start your learning experience! adaptive performance sample code (1.93 kb) enable gpuwatch how to enable gpuwatch: test out the base sample app the base sample is written with classic simple approach: check cpu / gpu bottleneck trigger when thermal status is changed adjust cpu / gpu clock level adjust quality setting by setting lod adjust target fps all of these can be controlled in real-time. install adapative performance package go to editor > windows > package manager > install adaptive performance package. modify c# script go to editor > window > package manager > import adaptive performance package. double click adaptiveperformancecontroller.cs script file to edit. modify script as intended. build and launch apk select file > build settings. check that the device is connected and check the development build / scripts only build option. then, click patch and the installed apk on your device will be updated. measure performance to check current application performance, check the fps and cpu / gpu load counters. as you can see, the performance is not very good. the next step is to check current status where you will try to: check performance status to know if there is any bottleneck iadaptiveperformance.performancestatus.performancemetrics.performancebottleneck cpu: frame rate is limited by cpu processing gpu: frame rate is limited by gpu processing targetframerate: can’t reach target frame rate frame rate is limited by application.targetframerate. in this case, the application should consider lowering performance requirements. check thermal status register event handler to trigger thermal status and set handler into: ithermalstatus.thermalstatus.thermalevent check thermalmetrics information in event handler: warninglevel 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. please note that it takes at least 10s until the temperature trend may reflect any changes. adjust target frame rate change target frame rate when thermal status is changed. for example: change the quality setting change the quality setting by adjusting lod in real-time. adjust cpu/gpu clock change cpu / gpu clock level by ideviceperformancecontrol. ideviceperformancecontrol automaticperformancecontrol when set to true (default) cpulevel and gpulevel are set automatically by adaptive performance. maxcpuperformancelevel the maximum valid cpu performance level you use with cpulevel. the minimum value returned is mincpuperformancelevel. this value does not change after startup is complete. maxgpuperformancelevel the maximum valid gpu performance level you use with gpulevel. the minimum value returned is mingpuperformancelevel. this value does not change after startup is complete. cpulevel the requested cpu performance level. higher levels typically allow cpu cores to run at higher clock speeds. the consequence is that thermal warnings and throttling may happen sooner when the device cannot sustain high clock speeds. changes are applied once per frame. it is recommended to set the cpulevel as low as possible to save power. the valid value range is [mincpuperformancelevel, maxcpuperformancelevel]. gpulevel the requested gpu performance level. higher levels typically allow the gpu to run at higher clock speeds. the consequence is that thermal warnings and throttling may happen sooner when the device cannot sustain high clock speeds. changes are applied once per frame. it is recommended to set the gpulevel as low as possible to save power. the valid value range is [mingpuperformancelevel, maxgpuperformancelevel]. summary check the current status by: thermalmetrics.warninglevel (nowarning/ throttlingimminent/ throtting) performancebottleneck (cpu / gpu / targetframerate) control the performance by adjusting: lod bias cpu / gpu clock level target frame rate if possible, gfx load (triangles, memory, draw calls..) performance results frame rate now displays a stable fps with adaptive performance. you're done! congratulations! you have successfully achieved the goal of this code lab. now, you can improve the frame rate using adaptive performance by yourself! if you're having trouble, you may download this file: adaptive performance complete code (2.25 kb) to learn more about adaptive performance, gpuwatch, and galaxy gamedev, visit: www.developer.samsung.com/galaxy-gamedev

      https://developer.samsung.com/codelab/gamedev/adaptive-performance.html
      1. Distribute
      2. Galaxy Store Games

      doc

      Start Selling in Galaxy Store

      get started in galaxy store the following is a list of tasks (required, recommended, and optional), videos, and recommended reading to help you start selling your apps in galaxy store. a link to more detailed information is provided, when available. the icons represent the following: required task recommended task optional task video recommended reading prepare before you do anything, sign up for a samsung account. using your samsung account, you can register with samsung developers and seller portal and apply for commercial seller status. then, understand what you need to do if you are submitting your app to more than one app store, and review the online resources provided by galaxy gamedev. register with seller portal (downloadable pdf). seller portal is used to manage your applications that are distributed in galaxy store. if you want to sell your app in galaxy store, you must have a seller portal account. the seller portal user guide provides more information about seller portal registration. also, watch the video about how to create a seller portal account. apply for commercial seller status (downloadable pdf). in seller portal, you must apply for commercial seller status. the seller portal user guide provides more information about commercial seller status. review apk package naming and billing guidelines. when you are submitting a game or app to more than one app store, you need to keep track of the package name and/or version codes you use in your apk for each app store and, if you have in-app purchases, the billing solution used. add a galaxy store review link. get feedback from your customers by adding a link from your app to your app's review page in galaxy store. positive feedback can influence users to purchase your app. explore the samsung developers portal. samsung developers portal provides access to sdks, services, tools, and guides. you can also sign up for a newsletter that keeps you up-to-date with the latest blogs, news, and events. register using your samsung account. how to create a seller portal account. seller portal is used to manage your applications that are distributed in galaxy store. if you want to sell your app in galaxy store, you must have a seller portal account. explore the seller portal dashboard. check out the top level menus, learn some of the basic tasks, and discover where to find additional information and support for seller portal. learn about samsung seller portal. a basic overview of the major features in seller portal. learn about galaxy gamedev. review technical support options for game developers. monetize learn about requirements for in-app items and paid apps. integrate with samsung in-app purchase (iap) (downloadable pdf). if you are selling your app and/or in-app items, you must use samsung iap as your billing solution. samsung iap includes an sdk, guides, examples, and unity and unreal plugins. maximize your revenue with samsung in-app purchase. learn about the new features and improvements released in samsung in-app purchase (iap) 6.0. monetize your games with samsung in-app purchase. introduction to samsung iap plug-in functionality for unity and unreal game engines. learn more about samsung iap. review the online samsung iap documentation. make the most from your games. discover different ways to generate revenue in galaxy store. launch register your app and in-app items in seller portal, test your app, then launch your app in galaxy store. all apps must be reviewed and approved by samsung before they are distributed to galaxy store for sale. noteare you a developer of a popular game on galaxy smartphones? we can help you go live in five minutes in galaxy store. contact us to learn more about our fast app review process. register your app in seller portal (downloadable pdf, by app type: android, galaxy themes. how to register your app in seller portal, based on the app type. the seller portal user guide provides more information about app registration. pre-certify your app. if you are working with the samsung business development team, your new apps or major updates must be pre-certified. pre-certification helps to uncover issues before an app is submitted to galaxy store. if no issues are found, pre-certification can take around five days to complete. review the app distribution guide. ensure that your app meets samsung's requirements and standards of quality to pass publication review. set a publication date. determine when your app becomes available in galaxy store. your app can be published when it passes an initial review, on a set date, or you can manually control the release of your app. in seller portal, set the publication date in the publication tab using the start publication field. beta test your app. learn how to deploy your app for beta testing and receive valuable feedback from testers. test your in-app item transactions. test your samsung iap integration, such as in-app item offering, purchase, and payment functionality. available for closed beta testing only. publish in five minutes. contact us to find out if your games qualify for our fast app review process. review the seller portal user guide. review information about seller portal. use the galaxy store developer api. learn how to manage your apps and in-app items and view statistics about your apps programmatically. seller portal android app binary registration device resolution. lists the device resolutions most used by customers in galaxy store. this is a required field when you register your android app in seller portal. manage in-app items. read more about how to manage your in-app items in seller portal. test your app on a samsung device. test your app on the latest samsung galaxy devices using remote test lab. understand the review process. check out the steps samsung takes to review your app. level up after you app is published in galaxy store, learn more about tracking performance metrics, promoting your app, and tracking user data. engage on social media. promote your content and attract new customers using our social media kits, hashtags, and guidelines. create galaxy store badges. directly link users from your web site or social media channels to your app product detail page. generate badges from seller portal after the publication of your app. request promotion for your galaxy themes. promote your app and increase your downloads by being included in a collection in galaxy store. discover user attribution data. identify how a user finds your app's detail page in galaxy store using galaxy store statistics. integrate with third-party attribution platforms. track user data using third-party attribution platforms integrated with galaxy store. become familiar with galaxy store statistics. galaxy store statistics (gss) is a tool that is included with seller portal and allows you to see the performance metrics of all your apps. learn about the valuable data available to you in gss. u.s. partner onboarding guidelines the pdf content provided on this page was taken from the u.s. partner onboarding guidelines. for your convenience, the entire guideline is provided in a single downloadable pdf for each app type. you must log in or be logged in to your samsung account to download these pdfs. u.s. partner onboarding guideline (android) 4.25mb (pdf) u.s. partner onboarding guideline (galaxy themes) 3.8mb (pdf)

      https://developer.samsung.com/galaxy-games/get-started-in-galaxy-store.html
      1. Learn
      2. Code Lab

      codelab

      Implement Flex Mode on a Unity Game

      implement flex mode on a unity game objective learn how to implement flex mode on a unity game using android jetpack windowmanager and unity's java native interface (jni) wrapper. 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: unity hub with unity 2020.3.31f1 or later (must have android build support) 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 sample code here is a sample project for you to start coding in this code lab. download it and start your learning experience! flex mode on unity sample code (43.39 kb) start your project after downloading the sample project files, follow the steps below to open your project: launch the unity hub. click projects > open. locate the unzipped project folder and click open to add the project to the hub and open in the editor. notethe sample project was created in unity 2020.3.31f1. if you prefer using a different unity version, click choose another editor version when prompted and select a higher version of unity. configure android player settings to ensure that the project runs smoothly on the android platform, configure the player settings as follows: go to file > build settings. under platform, choose android and click switch platform. wait until this action finishes importing necessary assets and compiling scripts. then, click player settings to open the project settings window. go to player > other settings and scroll down to see target api level. set it to api level 31 as any less than this will result in a dependency error regarding an lstar variable. you can set the minimum api level on lower levels without any problem. next, in the resolution and presentation settings, enable resizable window. it is also recommended that render outside safe area is enabled to prevent black bars on the edges of the screen. lastly, enable the custom main manifest, custom main gradle template, and custom gradle properties template in the publishing settings. after closing the project settings window, check for the new folder structure created within your assets in the project window. the newly created android folder contains androidmanifest.xml, gradletemplate.properties, and maintemplate.gradle files. import the foldablehelper and add dependencies 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 (171.80 kb) to import the foldablehelper.java file and add dependencies to the project, follow the steps below: in assets > plugins > android, right-click and select import new asset. locate and choose the foldablehelper.java file, then click import. next, open the gradletemplate.properties file to any source code editor like visual studio and add the following lines below the **additional_properties** marker. android.useandroidx = true android.enablejetifier = true useandroidx sets the project to use the appropriate androidx libraries instead of support libraries. enablejetifier automatically migrates existing third-party libraries to use androidx by rewriting their binaries. lastly, open the maintemplate.gradle file and add the dependencies for the artifacts needed for the project. **apply_plugins** dependencies { implementation filetree(dir: 'libs', include: ['*.jar']) implementation "androidx.appcompat:appcompat:1.4.1" implementation "androidx.core:core:1.7.0" implementation "androidx.core:core-ktx:1.7.0" implementation "androidx.window:window:1.0.0" implementation "androidx.window:window-java:1.0.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0" **deps**} noteyou may update the version of these dependencies when necessary, but be aware that there might be significant changes. create a new playeractivity to implement flex mode on your applications, you must make necessary changes to the activity. since it is impossible to access and change the original unityplayeractivity, you need to create a new playeractivity that inherits from the original. to do this: create a new file named foldableplayeractivity.java and import it into the android folder, same as when you imported the foldablehelper.java file. to extend the built-in playeractivity from unity, write below code in the foldableplayeractivity.java file. package com.unity3d.player; import android.os.bundle; import com.unity3d.player.unityplayeractivity; import com.samsung.android.gamedev.foldable.foldablehelper; import android.util.log; public class foldableplayeractivity extends unityplayeractivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); foldablehelper.init(this); } @override protected void onstart() { super.onstart(); foldablehelper.start(this); } @override protected void onstop() { super.onstop(); foldablehelper.stop(); } } oncreate() calls the foldablehelper.init() to ensure that the windowinfotracker and metrics calculator gets created as soon as possible. onstart() calls the foldablehelper.start() since the first windowlayoutinfo doesn't get created until onstart(). onstop() calls the foldablehelper.stop() to ensure that when the application closes, the listener gets cleaned up. after creating the foldableplayeractivity, ensure that the game uses it. open the androidmanifest.xml file and change the activity name to the one you've just created. <activity android:name="foldableplayeractivity" android:theme="@style/unitythemeselector"> … </activity> store foldablelayoutinfo data to flexproxy implement a native listener that receives calls from java when the device state changes by following these steps: use the androidjavaproxy provided by unity in its jni implementation. androidjavaproxy is a class that implements a java interface, so the next thing you need to do is create an interface in the foldablehelper.java file. public interface windowinfolayoutlistener { void onchanged(foldablelayoutinfo layoutinfo); } this interface replaces the temporary native function. therefore, remove the code below: public static native void onlayoutchanged(foldablelayoutinfo resultinfo); then, go to assets > scripts, and right-click to create a new c# script inside called flexproxy.cs. inside this script, create the flexproxy class inheriting from androidjavaproxy. public class flexproxy : androidjavaproxy { } in flexproxy class, define the variables needed to store the data from foldablelayoutinfo and use enumerators for the folded state, hinge orientation, and occlusion type. for the various bounds, use unity's rectint type. also, use a boolean to store whether the data has been updated or not. public enum state { undefined, flat, half_opened }; public enum orientation { undefined, horizontal, vertical }; public enum occlusiontype { undefined, none, full }; public state state = state.undefined; public orientation orientation = orientation.undefined; public occlusiontype occlusiontype = occlusiontype.undefined; public rectint foldbounds; public rectint currentmetrics; public rectint maxmetrics; public bool hasupdated = false; next, define what java class the flexproxy is going to implement by using the interface's fully qualified name as below: public flexproxy() : base("com.samsung.android.gamedev.foldable.foldablehelper$windowinfolayoutlistener") { } com.samsung.android.gamedev.foldable is the package name of the foldablehelper.java file. foldablehelper$windowinfolayoutlistener is the class and interface name separated by a $. after linking the proxy to the java interface, create a helper method to simplify java to native conversions. private rectint converttorectint(androidjavaobject rect) { if(rect != null) { var left = rect.get<int>("left"); var top = rect.get<int>("top"); var width = rect.call<int>("width"); var height = rect.call<int>("height"); return new rectint(xmin: left, ymin: top, width: width, height: height); } else { return new rectint(-1, -1, -1, -1); } } this method takes a java rect object and converts it into a unity c# rectint. now, use this converttorectint() function for the onchanged() function: public void onchanged(androidjavaobject layoutinfo) { foldbounds = converttorectint(layoutinfo.get<androidjavaobject>("bounds")); currentmetrics = converttorectint(layoutinfo.get<androidjavaobject>("currentmetrics")); maxmetrics = converttorectint(layoutinfo.get<androidjavaobject>("maxmetrics")); orientation = (orientation)(layoutinfo.get<int>("hingeorientation") + 1); state = (state)(layoutinfo.get<int>("state") + 1); occlusiontype = (occlusiontype)(layoutinfo.get<int>("occlusiontype") + 1); hasupdated = true; } attach flexproxy to foldablehelper in this step, you need to attach the flexproxy to the java implementation. modify the foldablehelper.java and foldableplayeractivity.java files as follows: in the foldablehelper.java file, create a variable in foldablehelper class where you can store the listener. private static windowinfolayoutlistener listener = null; create a method to receive the native listener. public static void attachnativelistener(windowinfolayoutlistener nativelistener){ listener = nativelistener; } to ensure that the listener is actually used, modify the layoutstatechangecallback to: call the listener.onchanged, the androidjavaproxy version of onchanged function, instead of calling the existing onchanged function in the java file; and check if the listener exists at the time of calling. @override public void accept(windowlayoutinfo windowlayoutinfo) { if (listener != null){ foldablelayoutinfo resultinfo = updatelayout(windowlayoutinfo, activity); listener.onchanged(resultinfo); } } finally, in the foldableplayeractivity.java file, import windowinfolayoutlistener. import com.samsung.android.gamedev.foldable.foldablehelper.windowinfolayoutlistener; then, create a new method in foldableplayeractivity to pass the native listener to foldablehelper. public void attachunitylistener(windowinfolayoutlistener listener){ foldablehelper.attachnativelistener(listener); } implement native flex mode this section focuses on creating the flex mode split-screen effect on the game’s user interface (ui). create a new c# script in the scripts folder called flexmodehelper.cs. after creating the script, define the variables you need for this implementation. public class flexmodehelper : monobehaviour { private flexproxy windowmanagerlistener; [serializefield] private camera maincamera; [serializefield] private camera subcamera; [serializefield] private gameobject flat_ui_panel; [serializefield] private gameobject flex_ui_panel; private recttransform flex_ui_top; private recttransform flex_ui_bottom; screenorientation currentorientation; bool isfold = false; bool isflip = false; float landscapefov = 65; float portraitfov; flexproxy object is the callback object which receives the foldablelayoutinfo from java. maincamera and subcamera are two cameras creating the split-screen effect. however, flex mode does not require the use of two cameras. so, if you only need one viewport, you can remove the subcamera and replace it with any component you want. gameobjects, namely flat_ui_panel and flex_ui_panel, are the parent objects of two ui designs: flat mode (full screen) and flex mode (split screen). recttransforms, namely flex_ui_top and flex_ui_bottom, are the two child objects within flex_ui_panel to serve as the top screen and bottom screen. screenorientation object handles the field of view (fov) changes on the cover screen of the galaxy z fold series (except galaxy fold) and the screen of non-foldable devices. isfold and isflip are booleans to store whether the app runs on a galaxy z fold or z flip device and help create a consistent fov across both devices. landscapefov and portraitfov are two fov values to keep a consistent fov across both orientations of the device. noteidentification of the device where the app is running is not necessary. yet, it is recommended if you want to know how to customize the fov of the game concerning the device model. next, construct a start() method where you: create a flexproxy object and pass it into attachunitylistener on the activity using unity’s jni implementation; turn off the subcamera initially, assuming that the game starts on normal mode; identify which device the app is running using systeminfo.devicemodel. the model number of the galaxy z fold series starts with "sm-f9", while it's "sm-f7" for the galaxy z flip series; calculate the portraitfov from the landscapefov and the camera aspect ratio; set the initial fov depending on the device's orientation using unity's screen.orientation; and retrieve the transforms of the flex ui top and bottom panels. void start() { windowmanagerlistener = new flexproxy(); using (androidjavaclass javaclass = new androidjavaclass("com.unity3d.player.unityplayer")) { using (androidjavaobject activity = javaclass.getstatic<androidjavaobject>("currentactivity")) { activity.call("attachunitylistener", windowmanagerlistener); } } subcamera.enabled = false; string devicemodel = systeminfo.devicemodel; if (devicemodel.contains("sm-f9")) { isfold = true; } else { isflip = devicemodel.contains("sm-f7"); } portraitfov = camera.horizontaltoverticalfieldofview(landscapefov, maincamera.aspect); currentorientation = screen.orientation; if (currentorientation == screenorientation.landscape || currentorientation == screenorientation.landscapeleft || currentorientation == screenorientation.landscaperight) { maincamera.fieldofview = landscapefov; } else { maincamera.fieldofview = portraitfov; } flex_ui_top = (recttransform)flex_ui_panel.transform.getchild(0); flex_ui_bottom = (recttransform)flex_ui_panel.transform.getchild(1); } after the game starts, assign a task to flexmodehelper to check if there is an update in the windowmanagerlistener. the windowmanagerlistener receives a call from java when there is a change in the folded state. if a change occurs, update the currentorientation and run the updateflexmode() method. alternatively, if the listener hasn't updated, check to see if the screen has changed orientation. since the cover screen has no folding feature, flexproxy will not update as the callback won't trigger. instead, store the screenorientation and compare if it matches the current screen orientation. otherwise, change the fov because the device has just rotated. once we have figured out if the device has rotated, update the fov of the maincamera based on whether it's in landscape or portrait mode. void update() { if (windowmanagerlistener.hasupdated) { currentorientation = screen.orientation; updateflexmode(); } else { if (screen.orientation != currentorientation) { currentorientation = screen.orientation; if (currentorientation == screenorientation.landscape || currentorientation == screenorientation.landscapeleft || currentorientation == screenorientation.landscaperight) { maincamera.fieldofview = landscapefov; } else { maincamera.fieldofview = portraitfov; } } } } create the updateflexmode() method to adjust the game ui according to the folded state of the device. void updateflexmode() { } in this method, check if the folded state is half_opened. if so, enable the subcamera for it to start rendering to the bottom screen and switch the active ui panel to the one created for flex mode (flex_ui_panel). if(windowmanagerlistener.state == flexproxy.state.half_opened) { subcamera.enabled = true; flex_ui_panel.setactive(true); flat_ui_panel.setactive(false); then, check whether the orientation of the fold is horizontal. if (windowmanagerlistener.orientation == flexproxy.orientation.horizontal) { notefor this sample game, splitting the screen isn’t ideal vertically 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 to split the screen vertically, you need to use the same principle in the next step but for the x-axis instead of the y-axis. so, if the device is on flex mode and horizontal fold, adjust the ui to place the maincamera at the top and subcamera at the bottom of the screen. locate the normalized location of the foldbounds. float foldratiotop = (float)windowmanagerlistener.foldbounds.ymin / windowmanagerlistener.currentmetrics.height; float foldratiobot = (float)windowmanagerlistener.foldbounds.ymax / windowmanagerlistener.currentmetrics.height; use these to set the render areas of the maincamera and subcamera above and below the foldbounds. maincamera.rect = new rect(0, foldratiotop, 1, foldratiotop); subcamera.rect = new rect(0, 0, 1, foldratiobot); next, ensure that the fovs are consistent across the two uis. reset the field of view of each camera, and use the foldratio to ensure that the size of objects in flex mode appears roughly the same as in flat mode. also, use two slightly different fovs for the galaxy fold and flip devices. if (isfold) { maincamera.fieldofview = (landscapefov * foldratiotop); subcamera.fieldofview = (landscapefov * foldratiobot); } else { if(isflip) { maincamera.fieldofview = (landscapefov); subcamera.fieldofview = (landscapefov); } } finally, update the two child objects of the flex_ui to ensure that they line up with the position of the fold. flex_ui_top.anchormin = new vector2(0, foldratiotop); flex_ui_top.anchormax = new vector2(1, 1); flex_ui_bottom.anchormin = new vector2(0, 0); flex_ui_bottom.anchormax = new vector2(1, foldratiobot); however, if the device is not on flex mode and the orientation of the fold is not horizontal, then run the restoreflatmode() method. notify the flexproxy object that its data has been used. } else { restoreflatmode(); } } else { restoreflatmode(); } windowmanagerlistener.hasupdated = false; } create the restoreflatmode() function where you: set both cameras to render to the entire screen; disable the subcamera; and disable the flex ui and enable the flat ui. void restoreflatmode() { maincamera.rect = new rect(0, 0, 1, 1); subcamera.rect = new rect(0, 0, 1, 1); subcamera.enabled = false; flex_ui_panel.setactive(false); flat_ui_panel.setactive(true); also, check to see if the folded state is undefined, which means that the app is running on the cover screen of a galaxy z fold device. if so, treat the screen as a rectangle and use either the landscapefov or the portraitfov depending on the orientation. additionally, since the app might have been initially opened on the main screen of a galaxy fold device, recalculate the portraitfov using the aspect ratio of the cover screen. if the folded state is not undefined, then the app is opened on the main screen of either a galaxy z fold or z flip. in this case, set the fov accordingly by using the isfold boolean to check. if the boolean returns true, treat the screen as a square. otherwise, treat it as a rectangle and set the fov based on the orientation. if (windowmanagerlistener.state == flexproxy.state.undefined) { if (currentorientation == screenorientation.landscape || currentorientation == screenorientation.landscapeleft || currentorientation == screenorientation.landscaperight) { maincamera.fieldofview = landscapefov; } else { if(isfold) portraitfov = camera.horizontaltoverticalfieldofview(landscapefov, maincamera.aspect); maincamera.fieldofview = portraitfov; } } else { if (isfold) { maincamera.fieldofview = landscapefov; } else { if (currentorientation == screenorientation.landscape || currentorientation == screenorientation.landscapeleft || currentorientation == screenorientation.landscaperight) { maincamera.fieldofview = landscapefov; } else { maincamera.fieldofview = portraitfov; } } } } set up flex scene return to the unity editor and create an empty gameobject in the scene. right-click on the sample scene > gameobject > create empty and name it flexmanager. select the flexmanager object, then drag and drop the flexmodehelper script into the inspector pane. then, select the cameras and ui panels like below: build and run the app go to file > build settings and ensure that the scenes/samplescene is selected in scenes in build. click build to build the apk. after building the apk, 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 unity game app by yourself! if you're having trouble, you may download this file: flex mode on unity complete code (631.05 mb) to learn more, visit: www.developer.samsung.com/galaxy-z www.developer.samsung.com/galaxy-gamedev

      https://developer.samsung.com/codelab/gamedev/flex-mode-unity.html
      1. Learn
      2. Code Lab

      codelab

      Implement Flex Mode on an Unreal Engine Game

      implement 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

      https://developer.samsung.com/codelab/gamedev/flex-mode-unreal.html
      1. Distribute
      2. Galaxy Store

      doc

      Hashtags

      samsung developer hashtags when you publish your post in social media, include one or two of the applicable samsung hashtags listed in the tables below. hashtags for games published in galaxy store samsung games android hardware #samsunggalaxy#samsungmobile#samsung#samsunggamelauncher #gamedev#gaming#gamer#mobilegaming #mobilegamer#indiegame#indiegamedev#indiegaming#gamerlife #androidgaming#androidgamer #galaxyzflip4#galaxyzflip4bespokeedition#galaxys23#galaxybuds2#galaxybuds2pro hashtags for galaxy themes samsung design themes hardware #samsunggalaxy#samsungmobile#samsung #design#designer#android#androidui#themes#ui #androidtheme#samsungtheme#samsungthemes#galaxytheme#galaxythemes#themestore#samsungthemestore #galaxyzflip4#galaxyzflip4bespokeedition#galaxys23 hashtags for galaxy watch samsung wearable watch face hardware #samsunggalaxy#samsunggear#samsungwatch#samsung #smartwatch#wearable#clockface#dialface#wearabletech#watch#galaxyapps#watchaddict#watchnerd#watchgeek #watchfacestudio#galaxywatchfortizen#watchface#watchfaces#watchfaceoftheday#galaxywatchstudiofortizen#watchfacedesign#galaxywatchdevelopers #galaxywatch5#galaxywatch

      https://developer.samsung.com/galaxy-store/social-promotion/hashtags.html
      No Search Results
      No Search results. Try using another keyword.
      • <<
      • <
      • 1
      • 2
      • >
      • >>
      Samsung Developers
      Samsung Developers
      Quick Link
      • Android USB Driver
      • Code Lab
      • Galaxy Emulator Skin
      • Foldables and Large Screens
      • One UI Beta
      • Remote Test Lab
      • Samsung Developers Podcast
      Family Site
      • Bixby
      • Knox
      • Samsung Pay
      • SmartThings
      • Tizen
      • Samsung Research
      • Samsung Open Source
      • Samsung Dev Spain
      • Samsung Dev Brazil
      Legal
      • Terms
      • Privacy
      • Open Source License
      • Cookie Policy
      Social Communications
      • Facebook
      • Instagram
      • Twitter
      • YouTube
      • Buzzsprout
      • Rss
      • Linkedin
      • System Status
      • Site Map
      • System Status
      • Site Map
      • facebook
      • instagram
      • twitter
      • youtube
      • buzzsprout
      • rss
      • linkedin

      Copyright © 2023 SAMSUNG. All rights reserved.