• Learn
    • Code Lab
    • Foldables and Large Screens
    • One UI Beta
  • 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
      • Galaxy Watch for Tizen
      • Watch Face Studio
      • One UI Watch for Tizen
      • Galaxy Watch Studio Converter
      • Samsung IAP for Galaxy Watch (Tizen)
    • 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
    • Instant Plays
  • Support
    • Developer Support
    • Remote Test Lab
    • Samsung Android USB Driver
    • Galaxy Emulator Skin
  • Connect
    • Blog
    • News
    • Forums
    • Events
    • Samsung Developer Conference
    • SDC23
    • 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
  • SDC22
  • Watch Face Studio
All Search Form
Recommendation
    Suggestion
      All Search Form
      Filter
      Filter
      Filter
      • ALL (100)
      • DOCS
      • SDK
      • API REFERENCE
      • CODE LAB
      • BLOG
      • NEWS/EVENTS
      • OTHERS
        api reference code lab blog news/events
      1. tutorials | mobile, game

      blog

      Creating your First APK with the Cordova CLI - Part I

      apache cordova is an excellent option for developers who already have a web application and want to port it to the different mobile platforms, or just want to have a consistent way to create cross-platform mobile web apps. this blog is the first in a series to introduce you to cordova, and how to create different types of mobile applications using standard web technologies. in this post, we will cover cordova basics and the prerequisites for your development environment. the following post will get into details on how to create your first app, and then to publish the resulting apk in samsung’s galaxy store. in an upcoming blog i’ll talk about photon storm’s phaser, that is one of the most trusted frameworks for developing professional-quality 2d games in javascript. with phaser, it’s feasible to make performant games that run smoothly in all major mobile operating systems, while only having to maintain one codebase. additionally, you can rely on the huge javascript community to keep creating libraries that you can easily integrate in your games. what is a mobile web app let’s start checking what is a mobile web application: in the context of this post, we will refer to applications for mobile devices that require only a web browser to be installed on mobile device. they commonly use html and ajax, but are not written specifically for one mobile operating system. mobile web applications differ from mobile native applications, in that they use web technologies and are not limited to the underlying platform for deployment. this will give you the advantage of creating cross-platform applications using technologies that you may be familiar with in your front-end projects, and the ability to access a wide array of libraries and popular frameworks. what is cordova a typical challenge faced by mobile app developers is to achieve solid support of as many mobile clients as possible, and each one can have its own set of quirks and drawbacks. this, clearly, increases costs and development time. that is why cross-platform development tools like cordova are so widely used and supported. cordova is a platform used for building mobile apps with standard web technologies, namely html, css and javascript. think of cordova as a container that connects your web apps with native mobile functionalities through a unified javascript api. web applications don’t have access to native mobile functionalities by default, and that is the problem that cordova was created to solve. cordova connects the world of web app development and mobile devices, creating hybrid mobile apps that can use camera, geolocation, file system and other native mobile capabilities. in this post we will focus on the use of the cordova cli (command line interface), mainly because you will be able to use it for multiple platforms, and that fits perfectly with the needs of most developers interested in using cordova, to start with. pros of cordova easy to learn: if you are a front end developer, cordova has an easy learning curve. you can easily apply your skills as a web developer, and knowledge of standard web technologies, to build an app with cordova. all you really need is to learn a little bit about the command line tools and you will be running with cordova in no time. access to native functionalities: with cordova, you will have access to native device capabilities, such as the camera, push notifications, contacts, geolocation, accelerometer, sms, and others. open source: anyone can contribute to cordova’s source code to make it better. this also gives it a solid contributor base that is creating custom plugins and fixing bugs. cross-platform development: cordova compiles your app into a package file, which is required by most app stores. this means that apps created with cordova can easily be deployed to the mobile operating system your choosing. if you’re deploying to android, cordova creates an apk (android application package) file. this is the file that we will create in this blog post. prerequisites: node.js we’ll be dealing with purely javascript (and perhaps a little bit of html) through this post, so all you need to install manually is node.js. this will give you the node and npm executables on your system. to install node.js you can go to their official site and download the latest version available for your operating system. on mac you can download the installer from the official page: or you can download the package with bash: curl "https://nodejs.org/dist/latest/node-${version:-$(wget -qo- https://nodejs.org/dist/latest/ \ | sed -ne 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$home/downloads/node-latest.pkg"\ && sudo installer -store -pkg "$home/downloads/node-latest.pkg" -target "/" on windows is just easier to download the correct installer: and then follow the instructions: it may prompt you to install more necessary tools. installing cordova once node.js is installed, download the apache cordova command line by running this command in your terminal/command prompt. the cordova module will automatically be downloaded by the npm utility. on windows you should open your command shell and type: npm install -g cordova on mac and linux open your terminal and type: sudo npm install -g cordova you may be prompted to type your operating system password, and after that you should see the installation progress in your command or terminal window. the -g flag in the command above is needed so npm installs cordova globally. if you don’t use this option, cordova will be installed only for your the current working directory. after the installation is completed, you can type cordova on the command line and it should display the main help for the cordova cli. that's it for today. in the next post, we'll talk more about using this tool. talk with us we love to chat with mobile game developers and help you as you develop, publish, and market your own games. galaxy store is a great place to publish your game and get discovered. if you are a mobile app developer and want to request a quick chat with us, just fill out this form.

      Diego Lizarazo Rivera

      https://developer.samsung.com/sdp/blog/en-us/2021/01/28/creating-your-first-apk-with-the-cordova-cli---part-i
      1. tutorials | mobile

      blog

      Want Statistics for Your Apps Using the Galaxy Store Developer API?

      you must have heard about galaxy store, where developers sell their apps, themes, and watch faces to galaxy device users. the galaxy store seller portal has an amazing tool called galaxy store statistics (gss). this tool provides information about your sales, revenue, ratings, and much more, which helps you to make more effective business decisions. if you want to collect this data programmatically, you can use the galaxy store developer (gsd) api. this is a set of server-to-server apis that allows you to manage apps, manage in-app items, and check app statistics. gss api is one of these gsd apis. the gss api provides programmatic access to some of the statistics in the gss system. you can get the data you are interested in and view it using your own ui. if your app is being sold in more than one app store, then you can view and compare the data in one page. the gss api also helps you in data analysis. what is the gss api? the gss metric api provides statistics for all registered apps and for a particular app. in this blog article, i show how you can call this api and get statistical data from your apps. since python is the top choice among major developers, i am going to demonstrate how to implement the gss apis using this language. let's get started! get started first, you need to install python on your pc. the rest of this guide assumes you have already done this. prerequisites: service account id: create a seller account in galaxy store seller portal and get the service account id. you can find the details here. authorization: get the access token from the galaxy store authentication server using the accesstoken api. check out this blog to learn about creating the access token using python. after getting these required values, we are ready to call the gss api. gss metric api the gss metric api provides two types of metric apis: one for viewing the statistics of all the registered apps of a seller and the other for viewing the statistics of one particular app of a seller. both of these apis are discussed below. view seller metrics the sellermetric api is a part of the gss metric api. this api provides statistics of all apps registered in galaxy store for a given seller id. currently, this api can show four types of statistics: new downloads: the number of devices on which users have downloaded the app for the first time. downloads by devices: the number of devices on which users have downloaded the app. sales: total income the app has generated. item sales: sales an item has generated. each type of statistic has its own metric id. we have to add the metric id or ids in our request to view the specific statistic of all the registered apps. we also have to set a period to view the data in a particular time range. both the metric id and time period are mandatory to call this api. there are numerous ways to view the data of a particular metric id. for example, we can get a daily trend value, content metadata. and filtered data based on the country or device. it's also possible to get aggregated data based on the day, week, or month. first, let's go through an example where we get all four types of statistics of all registered apps. to compare between a previous period and the current period, two time periods have to be set. each period is a range of time, denoted by "startdate" and "enddate". in this example, we set the current period as 8th march to 14th march and the previous period as 1st march to 7th march. we want to see the data based on all countries and devices, so we don't specify any country or device in the filter attribute. since we want to see the filtered data, we have to set "getbreakdownsbyfilter" to true. finally, we can show the data aggregated by day. let's start to write the python script. as we have seen earlier, we need the requests library. so first, let's import it in our script. we also need to import the json library because we have to send our data as a string. # importing the requests library import requests # importing the json library import json now, create a dictionary to hold the data which will be sent to api. here, we need to send serialized data in the form of a string and thus json.dumps is necessary to perform the serialization. it is for this reason that we imported the json library earlier. # data to be sent to the api payload = json.dumps({ "periods": [ { "startdate": "2022-03-08", "enddate": "2022-03-14" }, { "startdate": "2022-03-01", "enddate": "2022-03-07" } ], "getdailymetric": false, "getbreakdownsbyfilter": true, "nocontentmetadata": true, "metricids": [ "total_unique_installs_filter", "revenue_total", "dn_by_total_dvce", "revenue_item" ], "filters": {}, "trendaggregation": "day" }) finally, define the url and send the post request. # defining the api endpoint seller_metric_url = 'https://devapi.samsungapps.com/gss/query/sellermetric' try: response = requests.post(seller_metric_url, headers=headers,data=payload) print(response.status_code) print(response.text) except exception as e: print(str(e)) the data we are interested in is contained in the response. view content metrics the contentmetric api is for retrieving statistics for a specific app or content. currently, this api can show five types of statistics: new downloads: the number of devices on which users have downloaded the app for the first time. sales: total income the app has generated. item purchases: number of items purchased and number of canceled payments. average rating: daily average rating this app has received. ratings volume: total number of ratings that have been submitted. the metric id and time period are mandatory for this api, just like in the sellermetric api. we can get filtered data based on the country or device and aggregated data based on the day, week, or month. i will show you another example to demonstrate this api. in this example, we get all five types of statistics of a particular registered app. first, we set the current period as 2nd may to 2nd july and the previous period as 1st march to 1st may. we want to see the data based on all countries and devices, so we don't specify any country or device in the filter attribute. we want to see the summary data, so we have to set nobreakdown to true. finally, we can show the data aggregated by day. let's start to write the python script, which is largely the same as the sellermetric api. we just need to change the data which is sent to the api, since the contentmetric api requires the content id of an app. let's copy the code from the sellermetric example and create a dictionary to hold the data to be sent to the api. payload = json.dumps({ "contentid": "<content-id-of-your-app>", "periods": [ { "startdate": "2021-05-02", "enddate": "2021-07-02" }, { "startdate": "2021-03-01", "enddate": "2021-05-01" } ], "nobreakdown": true, "metricids": [ "total_unique_installs_filter", "revenue_total", "revenue_iap_order_count", "daily_rat_score", "daily_rat_volumne" ], "filters": {}, "trendaggregation": "day" }) finally, define the url and send the post request. # defining the api endpoint content_metric_url = 'https://devapi.samsungapps.com/gss/query/contentmetric' try: response = requests.post(content_metric_url, headers=headers,data=payload) print(response.status_code) print(response.text) except exception as e: print(str(e)) conclusion we have learned how to get statistics of all apps for a given seller and statistics for a specific app. you can keep a record of these statistics which can be helpful for your business in many ways. for example, based on this data, you can promote your app in a specific country, provide offers and give recommendations to new users. you can find more information about the gss system here (you must be logged in to your seller portal account to view this documentation). you can also ask questions in the samsung developer forum. blog articles in this series how to create an access token for the galaxy store developer api using python: an access token is sent in the authorization header of every galaxy store developer api call. learn to create an access token using the galaxy store developer api and python. app management using the galaxy store developer api and python: upload and submit an update to your app using the galaxy store developer api and python. managing in-app items using the galaxy store api and python: view, create, modify, and remove in-app items using the iap publish api and python.

      Jakia Sultana

      https://developer.samsung.com/sdp/blog/en-us/2022/04/14/want-statistics-for-your-apps-using-the-galaxy-store-developer-api
      1. featured | marketplace, mobile

      blog

      Strategies for Success: Building Your Fan Base

      the key to successful marketing is building your brand and creating a loyal customer base that returns to your store to purchase again. you want consumers to recognize your brand, trust the quality, and anticipate new releases. building your brand takes time and effort. from designing compelling consumer marketing assets to expanding your customer reach, in this blog series, i offer suggestions to help grow your customer base and ultimately reach your marketing goals. please note: this article links to a number of products, services, and online groups. the links are for the readers' convenience, but do not represent an endorsement of the products, services, or online groups. build a fan base the number one common factor for all successful app developers is building a fan base. this is the best way for consumers to discover your app collection, learn about your latest releases, take advantage of your marketing promotions, and to stay up-to-date with your brand. one easy way to start building your fan base is to collect email addresses to be used in marketing campaigns or newsletters. there are many ways you can encourage your customers to share their email. coupons a great way to reward your fans and promote your apps is with coupons. however, you should limit the use of coupons so that your paid apps maintain value. if you offer large quantities of coupons, your customer base will not be as likely to purchase your apps. downloads from coupons should be less than 15% of your total downloads. a few ways to leverage the power of coupons: buy one, get one free. create a marketing campaign for current customers to post a review of the app they purchased. email a screenshot as proof and get a free coupon for another app from your collection. share on social media. customers post a photo/video of their purchased app on social media and tag your brand handle. you’ll receive a tagged notification and can send the customer a message with their coupon code. ask subscribers of your youtube channel to post comments on your videos. award a lucky subscriber with a free coupon. shoot videos or take photos? the answer to that question is, both. photos are needed for marketing your apps on galaxy store and can easily be posted to your website and social sites. if you need help creating photos for watch apps, check out asset creator and lifestyle photos. these free templates will help you quickly create great photos for use in marketing. photos are great for a quick view and can get you a fast like. however, with video sharing sites becoming extremely popular, studies have shown that users are more likely to post comments on videos than photos. this type of engagement helps boost your posts to the top of the algorithm and can raise your ranking within search results. videos are also a fantastic way to show your apps in action, giving consumers confidence before deciding to purchase. videos give you the ability to not only show the features of your app but also set the mood to help inspire customers to purchase. rather than simply animate a series of screenshots, filming an actual device can make videos more compelling. however, if you do not have access to a device, here are a few alternatives that can help: purchase a video template that you can edit in a program like adobe premiere. one popular site for templates is video hive. download a 3d device and animate using a program like adobe after effects. 3d objects of samsung devices can be purchased at hum3d. watch face designer urarity creates promotional videos that highlight their work. website give your brand a home by creating a website. with services like wix, squarespace, and divi for wordpress, building an engaging website can be smooth and simple. having a website gives your brand credibility and builds trust with consumers. your website can include your complete library of apps, the latest news, and make it easy for consumers to contact you. newsletters one of the most critical tools for success is offering a newsletter that consumers can subscribe to. delivering a newsletter is the quickest and most direct way to reach consumers. services like mailchimp and constant contact offer email marketing solutions for distributing newsletters. instant messaging services like telegram, wechat, and whatsapp also offer a way for you to build a community and reach your fans. facebook groups finding like-minded samsung fans is easy on facebook. a few groups you can join are watch face samsung, samsung galaxy watch group, themes for samsung, and samsung themes. groups like these allow you to not only discover what other designers are creating but provide you a platform for showcasing your work and receiving feedback from members. youtube subscribers being one of the largest media platforms, youtube is an extremely important channel for you to market on. posting videos of your apps not only help to be discovered by an extremely large global audience but youtube's simple subscribe and notify feature makes it easy for you to build a strong fanbase. social media platforms there are many social media platforms to leverage. truthfully, the more platforms you are on will increase the visibility of your content, helping to boost traffic on search engines like google. reddit, twitter & medium – social news, discussion, and micro-blogging websites. follow developers and designers, join groups, post about your latest apps, and start a dialogue with people having similar interests. instagram, tiktok, dribbble & pinterest – all can be used by designers for self-promotion and social networking. post your latest photos and videos, search to discover what other designers are creating, excite your audience, or become inspired yourself. galaxy store badges the best way to point consumers to your apps and track activity is with galaxy store badges. just one click and consumers can access your marketplace. creating a badge generates a link to your app detail page or brand page. use badges to promote your apps on websites, videos, social media, and more. badges are also a great way to determine the effectiveness of your marketing efforts. by using your samsung account, you can measure the click-through rate of your badge links, page views, and downloads. read how to get started with galaxy store badges here. marketing info and resources additional reads: strategies for success look for new releases of my blog series, strategies for success, where i continue to deep-dive into the many areas that can influence your market growth. additional topics to include: brand names building your fan base (this post) consumer trends selling your apps samsung galaxy store: tips for marketing your apps check out my video, samsung galaxy store: tips for marketing your apps to learn more about creating brands, designing marketing graphics, social media tips, badges, and banner promotions. marketing resources looking for even more info about promoting your apps? our marketing resources page contains helpful information on promoting your apps. you can view lists of relevant hashtags to use on social media, learn more about discounts and coupons, as well as download guidelines and kits to help you get started. developer forums post questions, search for answers, or just see what are the latest topics for discussion. visiting our developer forum is an excellent way to stay up-to-date on all things related to the galaxy ecosystem. to see the latest marketing topics, be sure to view the marketing thread.

      Tony Morelan

      https://developer.samsung.com/sdp/blog/en-us/2021/02/01/strategies-for-success-building-your-fan-base
      1. tutorials | health, galaxy watch

      blog

      Events Monitoring

      the galaxy watch running wear os powered by samsung can detect events like hard falls. to detect the hard falls, the watch uses a built-in accelerometer. using the health services api, you can receive a fall detection event in your watch application. in this blog, we create a wear os application to identify a fall detection event and demonstrate how to use the health services api to achieve this on the galaxy watch. the galaxy watch uses the fall detection event in its sos feature. for more information, see use your samsung smart watch in an emergency situation. it can be used to take care of elderly people or patients. how to trigger a fall detection event in your application on the galaxy watch if the functionality provided with the watch is not sufficient for your solution, you can use the health services api to detect this event in your own application. in this section, we describe all the important steps that you must follow when building an events tracking app. as an example, we use the eventsmonitor sample project. project settings before you start writing your code, you need to import the health services api library in the dependencies section of the app/build.gradle file. implementation androidx.health:health-services-client:1.0.0-beta01 now you are ready to use the health services api. get passivemonitoringclient passivemonitoringclient enables tracking of the data in the background (without requiring an ongoing workout) and the events that can occur. you need to get this client to make your application suscribe to the events. private var healthservicesclient: healthservicesclient private var passivemonitoringclient: passivemonitoringclient init { healthservicesclient = healthservices.getclient(context) passivemonitoringclient = healthservicesclient.passivemonitoringclient } ask for permissions in the first step, you need to modify the androidmanifest.xml file. add the <uses-permission> element in the global section: <uses-permission android:name="android.permission.activity_recognition" /> <uses-permission android:name="android.permission.receive_boot_completed" /> <uses-permission android:name="android.permission.foreground_service" /> add the <queries> element: <queries> <package android:name="com.google.android.wearable.healthservices" /> </queries> it is a good practice to ask for the required permissions whenever the application tries to use this data type. first, you should check whether the user has consented to use the particular functionality. permissiongranted = applicationcontext.checkselfpermission( manifest.permission.activity_recognition) == packagemanager.permission_granted if not, you must ask for it before using the api. private fun requestpermissions() { permissionlauncher.launch(android.manifest.permission.activity_recognition) } to ask about permissions, you need to create a request permissions object. permissionlauncher = registerforactivityresult(activityresultcontracts.requestpermission()) { result -> permissiongranted = result } this is an example of a permission request window: using health services api to get events to asynchronously receive information about a fall detection event, provide the class which inherits from the passivelistenerservice class and override the onhealtheventreceived method. class passivehealtheventservice : passivelistenerservice() { override fun onhealtheventreceived(event: healthevent) { runblocking { log.i(tag, "onhealtheventreceived received with type: ${event.type}") healthservicesmanager.getinstance(applicationcontext).recordhealthevent(event) super.onhealtheventreceived(event) } } } add information about this class with the permissions to the androidmanifest.xml file. <service android:name=".passivehealtheventservice" android:exported="true" android:permission="com.google.android.wearable.healthservices.permission.passive_data_binding" /> when you have the passivemonitoringclient and passivehealtheventservice classes, you can then subscribe to the events. private val healtheventtypes = setof(healthevent.type.fall_detected) suspend fun registerforhealtheventsdata() { log.i(tag, "registering listener") val passivelistenerconfig = passivelistenerconfig.builder() .sethealtheventtypes(healtheventtypes) .build() passivemonitoringclient.setpassivelistenerserviceasync( passivehealtheventservice::class.java, passivelistenerconfig ).await() registered = true } if you no longer want to receive information about the fall detection event, please unregister your application from the service. this can be done using the passivemonitoringclient api. suspend fun unregisterhealtheventsdata() { log.i(tag, "unregistering listeners") passivemonitoringclient.clearpassivelistenerserviceasync().await() registered = false } the healthevent class contains information about the event, such as: type - returns the type of the event (fall_detected, unknown). instant - returns the time of the health event. datapointcontainer - returns the metrics associated with the event. test application on the galaxy watch you can test this functionality in the following two ways: manual test you can simulate a fall by trying to fall on a mat. note : before performing the manual test, ensure that you have taken all safety precautions for yourself. for example, use cushions to soften the fall impact, etc. synthetic data provider use the command line to run and execute commands with the synthetic data provider. for more details about this feature, see synthetic data provider. with adb, you can send subsequent commands to the device. to start the synthetic data provider, run the following command: $ adb shell am broadcast \ -a "whs.use_synthetic_providers" \ com.google.android.wearable.healthservices to simulate a fall, run the following command: $ adb shell am broadcast \ -a "whs.synthetic.user.fall_over" \ com.google.android.wearable.healthservices when the tests are finished, to switch back to using real sensors, run the following command: $ adb shell am broadcast \ -a "whs.use_sensor_providers" \ com.google.android.wearable.healthservices resources this blog is based on the eventsmonitor application. the whole presented code comes from this application. the entire application can be downloaded from: eventsmonitor version 1.0 (86,0kb) dec 12, 2022 enjoy your adventure creating the ultimate health application now you are ready to start the fall detection event in your application. we encourage you to try doing it by yourself and explore other features provided by the health services sdk.

      Samsung Developers

      https://developer.samsung.com/health/blog/en-us/2022/12/14/events-monitoring
      1. tutorials | health, galaxy watch

      blog

      Tracking Exercises with Galaxy Watch

      galaxy watch offers a convenient way of measuring exercise progress. modern sensors designed specifically for health services provide the most precise readings. after connecting to health services, you can measure certain exercises and track their values. this blog describes all the important steps to build an exercise tracking app using the health services api. we use example code introduced in health code lab for tracking exercise. you can download the source code from this code lab. health services defines a variety of exercise types. for a full exercise type list, take a look at exercisetype. on galaxy watch4 and galaxy watch4 classic, a repetition counter is available for the following exercises: back_extension barbell_shoulder_press bench_press bench_sit_up burpee crunch deadlift forward_twist dumbbell_curl_right_arm dumbbell_front_raise dumbbell_lateral_raise dumbbell_triceps_extension_left_arm dumbbell_triceps_extension_right_arm dumbbell_triceps_extension_two_arm dumbbell_curl_left_arm jump_rope jumping_jack lat_pull_down lunge squat upper_twist in this application, we are going to use deadlift. the example code used for deadlift can be easily adapted to track all repetition-based exercises. the basics of connecting to health services are covered in the blog using health services on galaxy watch. setting up an exercise once connected to the health services api, we are ready to set up the exercise. in this case we use deadlift as a sample exercise. first, we need to get the exercise client: exerciseclient exerciseclient = client.getexerciseclient(); after that, we need to set the exercise type in the configuration builder: exercisetype exercisetype = exercisetype.deadlift exerciseconfigbuilder exerciseconfigbuilder = exerciseconfig.builder() .setexercisetype(exercisetype); to see what can be tracked for our exercise, we need to check its capabilities. we do this by using a listenablefuture object and listening for a callback from health services. listenablefuture<exercisecapabilities> capabilitieslistenablefuture = exerciseclient.getcapabilities(); when we receive a callback, we can receive a set with capabilities: futurecallback<exercisecapabilities>() { @override public void onsuccess(@nullable exercisecapabilities result) { try { exercisetypecapabilities exercisetypecapabilities = result.getexercisetypecapabilities(exercisetype); set<datatype> exercisecapabilitiesset = exercisetypecapabilities.getexercisecapabilities(result); } if you do not want to track some of these values, at this point, you can remove them from a set. by default, all datatypes that a certain exercise can measure are being stored as a set. by removing them before setting up a configuration builder, you can exclude tracking unnecessary values. once we are ready, we can finish configuring an exercise: exerciseconfigbuilder = exerciseconfig.builder() .setexercisetype(exercisetype) .setdatatypes(exercisecapabilitiesset); setting up exercise listener an exercise listener is an object that allows us to get exercise updates from health services, whenever they are available. to set up the listener, we need to override three methods: exerciseupdatelistener exerciseupdatelistener = new exerciseupdatelistener() { @override public void onexerciseupdate(exerciseupdate update) { //processing your update } @override public void onavailabilitychanged(datatype datatype, availability availability) { //processing availability } @override public void onlapsummary(exerciselapsummary summary) { //processing lap summary } }; starting and stopping the exercise we are ready to start tracking our exercise. to do that, we use the listenablefuture object that gets callbacks from the healthservices api whenever an update is available. to build this object, we send our configuration to the exercise client while starting measurement: listenablefuture<void> startexerciselistenablefuture = exerciseclient.startexercise(exerciseconfigbuilder.build()); when we get a callback from the healthservices api, we start our listener: listenablefuture<void> updatelistenablefuture = exerciseclient.setupdatelistener(exerciseupdatelistener); we finish exercise in a similar way, by creating a listenablefuture object that asks the health services api to stop tracking exercise: listenablefuture<void> endexerciselistenablefuture = exerciseclient.endexercise() processing exercise update data exercise update data contains various information about the performed exercise. after setting up a listener, we retrieve it in a callback: public void onexerciseupdate(@nonnull exerciseupdate update) { try { updaterepcount(update); } catch (deadliftexception exception) { log.e(tag, "error getting exercise update: ", exception); } } in this example, we focus on one of most important readings—latest metrics. we store them in a map: map<datatype, list<datapoint>> map = update.getlatestmetrics(); now we can read particular values by looking for their key: list<datapoint> reppoints = map.get(datatype.rep_count); list<datapoint> caloriespoints = map.get(datatype.total_calories); the last value on the list is the latest reading in the current update. we can use it in our application, for example, when updating a label: string repvalue = string.format("%d", iterables.getlast(reppoints).getvalue().aslong()); txtreps.settext(string.format("reps count: %s", repvalue)); this is how exercise data can be accessed and processed using health services on galaxy watch. it’s a quick and convenient way to track its progress that everybody can implement into a watch application.

      https://developer.samsung.com/health/blog/en-us/2022/02/16/tracking-exercises-with-galaxy-watch
      1. tutorials | mobile

      blog

      Seamless UI Experience of Your App for Samsung Galaxy Z Fold2

      maintaining the legacy of foldable technology, samsung recently released the new galaxy z fold2. this device is designed to provide a new and seamless experience to users with its infinity flex display. as a developer, you can adjust your app to provide the best ui experience to your users. in this blog, we will demonstrate how a stopwatch app can be modified to adjust with galaxy z fold2 devices. the stopwatch app is pretty simple, having three functionalities—start, pause and reset the time. figure 1: stopwatch app example in order to provide a seamless experience to the user, we have to ensure app continuity, adjust the activity according to the ui, support multi-resume in multi-window, and check the display cutout. so let’s get started. app continuity like the previous galaxy z fold, the new galaxy z fold2 has two separate physical screens. the cover display is 2260 x 816 pixels and the main display is 2208 x 1768 pixels. to provide a seamless experience to the user while folding and unfolding the device, the app must maintain its continuity by preventing data loss. you can ensure continuity by using the onsaveinstancestate() method. first, save the data of the current state with onsaveinstancestate(). for the stopwatch app, the time that has passed is saved in seconds before the activity is paused. @override public void onsaveinstancestate(bundle savedinstancestate) { savedinstancestate.putint("seconds", seconds); savedinstancestate.putboolean("running", running); savedinstancestate.putboolean("wasrunning", wasrunning); } then restore the data of the activity using the oncreate() function. @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); if (savedinstancestate != null) { seconds = savedinstancestate.getint("seconds"); running = savedinstancestate.getboolean("running"); wasrunning = savedinstancestate.getboolean("wasrunning"); } } figure 2: continuity of the stopwatch while folding and unfolding the device ensure dynamic resizing of your app if you want your app to support multi-window mode, define the activity as resizable. this can be done by setting the resizableactivity attribute to true in manifest.xml. this ensures the maximum compatibility with both the cover screen and the main screen of the device. <activity android:name=".mainactivity" android:resizeableactivity="true"> … </activity> another approach is to define an aspect ratio for your app. galaxy z fold2’s cover screen has a ratio of 25 : 9 whereas the main screen has a ratio of 22.5 : 18. to be compatible with the device, you should test your apps for these ratios and that they fill up the entire display. you can use the minaspectratio or the maxaspectratio flag to constrain your app within the feasible aspect ratios. please note that, if the resizableactivity attribute is set to true, the minaspectratio and the maxaspectratio flag are ignored. figure 3: dynamically resizable app in pop-up view and split-window view multi-resume for multi-window up to android 9, only one of the activities visible in the multi-window operation is allowed to stay in the resumed state. all other activities are put into the paused state. therefore, you have to force your app to be in the resumed state by adding the following in the manifest.xml file. <meta-data android:name="android.allow_multiple_resumed_activities" android:value="true" /> however, starting from android 10, all activities visible in multi-window are allowed to stay in the resumed state. you no longer need to force your app to have multi-resume behavior. however, there are some cases where an app can be in the paused state in android 10, in which case you need to enforce the multi-resume behavior: • in a minimized split-screen (with launcher on the side), the top activity isn't resumed because it's not focusable • in picture-in-picture mode, the activity isn't resumed because it's not focusable • when activities are covered by other transparent activities in the same stack figure 4: multi-resume in multi-window display cutout the main display of the galaxy z fold2 has a punch hole in the upper right side. you can set a display cutout mode according to your content style. by default, the content is rendered into the cutout area while in portrait mode and letterboxed while in landscape mode. if you want your content to be rendered into the cutout area in both portrait and landscape modes, you can define the mode as shortedges. in the sample app, the cutout mode is set to shortedges in the style.xml file. the sample app is set to full screen and display cutout mode is set to shortedges. <item name="android:windowlayoutindisplaycutoutmode">shortedges</item> <item name="android:windowtranslucentnavigation">true</item> figure 5: display cutout default mode figure 6: display cutout in shortedges mode hopefully this blog helps you to update your app for the galaxy z fold2 and give the user a better ui experience. to check out the sample app, click here. you can also view samsung’s official documentation for galaxy z devices. if you have any questions regarding foldable ui, feel free to post it in the samsung developers forums.

      Ummey Habiba Bristy

      https://developer.samsung.com/sdp/blog/en-us/2020/12/03/seamless-ui-experience-of-your-app-for-samsung-galaxy-z-fold2
      1. tutorials

      blog

      Connecting Smart TV and Visual Studio

      this blog describes how to deploy and run your application on samsung smart tv. prerequisites connect your tv to visual studio on the same network. enable developer mode on the tv on the tv, open smart hub. select apps. in apps, enter 12345 using the remote control or the on-screen number keypad. the developer mode configuration popup appears. switch developer mode to on. enter the ip address of the computer that you want to connect to the tv, and click ok. reboot the tv. when you open the apps panel after the reboot, you see develop mode at the top of the screen. connect tv to visual studio in the visual studio, select tools > tizen > tizen device manager. for mac users, launch device manager. to add a tv, click remote device manager and +. in the add device popup, define the information for the tv you want to connect to, such as the name, ip address, and port number, and click add. normally, you just need to put in the ip address. in the device manager or remote device manager window, select the tv from the list, and switch connection to on. when the tv is successfully connected, you can see it on the visual studio toolbar. now you can launch applications on the tv directly from the visual studio. note: if the tv target device uses tizen 4.0, the debug run is not supported. make sure you run application using start without debugging (ctrl+f5). it's easy to use visual studio with your smart tv. try it today!

      Jay Cho

      https://developer.samsung.com/tizen/blog/en-us/2019/07/16/connecting-smart-tv-and-visual-studio
      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. tutorials

      blog

      Add a Tizen Project to Xamarin.Forms Applications

      this blog provides helpful information for new tizen .net application developers to get started. in many cases, you'll want to add a tizen project to existing xamarin.forms cross-platform applications or implement tizen renderers for xamarin.forms third-party libraries, which already include other platforms. in these cases, you can simply add a tizen project to the existing solution. add a tizen project to visual studio the following example shows a cross-platform app named simpletext, which shows a line of text in the center. the text varies depending on the platform: on an android emulator, the text appears as “welcome to xamarin.forms.android!” on an ios simulator, the text appears as “welcome to xamarin.forms.ios!” now, let's add a tizen project to run on the tizen platform in visual studio: go to file > add > new project. select the tizen cross-platform template tizen xaml app (xamarin.forms) give your project the name simpletext.tizen. on the tizen project wizard: select common as the profile. other available profiles are mobile, tv, and wearable. choose select project in solution. select simpletext as the reference. add code loadapplication(new simpletext.app()) to the simpletext.tizen/simpletext.tizen.cs file. the following video shows a quick runthrough of the process: run on the tizen platform now you are ready to build and run the application on tizen platform. here is the text for tizen on label.text on the main page of the application: <?xml version="1.0" encoding="utf-8" ?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d" x:class="simpletext.mainpage"> <stacklayout> <!-- place new controls here --> <label text="{onplatform android='welcome to xamarin.forms.android!', ios='welcome to xamarin.forms.ios!', tizen='welcome to xamarin.forms.tizen!'}}" horizontaloptions="center" verticaloptions="centerandexpand" /> </stacklayout> </contentpage> and you can check out how it looks on the wearable target emulator: it's pretty easy to add a tizen project to your existing solution. try it today!

      Jay Cho

      https://developer.samsung.com/tizen/blog/en-us/2019/10/02/add-a-tizen-project-to-xamarinforms-applications
      1. tutorials

      blog

      What's New for Tizen on Xamarin.Forms 4.1.0

      this blog introduces the many new ui features that were added on xamarin.forms 4.0, including shell, collectionview and material visual. tizen support for these features was added on xamarin.forms 4.1.0, which has been released on nuget. shell the xamarin.forms shell feature reduces the complexity of building mobile apps by providing fundamental app architecture features. for more details on shell, see shell navigation documentation shell provides three types of common mobile navigation: flyout bottom tabs top tabs collectionview collectionview is used to present lists of data using different layout specifications. it provides a more flexible and performant alternative to listview. for more details on collectionview, see collectionview documentation material visual material design is an opinionated design system created by google, which prescribes the size, color, spacing, and other aspects of how views and layouts should look and behave. xamarin.forms provides the way to apply material design across the platforms to controls in xamarin.forms apps. this is achieved with material renderers that apply the material design rules. for more details on collectionview, see material visual documentation because xamarin.forms 4.1.0 includes material renderers for tizen, you can implement a material look and feel in your tizen .net app without any custom renderers. supported controls in tizen are: activityindicator button frame entry progressbar slider checkbox stay up to date with the latest tizen .net developments at the samsung developers tizen.

      Sunghyun Min

      https://developer.samsung.com/tizen/blog/en-us/2019/07/15/whats-new-for-tizen-on-xamarinforms-410
      No Search Results
      No Search results. Try using another keyword.
      • <<
      • <
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • >
      • >>
      Samsung Developers
      Samsung Developers
      Quick Link
      • Android USB Driver
      • Code Lab
      • Galaxy Emulator Skin
      • Foldables and Large Screens
      • One UI Beta
      • Remote Test Lab
      • Developer Support
      Family Site
      • Bixby
      • Knox
      • Samsung Pay
      • SmartThings
      • Tizen
      • Samsung Research
      • SamsungOpen 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.