Report
-
Similar Topics
-
By Samsung Newsroom
The Galaxy Store Developer API provides programmatic access to key functions of Seller Portal, such as managing your apps and in-app items or checking app performance. It is made up of a set of server-to-server APIs that access different areas of Seller Portal:
Content Publish API: app information IAP Publish API: in-app purchase items GSS API: Galaxy Store Statistics system Before you can start using these APIs, you must meet all the requirements for access and authentication. Read on to find out more about these requirements.
Basic requirements
The following are the basic requirements are required to use all of these APIs.
Seller Portal account. A Samsung account is required to register for a Seller Portal account. You can sign up for a Samsung account when you register for a Seller Portal account.
Commercial seller status, to manage paid apps or in-app purchase items. If you want to manage paid apps or paid in-app items, your Seller Portal account must have commercial seller status.
Apps registered in Seller Portal. The Galaxy Store Developer API does not support new app registration. You must first register your apps in Seller Portal before you can manage them using the API.
Access token. The access token is used for authentication. A summary of the steps needed to create an access token are included in this blog.
Create an access token
An access token is sent in the authorization header of every API call. It defines the scope (which APIs you can call) and can only be used from a valid service account.
Complete the following steps to create an access token:
Create a service account. Log in to Seller Portal and go to Assistance > API Service. When you create a service account, you generate a private key (used to create your JSON web token) and service account ID (used in the authorization header of the Content Publish and IAP Publish APIs). Create a JSON Web Token. Create a JSON Web Token (JWT) by providing a header and registered claims to a site that generates the token or programmatically using a JavaScript JWT library. Request an access token. Request an access token from the Galaxy Store authentication server. Click on the linked step to see more detailed information about how to complete each step.
Use the Content Publish API
The Content Publish API is used to view, modify, submit, and change the status of apps registered in Galaxy Store Seller Portal. When you have met the basic requirements and have your service account ID and access token, use the following headers:
curl -X <content-publish-api-request> \ -H "content-type: application/json" \ -H "Authorization: Bearer <your-access-token>" \ -H "service-account-id: <your-service-account-id>" See Content Publish API for more information about available requests.
Use the IAP Publish API
The IAP Publish API is used to view, register, modify, and remove Samsung In-App Purchase (IAP) items. In addition to meeting the basic requirements, the following is also required:
The IAP Publish API must be connected with the content in the In App Purchase tab area of Seller Portal. To create this connection, you must either initially distribute your content using the Content Publish API or the content must be in the For Sale state in Seller Portal. If this connection does not exist, matching product information cannot be retrieved. You must integrate IAP Helper into your app. All binaries registered in your content must support IAP. When you have met all the requirements, use the following:
curl -X <iap-publish-api-request> \ -H "content-type: application/json" \ -H "Authorization: Bearer <your-access-token>" \ -H "service-account-id: <your-service-account-id>" See IAP Publish API for more information about available requests and request parameters.
Use the GSS API
The GSS (Galaxy Store Statistics) Metric API is used to get statistics about apps registered in Galaxy Store. In addition to meeting the basic requirements, the following is also required:
Four cookie values required for authentication (see Get cookie values for more information) sellerID, obtained by using the GSS User API The statistics to view and other attribute values used to filter the response data (see GSS Metric API for more information) When you have met all the requirements, use the following:
curl -X POST <gss-api-request> \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <your-access-token>" \ -H "Cookie:<gss-api-cookie-values>" \ -d '{"<gss-api-attributes-and-values>"}' See GSS User API and GSS Metric API for more information about available requests.
Next steps
After you have met all the requirements, you are ready to start using the Galaxy Store Developer API. See Galaxy Store Developer API for a list of all requests available. Each request also includes examples showing usage and expected results.
View the full blog at its source
-
By Samsung Newsroom
Remote Test Lab is a service that enables developers to control mobile and watch devices remotely. With the Remote Test Lab service, you can test your application on a real device by interacting with the device over the network in real time.
The Remote Test Lab service is an easy and effective way to comprehensively test your application’s compatibility with the latest Samsung mobile devices, while reducing your spending on test hardware.
Remote Test Lab highlights
Application installation
You can install and test Android and Tizen applications on the appropriate devices.
Screen capture and recording
You can capture or record the screen during testing, whenever you need it.
Audio streaming
You can listen to the audio played through the testing device.
Repeat testing
You can record a sequence of actions and replay the sequence multiple times.
Remote Debug Bridge
You can access the remote device through development tools, such as Android Studio, as if the device were connected to your computer.
Test applications on a remote real device
In your Web browser, go to Distribute > Remote Test Lab on the Samsung Developer site.
Before using Remote Test Lab, make sure you have the system requirements:
Samsung Account Standard Web browser with JavaScript support Java Runtime Environment (JRE) 7 or later, including Java Web Start Internet environment with port 2600 outbound open You can select the operating system, remote device, and testing time you want on the Remote Test Lab page. When you select Start, a JNLP file is downloaded to your computer, and when you run the file, the Remote Test Lab client is launched and the live image of the device screen appears on the client.
You can use the Remote Test Lab device as if it were the real device. For example, you can even zoom in and out on Google Maps using multi-touch.
A variety of testing tools are available in the client context menu:
Screen menu: Screen Quality Control, Orientation, Scale, Capture and Record, Screen Share Manage menu: Application Manager, Clipboard Synchronization, Language, File Manager, Wi-Fi Reset, Device Reboot Test menu: Install Application, Auto-Repeat, Log Viewer, Remote Debug Bridge Experimental menu: Audio Streaming For more information on the tools in the context menu, see the User Manual.
You can install your application on the remote device by dragging and dropping the application package from your computer into the Remote Test Lab client. Through the client, you can watch how the application behaves on the device, including in views such as Flex Mode on Galaxy Fold devices.
For more details about the Remote Test Lab service and its policies, see the Remote Test Lab Support.
View the full blog at its source
-
By Samsung Newsroom
Watch faces are a special type of application that runs on the home screen of a Tizen wearable watch. Different watch faces have different purposes and can be interacted with in diverse ways. A watch face creates the first impression of the watch and holds value as a fashion accessory.
Anyone can make a watch face using Galaxy Watch Designer (GWD).[1] However, GWD limits how many different features you can add in a watch face. On watch faces, data is displayed to the user in the form of “complications,” which show individual data points such as steps or heart rate. While GWD gives you a set of complications you can add to designs, it does not allow you to add custom complications, as the numbers of complications are fixed inside the GWD tool. With Tizen Studio, you can create complications that pull in data from your own custom sources or perform custom actions, such as launching a separate application or opening a settings menu. With Tizen Studio, you have more options than the ones GWD gives you.
Using Tizen Web/Native/.NET APIs, developers can add a large number of functionalities on watch faces programmatically. In this article, we’ll start by developing a basic watch face using Tizen Web API.
Prerequisites
You need to define your app as a watch face application through an application category in the config.xml file. To achieve that, add wearable_clock under category.
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/WatchFace" version="1.0.0" viewmodes="maximized"> <tizen:application id="msWLHN3Mpw.WatchFace" package="msWLHN3Mpw" required_version="2.3.1"/> <tizen:category name="http://tizen.org/category/wearable_clock"/> <content src="index.html"/> <feature name="http://tizen.org/feature/screen.shape.circle"/> <feature name="http://tizen.org/feature/screen.size.all"/> <icon src="icon.png"/> <name>WatchFace</name> <tizen:profile name="wearable"/> </widget> Resources
For an analog watch, we need three hands for second, minute, and hour. We also need a background image with a marked time index.
The following table shows resolutions for images in our example:
Image Width (pixels) Height (pixels) Background 360 360 Hour hand 15 360 Minute hand 16 360 Second hand 16 360
Implementation
We need to create a <div> element for each component, such as background, hour hand, minute hand, and second hand. <div id="container"> <div id="background"> <div id="components-main"> <div id="hand-main-hour"></div> <div id="hand-main-minute"></div> <div id="hand-main-second"></div> </div> </div> </div> We are using an image as the watch face background, so we need to set the background image by setting styles in the CSS file. Background Image: The clock time index is set on top of the background image. It could be a separate <div> element, but we assembled the clock index with the green background into one image (see Figure 1).
Figure 1: Watch face background image
CSS
#background { width: 100%; height: 100%; background-image: url("../image/watch_bg.png"); } We also need to set styles for watch face hands separately. The app image folder holds three images, one each for the hour hand, minute hand, and second hand. Then we’ll add some info to the CSS to adjust the position, size, and so on.
The style set for the minute hand is shown below: #hand-main-minute { position: absolute; left: 172px; top: 0px; width: 16px; height: 360px; background-image: url("../image/watch_hand_minute.png"); background-position: center top; background-size: contain; } We need to define a function that will rotate hands by a specific angle with its element ID. function rotateElement(elementID, angle) { var element = document.querySelector("#" + elementID); element.style.transform = "rotate(" + angle + "deg)"; } We also need to have the hand update every second. To do that, we’ll set an interval to call the updateTime() function every second. // Update the watch hands every second setInterval(function() { updateTime(); }, 1000); We are using the getCurrentDateTime() function of Tizen Time API[2] to get the current time object. From this time object, we can get the hour, minute, and second. var datetime = tizen.time.getCurrentDateTime(), hour = datetime.getHours(), minute = datetime.getMinutes(), second = datetime.getSeconds(); Now we are going to call our defined function rotateElement() for the hour, minute, and second hands. // Rotate the hour/minute/second hands rotateElement("hand-main-hour", (hour + (minute / 60) + (second / 3600)) * 30); rotateElement("hand-main-minute", (minute + second / 60) * 6); rotateElement("hand-main-second", second * 6); We need to set an event listener for visibilitychange to update the screen when the display turns on from the off state. // Add an event listener to update the screen immediately when the device wakes up document.addEventListener("visibilitychange", function() { if (!document.hidden) { updateTime(); } }); We also need to set an event and update the screen when the device’s time zone changes.
// Add eventListener to update the screen when the time zone is changed tizen.time.setTimezoneChangeListener(function() { updateTime(); }); Additionally, we can set an event listener for ambient mode change. In this article, we added the listener and printed a console message when the ambient mode changed. It will not change anything on the watch during ambient mode, because we haven’t updated the sample watch face for ambient mode. window.addEventListener("ambientmodechanged", function(e) { if (e.detail.ambientMode === true) { // Rendering ambient mode case console.log("Ambient mode"); } else { // Rendering normal case console.log("Normal mode"); } }); Demo
A sample watch face app can be downloaded here, and the final watch face is shown in Figure 2.
Figure 2: Demo watch face developed using Tizen Web
Conclusion
This article demonstrates how to start developing watch face apps with Tizen web API using Tizen Studio. We can now add more functionalities and change the watch into more than just a device that shows time.
References
https://developer.samsung.com/galaxy-watch/design/watch-face/complications https://developer.tizen.org/development/guides/web-application/device-settings-and-systems/time-and-date-management View the full blog at its source
-
By Samsung Newsroom
Thanks to everyone who came to Samsung Developer Conference last week or tuned in to the livestream! Here were some of our favorite moments that weren’t covered in the Day 1 and Day 2 recaps.
Code Lab
Code Lab sat in the center of Tech Square and allowed devs to get hands-on experience with the latest SDKs and developer tools. Samsung engineers were there for support and fun coding challenges gave attendees the chance to win exclusive prizes.
PENUP
The PENUP app is a social network for designers on the Galaxy smartphone. You can learn how to draw digitally by tracing on top of a video clip or background image – it’s a cool way to turn photos into masterpieces! The PENUP team secured two digital artists for SDC19. The artists roamed around and used a Tab S6 and S Pen to sketch attendees and capture the action at SDC19. There were also great tutorials on the S Pen and S Pen SDK in Tech Square!
Laugh and Learn
Senior Developer Evangelist Tony Morelan and comedian Corey Rosen had a high-energy comedy and improv presentation on Day 1 called Galaxy Watch Face Design from Concept to Completion. Attendees and designers collaborated in real time to create an interactive Galaxy watch face. It was a fun experiment that demonstrated how easy it is to design without coding. The audience was able to quickly create a playful watch face.
Fit @ SDC
One theme of SDC19 was collaboration. Samsung is forging new partnerships with brands to help devs have more tools at their disposal and reach a wider audience. Two such partners are Under Armour and Skimble, and each morning they put together a wellness activity that featured their new Galaxy Store apps.
Day 1: Yoga-Centric Exercise Class with Skimble
This class was led by a trainer from Made for Samsung partner Skimble. Yoga mats and Samsung Galaxy Watch Active2s were available for attendees, and they could download the Workout Trainer by Skimble app to follow along with a Samsung-specific workout. Everyone was able to monitor their heart rate on the watch while getting their move on!
Day 2: Fun Run/Walk with Under Armour
Under Armour organized a two-mile walk or three-mile run for attendees before the conference. Samsung Galaxy Watch Active2s were given to participants and synced with the Map My Run app to track their distance, pace, and calorie burn.
Devs, we hope that SDC19 inspired you to continue innovating. From troubleshooting to new platform training, the Samsung Developer Program is always here to help. If you aren’t a member, consider joining our community today.
Check out our post-event site with more highlights, photos, and videos of SDC19. We hope to see you next year!
View the full blog at its source
-