Quantcast
Jump to content

Add Timely Texts to Your Galaxy Watch Designs using Custom Complications


STF News
 Share

Recommended Posts

A complication in Galaxy Watch Designer (GWD) is an object that can be created by a combination of different types of components. A creative complication makes a watch face unique and attractive. Previously, there was no direct way to reuse a custom complication. Now, with the custom complication feature, you can design, save, and reuse your own complications, reducing the time it takes to re-create similar objects.

Create a new custom complication

You can add any type of component to create a custom complication, and you can change the property of a component while creating a custom complication. Here, I demonstrate a simple example.

This complication consists of four components: morning background image, night background image, text with a tag expression to configure opacity, and another text with a tag expression to configure placement. The final complication shows the morning background image and ”Good Morning” text between 6:00:00 and 09:59:59 , and the night background image and ”Good Night” text between 19:00:00 and 23:59:59.

  1. Add Morning Background: Select the desired background image from left component bar. Click on Background > Import Image, navigate to the directory that contains the image you want to use, and select the image to import.

    2020-01-19-01-01.png

  2. To make this background appear only in the morning, in the Properties window (the background image must be selected), click the gray triangle in the lower left corner of the Opacity field and write the tag expression below. This tag expression states that if the hour is greater than or equal to 6:00 am and less than or equal to 9:59:59 am, the opacity value is 100%. Otherwise, the opacity value is 0%.
    ([H]>=6)*([H]<=9)?100:0

    2020-01-19-01-02.png

  3. Add “Good Morning” Text: Add a text component and write “Good Morning!” To make this text appear only in the morning, repeat step 2. Modify the font color and adjust the text placement.

    2020-01-19-01-03.png

  4. Add Night Background: As in step 1, select the desired background image from the left component bar.

    2020-01-19-01-04.png

  5. To make this background appear only in the evening, we will take a different approach by having it positioned within the viewable area during the evening. To do so, in the Properties window (the background image must be selected), click the gray triangle in the lower left corner of the X axis field within the Placement section, and write the tag expression shown below. This tag expression states that if the hour is less than or equal to 18:59:59, 380 pixels are added to the X-axis placement location, which places it outside of the viewable area. Otherwise, the placement location will be at 0 pixels.
    Tip: Be careful about layering of the components. Text must be in the upper layer, rather than the background image.
    ([H]<=18)?380:0

    2020-01-19-01-05.png

  6. Add “Good Night” Text: Add a text component and write “Good Night!” To make this text appear only in the evening, repeat step 5, and adjust text placement.

    2020-01-19-01-06.png

  7. Select all components, right-click, and select Save As Complication.

    2020-01-19-01-07.png

  8. Create a unique name for this complication. If you use an existing name, then that complication will be replaced with this new one.

    2020-01-19-01-08.png

  9. Once saved, the complication’s name appears in the Complications > Custom menu in the component bar. Tag expressions and other properties of the components that you configured in the previous steps provide the default configuration in this saved custom complication.

    2020-01-19-01-09.png

Customize an existing complication

GWD has various types of complications that you can customize and save as new complications. For example, follow these steps to customize the Digital Battery complication.

  1. Go to the Complications folder, which contains the images you want to change. The path for the Digital Battery complication is:
    Windows: C:\Program Files\Galaxy Watch Designer\res\Complications\circle\Battery\Digital\res\__COMPLICATION__x
    Mac: Application > Right click on Galaxy Watch Designer > Select Show package contents > Contents > Resources >res > Complications > Circle > Battery >Digital >res > __COMPLICATION__x
  2. Copy the _ COMPLICATION__x folder, and paste it into a directory other than the Galaxy Watch Designer directory.
  3. Make replacement images for this copied folder using any kind of photo editing tool.
  4. Launch Galaxy Watch Designer, and create a new project.
  5. Select your desired complication. Here, Battery > Digital is selected.

    2020-01-19-01-10.png

  6. From the Layer table, swap each image of the complication with the new image. Right-click on the image name, select Swap Image, navigate to the directory that contains the image you want to use, and select the image.
    Tip: If you change the original images in the GWD directory, then you won’t have to swap the images. But when you update or reinstall GWD, the modified images are overwritten with the original images. It is safest to add replacement images in another directory and save the changes as a custom complication. Custom complications are not affected after updating or re-installing GWD.

    2020-01-19-01-11.png

  7. Make additional changes, if you want.
  8. Select all components of this complication, right-click, and select Save As Complication.

    2020-01-19-01-12.png

  9. Create a unique name for this complication. If you use an existing name, then that complication will be replaced with this new one.
  10. Now you can find this complication in Complications > Custom.

    2020-01-19-01-13.png

You can use this customized complication whenever you want.

Tip: You can group all the components of the complication before saving it as a custom complication, which makes it easier to move. Ungroup the complication before using it.

Notes

Be mindful of GWD limitations, including those listed below:

  • There are limitations on using weather components with health components and tag expressions. If you add two custom complications that contain items that are not supported when used in the same design, then neither complication works correctly on the real device. The design may work in the Run window, but on the real device, it won’t.
  • If you add a weather component, some of the provided complications become disabled, as they contain incompatible components. GWD does not provide a warning message if you add custom complications with incompatible components. You are allowed to add any custom complication. If the design doesn’t work properly on real device, check if you have added any custom complications with incompatible components.
  • A custom complication can be designed with any kind of component and saves a component’s configured properties, such as Gyro settings, along with Tag expressions.
  • Button action and AOD mode are not saved as part of a custom complication.
  • If you design a complication in AOD mode, it is not saved as part of a custom complication. You can only save Active mode complications. If you want to create an AOD custom complication, cut and paste it from AOD mode to Active mode and save it. When you want to use it, add it from the custom menu, then cut it from Active mode, and paste it in AOD mode.

With custom complications, save and reuse your custom complications to give you more time to create attractive and innovative watch faces.

View the full blog at its source

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Similar Topics

    • By STF News
      View the full blog at its source
    • By STF News
      Are your apps ready for the recently unveiled Galaxy Z Fold3? For your app to work seamlessly on foldable devices, it will need to correctly handle App Continuity and Flex Mode.
      With Remote Test Lab, you can test your apps on a real Galaxy Z Fold3. To begin, create an account or login on Samsung Developers, and then visit this link to access the Galaxy Z Fold3.
      Other recent devices, such as the Galaxy Tab S7+, Galaxy S21 Ultra, and Galaxy Note20 Ultra are also available on Remote Test Lab.
      View the full blog at its source
    • By STF News
      Galaxy Unpacked brought exciting new product announcements for Galaxy Watch4, Galaxy Z Fold3, and Galaxy Z Flip3. In this post, we'll go into more detail on how you can create delightful experiences for these devices in your own apps and watch faces.
      Galaxy Watch4 / One UI Watch
      The new Galaxy Watch4 announcement shines the spotlight on the new collaborative wearable platform from Samsung and Google. This change from Tizen to Wear OS opens doors for developers and designers to create exciting new designs.

      As with earlier generations of Galaxy Watch models, designers can create beautiful work without coding. For Galaxy Watch4, we've introduced Watch Face Studio. Designers who built for Tizen-based devices using Galaxy Watch Studio will recognize how this new tool works.
      For creators with existing designs built with Galaxy Watch Studio, there is also a tool to convert from the Tizen .tpk format to the Wear OS .aab format. This tool is called Galaxy Watch Studio Converter. As there are differences between Tizen and Wear OS, some functions are not supported in the conversion process.
      For support on these tools, please visit the Samsung Developer Forums for Watch Face Studio and Watch Face Studio Converter.
      Developers who are interested in creating applications for the new wearable platform can find more information at the Android Developers site.
      Galaxy Z Series
      Galaxy Unpacked brought news of two exciting evolutions of Samsung phones with the Galaxy Z Fold3 and the Galaxy Z Flip3. For mobile developers, these devices provide opportunities to bring a first-class experience to users of their apps by utilizing unique features of the Z Series hardware and software.

      Possibly the most notable addition to the Galaxy Z Fold3 is the S Pen, which had previously been available to owners of Galaxy Note and Galaxy Tab devices. Developers can integrate the S Pen Remote and Air Actions into their apps. Code Labs with samples are available to get you started.
      To check if S Pen is available on a device, this block of code can be used.
      SpenRemote spenRemote = SpenRemote.getInstance(); if (!spenRemote.isConnected()) { spenRemote.connect(getContext(), new SpenRemote.ConnectionResultCallback() { @Override public void onSuccess(SpenUnitManager manager) { } @Override public void onFailure(int error) { } }); } Another feature of the Galaxy Z Fold3 that developers can access is the inner display, activated when the device is opened. Developers who want to provide a premium experience for these devices should ensure their apps provide continuity across the displays while interrupting their users as little as possible. Samsung provides a Code Lab and sample code to ensure that your apps provide the best experience possible.
      The Galaxy Z Fold3 and Galaxy Z Flip3 also provide a unique featured called Flex Mode. Flex Mode is activated when a user opens the Z Fold3 or Z Flip3 screen half-way. In this configuration, apps are notified to alter their appearance to give the best experience. As with other new features, a Code Lab with samples is available on this site.
      Follow Up
      Even though Galaxy Unpacked could not be experienced live, it brought new and exciting product announcements that improve our lives. We hope you enjoyed Galaxy Unpacked and use this information to make incredible experiences for your users.
      This site has many resources for developers looking to build for and integrate with Samsung devices and services. Stay in touch with the latest news by creating a free account or by subscribing to our monthly newsletter. Visit the Marketing Resources page for information on promoting and distributing your apps. Finally, our developer forum is an excellent way to stay up-to-date on all things related to the Galaxy ecosystem.
      View the full blog at its source
    • By Alex
      Samsung was one of the first major smartphone makers to jump on the smartwatch ship, and, unsurprisingly, its first smartwatch didn’t use Google’s nascent Android Wear back then. It struck off on its own with a customized version of Android running inside the Samsung Galaxy Gear. It has come full circle and has returned to Android again, this time with Wear OS running on the upcoming Galaxy Watch 4 series. Surprisingly, there might still be some owners of the Galaxy Gear around, and Samsung is now urging them to switch to its Tizen OS if they want access to some smartwatch apps.
      The Galaxy Gear launched way back in 2013 and was the only one of its kind, so it’s rather surprising to hear that Samsung still has the smartwatch and its users in mind eight years after. Even more surprising is that Samsung was actually still running a version of its app store specifically for that Android-based OS after all this time. Samsung is shutting that down next month, however, but it hasn’t abandoned owners of the smartwatch just yet (another surprise).
      Samsung actually gave Galaxy Gear owners a way forward back in 2014 when it was clear that it wasn’t going to stick to its own Android smartwatch OS. Back then, it offered an update to its new Tizen-based wearable platform, the very same OS that would take Samsung’s smartwatches to relative success for a couple of years. Apparently, not everyone took the opportunity back then, but Samsung is now pretty much forcing their hand.
      An update to the Samsung Galaxy Store notifies owners of the smartwatch that it will be shutting down the Galaxy Store for Galaxy Gear devices on August 5, 2021. While the smartwatch will continue to function, users won’t be able to install or reinstall apps after that date. They can upgrade to Tizen moving forward if they want access to apps, but it’s a one-way street and there’s no turning back. Moreover, not all Galaxy Gear apps will be available on Tizen, but there might be similar ones by now.
      It is rather impressive that Samsung has apparently managed to support a relatively obscure 2013 smartwatch for this long. Unfortunately, the same story can’t be said for more recent Tizen-based smartwatches that may be blocked from upgrading to the new Samsung-branded Wear OS. Whether that’s because of hardware requirements or some arbitrary policy from Google remains a mystery.
      Source: https://www.slashgear.com/galaxy-gear-owners-must-upgrade-to-tizen-or-lose-galaxy-store-access-05681014/
    • By STF News
      Unity Distribution Portal (UDP) lets you distribute your games to multiple app stores through a single hub. UDP repacks your Android build with each store’s dedicated In-App Purchase SDK to make your game compatible with the separate app stores (Android alternative app stores). In this tutorial, you will learn the procedure for publishing a game on Galaxy Store using the UDP console. All you need to do is implement in-app purchases (IAP) using UDP. UDP then automatically repacks your game into store-specific builds. Follow the tutorial to integrate UDP into your game and publish it on Galaxy Store.
      Before you start
      We recommend that you implement UDP in your game towards the end of the development cycle. It is easier to implement UDP at this stage as you have already decided what your game’s IAP items are. Make sure you have completed your game before diving into the UDP implementation. We have developed a sample coin collecting game (see Figure 1) in Unity and we’ll show you how we implemented UDP into this game.

      Figure 1: Preview of the sample game developed in Unity.

      Note that there are three types of Samsung IAP items: consumable (single use, re-purchasable), non-consumable (unlimited use, not re-purchasable), and subscription (unlimited use while active). Since UDP does not support subscriptions, there is no guidance for implementing subscription items in this post.
      Now that you know when to implement UDP and which Samsung IAP items are supported, we’re ready to begin with the development procedure.
      Create a game in the UDP console
      After signing in to UDP, please follow the steps below:
      Go to My Games -> ADD GAME, enter the game title, and click on CREATE. After that, you are automatically moved to the Game Info tab. In the Game Description tab, provide some basic information (metadata, description, visual assets, and ratings). Click on SAVE. You are not required to complete all sections at this time. Integrate UDP in Unity and link it to the UDP console
      There are two ways to integrate UDP in Unity: using the UDP package or Unity IAP. We used the UDP package for this blog. To do this, follow the steps below:
      In the Unity editor, go to Window -> Package Manager, select All packages -> Unity Distribution Portal -> Install. To enable UDP in your project, access Window -> Unity Distribution Portal -> Settings. Create a new Unity project ID (if required, or else use an existing one) in the Services Window. To do this, click on Go to the Services Window, select your organization, and then click Create. Obtain the client ID from the UDP console: go to the Game Info tab of the UDP console, scroll down to Integration Information, and copy your Client ID using the COPY button. Now, go back to Window -> Unity Distribution Portal -> Settings, paste the client ID into the relevant field, and finally click on Link Project to this UDP game. Now you have successfully linked your Unity project to the game created on the UDP console. If you’re having problems, go here to try some troubleshooting methods before jumping into the next section.
      Register IAP items in UDP
      There are two IAP products in our sample game: “Super Jump” (consumable) and “Upgraded Player” (non-consumable). We need to add these products in the UDP console so they can be purchased inside the game. We can register the items directly either on the UDP console or in the Unity editor.
      Follow the steps below for the UDP console:
      Go to the Game Info tab of the UDP console, scroll down to In-App Purchases, and select Add Item. Do not forget to click on EDIT INFO, if required. Provide a valid product ID, product name, price (USD), and description. Select if the item is consumable or non-consumable, then click SAVE. You can add as many products as you have in your game. For our sample game, we have added a consumable and a non-consumable item with the product IDs “superjump1” and “upgradeplayer1” respectively. Please remember the IDs you choose as these are required while initiating purchases. You can manage the prices in different currencies for each product individually by clicking on Manage amounts and currencies. You can also automatically convert your base price (USD) to different currencies for all your products at once by clicking Convert. Select SAVE in the top right corner to save your changes. In Unity, go to Window -> Unity Distribution Portal -> Settings, and click on Pull to retrieve your saved IAP items from the UDP server. Now, you can see all the items are added to the IAP Catalog. You can also add IAP items in Unity directly in the IAP Catalog by clicking on Add New IAP Product, and then selecting Push to save your products to the UDP server (see Figure 2). In addition, there are many manipulation processes for adding IAP items (for example, bulk import and CSV template). Click here to learn more.

      Figure 2: IAP Catalog under UDP Settings in Unity.

      Initialize the UDP SDK in Unity
      To access the UDP SDK, we need to declare the UDP namespace inside the game manager script. Please note that “player.cs” is the manager script in our sample project and is attached to the main player game object in the editor as a component. Hence, from now on we continue editing the codes into this script to enable all the UDP functionalities. Follow the steps below:
      Add the following line at the beginning to access the UDP libraries.
      using UnityEngine.UDP; Make the manager code (player.cs) inherit from the IInitListener interface.
      public class player : MonoBehaviour, IInitListener In the Start() function of the manager (player.cs) class, call the Initialize() method.
      StoreService.Initialize(this); The IInitListener then returns a success or failure message to inform your game if the initialization was successful. Implement the following methods in the same class to obtain this message: if it is successfully initialized, the OnInitialized() method is invoked with the user information; if it was not initialized, the OnInitializeFailed() is called with an error message.
      public void OnInitialized(UserInfo userInfo){ Debug.Log("Initialization succeeded"); // You can call the QueryInventory method here to check whether there are purchases that haven’t been consumed. } public void OnInitializeFailed(string message){ Debug.Log("Initialization failed: " + message); } If you’d like more guidance, check out Initialize the UDP SDK in the Unity documentation for more detailed information. Otherwise, continue to the next section.
      Query the purchased IAP items
      After the initialization is successful, we need to retrieve the previously purchased non-consumable and unconsumed products when the user launches the game. Call the QueryInventory() method of the UDP SDK to get the product information (product name, ID, description) for non-consumable purchases and consumable purchases that have not yet been consumed. Follow the steps below:
      It is necessary for the manager script (player.cs) to inherit the IPurchaseListener interface along with the IInitListener to implement the QueryInventory() method.
      public class player : MonoBehaviour, IInitListener, IPurchaseListener After that, we need to override all the required methods for the IPurchaseListener interface in our class. Although we show only the OnQueryInventory() and OnQueryInventoryFailed() methods here, we gradually complete the others in subsequent sections.
      public void OnQueryInventory(Inventory inventory){ //Query inventory succeeded Debug.Log("Query inventory succeeded"); IList<ProductInfo> productList = inventory.GetProductList(); if(productList != null){ for(int i=0; i<productList.Count;i++){ if(productList[i].ProductId=="upgradeplayer1"){ playerMaterial = Resources.Load<Material>("UDPMaterial"); MeshRenderer meshRenderer = GetComponent<MeshRenderer>(); meshRenderer.material = playerMaterial; } } } } public void OnQueryInventoryFailed(string message){ Debug.Log("Query Inventory failed"); } As you can see, a few actions have been taken inside the method depending on the product ID. Similarly, you can build some logic here (for example, check for unconsumed products and purchased products that have not been delivered) based on your game design.
      Finally, call the QueryInventory() method on a successful initialization inside the OnInitialized() method that was implemented in the previous section.
      public void OnInitialized(UserInfo userInfo){ Debug.Log("Initialization succeeded"); // You can call the QueryInventory method here to check if there are purchases that haven’t been consumed. StoreService.QueryInventory(this); } For further information about query inventory in UDP, go here.
      Purchase IAP products
      In our sample game, there are two UI buttons (see Figure 1), the “Buy Super Jump” and the “Upgrade Player.” These buttons allow users to purchase consumable and non-consumable items respectively inside the game. Please follow the steps below to accomplish these button actions:
      Declare two button variables in the beginning of the player class (player.cs).
      public Button buySuperJumpButton; public Button upgradePlayerButton; Add two listener methods, OnBuySuperJumpButton and OnUpgradePlayerButton, at the end of the Start() method of the player class (player.cs).
      buySuperJumpButton.onClick.AddListener(OnBuySuperJumpButton); upgradePlayerButton.onClick.AddListener(OnUpgradePlayerButton); Implement two listener methods in the same class for the button listeners in the previous section. These enable the “Buy Super Jump” and “Upgrade Player” buttons to initiate purchasing the respective IAP items through invoking the Purchase() method of the UDP SDK. Please note, we have used the item IDs we registered in the “Register IAP items in UDP” section.
      void OnBuySuperJumpButton(){ //initiate purchasing a super jump item StoreService.Purchase("superjump1", "", this); } void OnUpgradePlayerButton(){ //initiate purchasing an upgraded player item StoreService.Purchase("upgradeplayer1", "", this); } The overriding method OnPurchase() is triggered if the purchase is successful. In other cases, the OnPurchaseFailed() method is invoked with an error message. If the item is consumable, consume the product here. Otherwise, deliver the product.
      public void OnPurchase(PurchaseInfo purchaseInfo){ // The purchase has succeeded. // If the purchased product is consumable, you should consume it here. // Otherwise, deliver the product. if (purchaseInfo.ProductId == "upgradeplayer1"){ playerMaterial = Resources.Load<Material>("UDPMaterial"); MeshRenderer meshRenderer = GetComponent<MeshRenderer>(); meshRenderer.material = playerMaterial; } else if(purchaseInfo.ProductId == "superjump1"){ StoreService.ConsumePurchase(purchaseInfo, this); } } public void OnPurchaseFailed(string message, PurchaseInfo purchaseInfo){ Debug.Log("Purchase Failed: " + message); } Save the script and go back to the Unity editor to add references for the UI buttons to the variables of the “player.cs” script that we declared in step 1.
      We have completed purchasing IAP items inside our game. However, notice that in step 4, we only delivered the non-consumable item and invoked the ConsumePurchase() method for the consumable item.
      Consume IAP products
      We need to implement the overriding OnPurchaseConsume() and the OnPurchaseConsumeFailed() methods in the IPurchaseListener interface to consume and deliver the consumable IAP items. See the implementation below:
      public void OnPurchaseConsume(PurchaseInfo purchaseInfo){ // The consumption succeeded. // You should deliver the product here. if (purchaseInfo.ProductId == "superjump1"){ superJump++; } } public void OnPurchaseConsumeFailed(string message, PurchaseInfo purchaseInfo){ // The consumption failed. } We have delivered the “Super Jump” item by increasing the counting value. You can implement your game logic here according to your game design. Look here to find out more about consuming IAP products.
      Validate in-app purchases
      UDP performs client-side validation automatically. When a user purchases an IAP product, Galaxy Store returns the payload and signature. The UDP SDK then validates the signature. If validation fails, the purchase fails accordingly. You can also validate purchases on the server-side. See validating purchases on the server side to implement this functionality.
      Build and test your game
      Before building your game, add a UDP sandbox tester to verify that your IAP implementation is working. Go to Window -> Unity Distribution Portal -> Settings -> UDP Sandbox Test Accounts -> Add new test account, provide a tester’s email and password, and finally, don’t forget to click Push to save the update to the UDP server.
      Now build an APK by going to File -> Build Settings -> Android -> Build and providing all the necessary basic information in Player Settings (File -> Build Settings -> Player Settings). For more information on building for Android, see Building apps for Android. After successfully building the APK, deploy it to the tester’s Galaxy device and assess the IAP functionality. Next, check the test status in the UDP console by going to the Game Info tab and then scrolling down to Sandbox Testing.
      Publish your game on the UDP console
      Once you have finished building and testing your game, upload the binary to the UDP console (Game Info -> Binary). Finalize all the game information (Game Description, Ads, Premium Price, App Signature) and then release the game by clicking RELEASE before publishing.
      Go to the Publish tab on the UDP console, sign in to Galaxy Store with your commercial account, and then publish your game after UDP has successfully repacked it. You can later check the submission status in the Status tab of the UDP console. See details about publishing games on the UDP console here.
      Conclusion
      This tutorial demonstrates the entire process of publishing a game on Galaxy Store through the UDP console. It also uses the UDP package instead of Samsung IAP for integrating IAP into the game for Galaxy Store. UDP then repacks the game with the Samsung IAP automatically before it is submitted to Galaxy Store. Therefore, we hope this tutorial encourages you to develop games in Unity and publish on Galaxy Store easily through UDP Console.
      Additional resources on the Samsung Developers site
      This site has many resources for developers looking to build for and integrate with Samsung devices and services. Stay in touch with the latest news by creating a free account or by subscribing to our monthly newsletter. Visit the Marketing Resources page for information on promoting and distributing your apps. Finally, our developer forum is an excellent way to stay up-to-date on all things related to the Galaxy ecosystem.
      View the full blog at its source
×
×
  • Create New...