<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Feyza Ürkut on Medium]]></title>
        <description><![CDATA[Stories by Feyza Ürkut on Medium]]></description>
        <link>https://medium.com/@feyzaurkut?source=rss-e23c102a508a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b5vOSzZzMbcJaDn90sjkyA.jpeg</url>
            <title>Stories by Feyza Ürkut on Medium</title>
            <link>https://medium.com/@feyzaurkut?source=rss-e23c102a508a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:45:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@feyzaurkut/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Use Interactive Map on Wearable App]]></title>
            <link>https://medium.com/huawei-developers/how-to-use-interactive-map-on-wearable-app-4442eb40bd32?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4442eb40bd32</guid>
            <category><![CDATA[huawei-harmonyos-next]]></category>
            <category><![CDATA[wearables]]></category>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[harmonyos-next]]></category>
            <category><![CDATA[huawei-map-kit]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Thu, 31 Jul 2025 23:28:28 GMT</pubDate>
            <atom:updated>2025-07-31T23:28:28.197Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P3vXR3qyTOsHjpSR" /><figcaption>Photo by <a href="https://unsplash.com/@iml?utm_source=medium&amp;utm_medium=referral">Ilse</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>In this article, we’ll explore how to build <strong>interactive map experiences</strong> in HarmonyOS wearable apps using <strong>Map Kit</strong> — a powerful and flexible SDK designed to provide personalized map capabilities. From showing nearby stores to launching detailed product pages, interactive maps can transform how users engage with your wearable app.</p><p>Whether you’re creating a <strong>store locator</strong>, a <strong>fitness route tracker</strong>, or a <strong>navigation tool</strong>, Map Kit allows developers to deliver rich, location-based features directly on smartwatches. Let’s dive in! 😎</p><h3>What Is Map Kit?</h3><p><strong>Map Kit</strong> provides robust and convenient mapping capabilities tailored for HarmonyOS. It empowers developers to effortlessly build customized, interactive maps by offering features such as:</p><ul><li>Personalized map displays</li><li>Interactive gestures (zoom, rotate, move, tilt)</li><li>Real-time location services</li><li>POI-based search and route planning</li><li>Marker and overlay drawing</li><li>Map picking and static image export</li><li>Coordinate conversion tools</li></ul><p>⚡You can review the official documentation of <a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides/map-introduction">Map Kit</a> for more detailed information.</p><h3>Real-World Scenarios for Interactive Maps</h3><ul><li><strong>Fitness and Outdoor Apps</strong><br> Display routes, track movement, or show current location.</li><li><strong>Delivery or Task-Based Apps</strong><br> Guide users to checkpoints or task destinations on foot or by bike.</li><li><strong>Retail &amp; Store Locator Apps</strong><br> Show all branch locations on a map and let users explore the one nearest to them.</li><li><strong>Tourism or Travel Guides</strong><br> Allow users to find points of interest and start directions from the map.</li><li><strong>Emergency/Utility Apps</strong><br> Indicate the nearest service station, hospital, or assistance point.</li></ul><h3>Case Study: Brand Store Locator on Smartwatch</h3><p>In our actual implementation, we developed a wearable app using <strong>Map Kit</strong> to showcase the locations of a brand’s physical stores:</p><p>🎯 <strong>Custom markers</strong> were placed on each store location with the brand’s name.</p><p>🎯 Each marker was <strong>clickable</strong>, allowing the user to open a store details page.</p><p>🎯 From there, users could <strong>browse the store’s products online</strong> directly on the watch.</p><p>🎯 A simple and smooth interaction design ensured the experience was comfortable on a small screen.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f85cc1135d2a0b33ba82d4d7a341d02/href">https://medium.com/media/7f85cc1135d2a0b33ba82d4d7a341d02/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPbUeD42hOiewPFPPbHUzw.png" /><figcaption>Output of the interactive map</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*egG51IkkQmZNbGM0" /><figcaption>Photo by <a href="https://unsplash.com/@jupp?utm_source=medium&amp;utm_medium=referral">Jonathan Kemper</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Conclusion</h3><p><strong>Map Kit</strong> brings powerful, flexible, and interactive maps to HarmonyOS wearable devices. Combined with gesture support, POI data, route planning, and WantAgent navigation, you can build apps that are not only smart but deeply engaging — all from the user’s wrist.</p><blockquote>🚀 Our store locator app demonstrated just one use case but Map Kit opens endless possibilities for fitness, retail, travel, delivery, and more.</blockquote><p>Keep your map experiences simple, responsive, and user-centric to make the most of HarmonyOS wearables ⚡</p><h3>References</h3><p><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides/map-presenting">Document</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4442eb40bd32" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-use-interactive-map-on-wearable-app-4442eb40bd32">How to Use Interactive Map on Wearable App</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smart Notifications for HarmonyOS Wearables]]></title>
            <link>https://medium.com/huawei-developers/smart-notifications-for-harmonyos-wearables-bb5456fd1da7?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb5456fd1da7</guid>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[wearables]]></category>
            <category><![CDATA[notifications]]></category>
            <category><![CDATA[reminder]]></category>
            <category><![CDATA[harmonyos-next]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Thu, 10 Jul 2025 08:12:32 GMT</pubDate>
            <atom:updated>2025-07-31T05:03:43.229Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nIsCY_2TaUcmAnT6" /><figcaption>Photo by <a href="https://unsplash.com/@lunarts?utm_source=medium&amp;utm_medium=referral">Volodymyr Hryshchenko</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>In this article, we’ll show how to build interactive notifications for <strong>HarmonyOS wearable apps</strong> using <strong>Notification Kit</strong> and <strong>WantAgent</strong>. These tools let you send alerts and guide users back into your app with a single tap.</p><p>We’ll cover how to publish text notifications and add actions — perfect for apps like fitness trackers or daily word reminders on smart watches. Let’s start 😊</p><h4>What is Notification Kit?</h4><p>Notification Kit lets you send <strong>local notifications</strong> from your app while it’s running in the <strong>foreground</strong>. These alerts can appear as ringtones, vibrations, banners, lock screen messages, or on the Always On Display.</p><p>When the app is in the <strong>background</strong>, use <strong>Push Kit</strong> instead for cloud-based notifications.</p><p>Typical use cases include showing upload/download progress, sending payment alerts, or updating step counts.</p><h4>🧩Supported Capabilities</h4><ul><li>Publish single-line or multi-line text notifications, or a progress bar.</li><li>Increment or clear the app-icon badge.</li><li>Cancel one or all active notifications.</li><li>Query the list of currently published notifications.</li><li>Check whether the user has granted notification permission (request if disabled).</li></ul><h4>Real-World Scenarios for Notification Kit</h4><ul><li><strong>File Transfer Updates</strong><br> Show upload/download progress in real time.</li><li><strong>Payment Notifications</strong><br> Inform users instantly when a transaction is completed.</li><li><strong>Fitness Tracking</strong><br> Alert users when they reach step goals or complete workouts.</li><li><strong>Customer Support Replies</strong><br> Notify users of new messages from support agents.</li><li><strong>Event Reminders</strong><br> Remind users of upcoming meetings or tasks.</li><li><strong>E-commerce Promotions</strong><br> Highlight flash sales or limited-time deals.</li><li><strong>Smart Home Alerts</strong><br> Notify when appliances finish tasks (e.g., laundry done).</li><li><strong>Daily Word Reminders (Wearable App)</strong><br> Remind users to check out new vocabulary words each day and launch the app directly via WantAgent.</li></ul><h4>Requesting Notification Authorization</h4><p>✔️Before your app can send notifications, you must get the user’s permission. Call requestEnableNotification() once to prompt the user with an authorization dialog.</p><p>Use isNotificationEnabled() to check if notifications are already allowed. If permission is not granted, you cannot publish notifications until the user enables them.</p><p>Always ensure you request authorization <strong>before</strong> publishing notifications to provide a smooth user experience.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74017aba317ca975a96494daa03e5894/href">https://medium.com/media/74017aba317ca975a96494daa03e5894/href</a></iframe><ul><li>If the error code <strong>1600004</strong> is returned, the authorization is rejected.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0786d6b021bb470cabc60696ce6e458e/href">https://medium.com/media/0786d6b021bb470cabc60696ce6e458e/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*xTwDKwjbSKY5metQiEr6Wg.png" /><figcaption>Output of notification request</figcaption></figure><p>Let’s examine two types of notification publishing methods!</p><h4>Publishing a Text Notification</h4><p>Use NOTIFICATION_CONTENT_BASIC_TEXT for short alerts or NOTIFICATION_CONTENT_MULTILINE for longer messages (e.g., chat previews or system logs). After building a NotificationRequest, call publish().</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/47579ed74773c0c009ff98c79cfbd624/href">https://medium.com/media/47579ed74773c0c009ff98c79cfbd624/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd5fb28751893ef045ebf218b0672de3/href">https://medium.com/media/dd5fb28751893ef045ebf218b0672de3/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*GZCx552YjZ7V40wj5gTWnA.png" /><figcaption>Output of simple notification</figcaption></figure><h4>Adding a WantAgent Object to a Notification</h4><p>A WantAgent turns a passive alert into an interactive entry point. When the user taps the notification (or an action button), the agent can launch a specific Ability.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c6cd92b4df74b60d91e73dcb6dd1a077/href">https://medium.com/media/c6cd92b4df74b60d91e73dcb6dd1a077/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/95d026a9a96fe51b3d8b7a606276aadd/href">https://medium.com/media/95d026a9a96fe51b3d8b7a606276aadd/href</a></iframe><ul><li>The application opens as soon as the notification is clicked ✔️</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*zaS4aCkwoBWtVoSckGX2VQ.png" /><figcaption>Output of notification with agent</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oh8JGcpxm-DjExGE" /><figcaption>Photo by <a href="https://unsplash.com/@craft_ear?utm_source=medium&amp;utm_medium=referral">Jan Tinneberg</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Conclusion</h3><p>Using HarmonyOS Notification Kit together with WantAgent allows developers to create notifications that do more than just inform — they engage users by providing quick access to relevant app features. With simple APIs, you can publish clear text alerts and attach interactive actions that guide users directly to the right screen or functionality.</p><p>Implementing effective notifications enhances user experience, increases app engagement, and makes your wearable app more responsive and user-friendly. Mastering these tools ensures your app stays connected with users in meaningful ways while keeping your code efficient and maintainable ✨</p><h3>References</h3><ul><li><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides/notification-overview">Document</a></li><li><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides/notification-with-wantagent">Document</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb5456fd1da7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/smart-notifications-for-harmonyos-wearables-bb5456fd1da7">Smart Notifications for HarmonyOS Wearables</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create Interactive UIs with Animation and Transition Effects in ArkUI]]></title>
            <link>https://medium.com/huawei-developers/how-to-create-interactive-uis-with-animation-and-transition-effects-in-arkui-e0e5e0da3233?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0e5e0da3233</guid>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[harmonyos-next]]></category>
            <category><![CDATA[ark-ui]]></category>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[harmony]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Fri, 30 May 2025 07:07:08 GMT</pubDate>
            <atom:updated>2025-08-01T06:39:37.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0JauNpWv18GqK6nK" /><figcaption>Photo by <a href="https://unsplash.com/@sebastiansvenson?utm_source=medium&amp;utm_medium=referral">Sebastian Svenson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>In this article, we’ll explore how to use animations in ArkUI through simple yet effective examples. Animations are not just a way to make user interfaces more beautiful — they also bring life and interactivity to apps in the most enjoyable way. HarmonyOS NEXT’s ArkUI framework offers developers a rich and flexible set of animation capabilities to achieve just that.<br>Whether you want to smoothly move a component or make screen transitions feel more fluid, ArkUI’s animation APIs make it easy to implement these kinds of polished details. Let’s start 😊</p><blockquote><strong>With the aid of animations, you can:</strong></blockquote><blockquote>- Create smooth transitions between states.</blockquote><blockquote>- Provide visual feedback to give users a sense of control.</blockquote><blockquote>- Inform users of the system status, for example, the loading progress, to make them less stressed while waiting.</blockquote><blockquote>- Show users how to interact with the UI.</blockquote><h4>Performance Tips &amp; Best Practices</h4><ul><li>🎯 <strong>Keep animations short and meaningful.</strong> Long animations can make users feel like they’re waiting.</li><li>🚀 <strong>Maintain a high FPS (frames per second).</strong> Aim for 60FPS whenever possible. Avoid overly complex animations that can cause lag.</li><li>🧠 <strong>Avoid unnecessary animations.</strong> Not every user interaction needs an animation — use them where they enhance the experience.</li><li>🧹 <strong>Prefer modals over UIAbility redirection.</strong> Instead of navigating between tasks (UIAbilities), use modal transitions to keep everything smooth and in one task.</li><li>🔄 <strong>Trigger animations through </strong><strong>@State changes.</strong> This ensures that the UI updates reactively and animations run seamlessly.</li></ul><h4>Types of Animations in ArkUI</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/0*Bvk1W0k6zTxIuLbz.png" /><figcaption>Animation in ArkUI</figcaption></figure><p><strong>1. Attribute Animation</strong><br> This is the most basic type of animation. It changes component attributes (like position or size) frame by frame based on animation duration and curve settings.</p><p><strong>2. Navigation and Transition Animations</strong><br> Used when components enter or leave the screen. To keep transitions consistent, some animations use built-in curves that cannot be customized.</p><p>To achieve smooth screen transitions, it’s recommended to use the <strong>Navigation component</strong> instead of the traditional page + router approach. Also, avoid switching between different UIAbilities, as this creates separate tasks and breaks the animation flow. Instead, use modal transitions within the same UIAbility for a more seamless experience.</p><p><strong>3. Component Animation</strong><br> Certain ArkUI components (like the List component) come with built-in animations. Many of these also support customization to better match the app’s design.</p><p><strong>5. Animation Curves</strong><br> Animation curves define how attribute values change over time. You can use standard curves like linear or more dynamic options like spring curves to create smooth and engaging motion effects.</p><p><strong>6. Animation Connection</strong><br> For a more natural user experience, animations should connect smoothly — either from one animation to another or from gestures to animations (e.g., swiping triggering a smooth transition).</p><p><strong>7. Advanced Effects</strong><br> You can enhance your animations with advanced visual effects such as blur, shadow, and color gradients, making your UI feel more polished and modern.</p><p>❤️ Let’s do a sample by using the <strong>shared element transition</strong> in <strong>ArkUI</strong></p><p>Shared element transition is a type of transition achieved by animating the size and position between styles of the same or similar elements during page switching.</p><h4>Use geometryTransition()</h4><p>Drawing on system capabilities, bind the same ID for components before and after the transition and encapsulating the transition logic within an <strong>animateTo</strong> block. This allows the system to automatically apply a continuous transition effect.</p><p>🔗 <strong>Bind with an ID</strong><br> Use geometryTransition(&quot;picture&quot;) to mark the component.</p><ul><li>Assign the <strong>same </strong><strong>id</strong> (e.g., &#39;item1&#39;, &#39;item2&#39;) to the components before and after the transition, so the system links them correctly.</li></ul><p>📐 <strong>Animate Position &amp; Size</strong><br> Properties like <strong>position</strong>, <strong>width</strong>, and <strong>height</strong> are smoothly animated between states, making layout changes feel more natural.</p><p>🎯 <strong>Corner Radius Sync</strong><br> Only the <strong>container</strong> with geometryTransition gets its borderRadius animated.</p><ul><li>Child components inside it won&#39;t reflect this rounded corner transition.</li></ul><p>👻 <strong>Prevent Ghosting</strong><br> By reusing the node with the <strong>same </strong><strong>id</strong>, you avoid flickers or duplicate images (ghosting) during transition.</p><p>🕹️ <strong>Trigger with </strong><strong>animateTo()</strong><br> Wrap your state change in animateTo() inside an onClick() event.</p><ul><li>Use curves curves.springMotion() to control the animation behavior and smoothness.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aff3414b3bc46afaa4872a1c5bd129c1/href">https://medium.com/media/aff3414b3bc46afaa4872a1c5bd129c1/href</a></iframe><h4>✨Final Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*G1IgTbRlIa6h895jkhH6kg.gif" /><figcaption>Output</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*R5Gif7zC81qdDgRx" /><figcaption>Photo by <a href="https://unsplash.com/@yoav?utm_source=medium&amp;utm_medium=referral">Yoav Hornung</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Conclusion</h3><p>Animations created with ArkUI not only enhance the visual appeal of your application but also contribute to a more intuitive and engaging user experience. With its simple syntax and powerful animation APIs, ArkUI makes it easy to bring your UI to life.<br> By learning to use these animation tools effectively, you can build applications that feel more dynamic, fluid, and modern — all while keeping your codebase clean and maintainable 😊</p><h3>References</h3><ul><li><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides/arkts-animation">Document</a></li><li><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides/arkts-shared-element-transition">Document</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0e5e0da3233" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/how-to-create-interactive-uis-with-animation-and-transition-effects-in-arkui-e0e5e0da3233">How to Create Interactive UIs with Animation and Transition Effects in ArkUI</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HarmonyOS’u Keşfet: ArkTS ve ArkUI ile ToDo App Geliştirme]]></title>
            <link>https://medium.com/huawei-developers-tr/harmonyosu-ke%C5%9Ffet-arkts-ve-arkui-ile-todo-app-geli%C5%9Ftirme-0a367c992871?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a367c992871</guid>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 06:16:18 GMT</pubDate>
            <atom:updated>2024-11-13T06:16:18.702Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*raJYb4Z6eLSljBS5" /><figcaption>Photo by <a href="https://unsplash.com/@fabianmardi?utm_source=medium&amp;utm_medium=referral">Fabian Mardi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Giriş</h3><p>HarmonyOS, Huawei tarafından geliştirilen ve cihazlar arası bağlantı ile ön plana çıkan yeni bir işletim sistemi olarak karşımıza çıkıyor. Bu makalede, HarmonyOS ile ilk geliştirme deneyimimi, bir ToDo uygulaması üzerinden anlatacağım.</p><p>HarmonyOS ile yeni bir platformda çalışma sürecine gelin yakından bakalım! 💥</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FcKL8JnaSDj6V2%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaudit-kikis-delivery-service-cKL8JnaSDj6V2&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExYmNld3l2N2ZoZXhscG44bDQzZTk5cWFoZnF0eDRhem8wenE1ZWR2MiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FcKL8JnaSDj6V2%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0e3e1b080c322caf2f6d880627df872/href">https://medium.com/media/a0e3e1b080c322caf2f6d880627df872/href</a></iframe><p>HarmonyOS ile geliştirme yapmaya başlarken, öncelikle DevEco Studio’yu kurup gerekli SDK ve emülatörleri yükledim. Geliştirme ortamını hazırladıktan sonra, basit bir ToDo uygulaması yapmaya karar verdim.</p><p>Bu uygulama, temel olarak kullanıcıların yapılacak işler listesini oluşturmasına, güncellemesine ve tamamladıklarında işaretlemesine olanak tanıyor.</p><p><strong>🚀<em> Geliştirme Ortamı:</em></strong></p><ul><li><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/ide-tools-overview-V5">DevEco Studio’ya Giriş</a></li><li>DevEco Studio’nun sürümü:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*PBXLHiQedgUy18EBxqQMgg.png" /><figcaption>Version of DevEco Studio</figcaption></figure><ul><li>HarmonyOS SDK’nın sürümü:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*OIPsM-qo2d51YJsI9yY0Bw.png" /><figcaption>Version of HarmonyOS SDK</figcaption></figure><h3>ArkUI Temel Dekoratörleri 🎨</h3><p>🔺 <strong><em>@Entry</em></strong><br>@Entry ile tanımlanmış özel bir bileşen, sayfanın varsayılan giriş bileşeni olarak kullanılır. Bir sayfada yalnızca bir bileşen @Entry ile tanımlanabilir.</p><p>🔺 <strong><em>@Component</em></strong><br>ArkUI’de bileşenler, UI’da görüntülenen yapılardır. Özel bileşenlerin aşağıdaki özellikleri bulunur:</p><ul><li><strong>Birleştirilebilir</strong>: Yerleşik bileşenleri ve diğer bileşenleri, ayrıca bunların özelliklerini ve yöntemlerini birleştirmenize olanak tanır.</li><li><strong>Tekrar Kullanılabilir</strong>: Diğer bileşenler tarafından kullanılabilir ve farklı üst bileşenlerde veya konteynerlerde farklı örnekler olarak tekrar edilebilir.</li><li><strong>Veri Tabanlı Güncelleme</strong>: Bazı durum bilgilerini tutar ve durum değişkenleri değiştiğinde, UI’ı yeniden oluşturmak için tetikleme yapar.</li></ul><p>🔺 <strong><em>@State</em></strong><br>State değişkeni, durum özelliğini tutan ve sahibini oluşturan özel bileşenle bağlantılı bir değişkendir. Değiştiğinde, UI buna göre yeniden render edilir.</p><p>🔺 <strong><em>@Builder</em></strong><br>@Builder dekoratörü, hafif bir UI öğesi yeniden kullanım mekanizmasıdır. Bu özel bileşen, sabit bir iç UI yapısına sahiptir ve yalnızca kullanıcıya veri aktarır. Yeniden kullanılabilir UI öğelerini bir metoda soyutlayabilir ve bu metodu build metodunda çağırabilirsiniz.</p><p>Bu açıklamalar, ArkUI’nin temel dekoratörlerini daha iyi anlamanıza yardımcı olacaktır!</p><h3>Geliştirme Adımları</h3><p>❄️ Öncelikle, ArkTS dilinde HarmonyOS için bir giriş bileşeni olan struct Index’i tanımlıyoruz.</p><ul><li><strong>@Entry ve @Component</strong>: Index sınıfını uygulamanın giriş bileşeni olarak tanımlar.</li><li><strong>build()</strong>: Ekranda görüntülenecek yapıyı oluşturur.</li><li><strong>Column()</strong>: Bir sütun oluşturur ve içinde initView, textInputField, ve taskList işlevlerini dikey sırayla yerleştirir.</li><li><strong>width(‘100%’) ve height(‘100%’)</strong>: Bu sütunun ekranın tamamını kaplamasını sağlar.</li></ul><p>Kısacası, bu kod ile bir tam ekran sütun yapısı oluşturup ve bileşenlerin dikey dizilimde görünmesini sağlıyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b4414545ca3dd9f87f549607d7eaf19/href">https://medium.com/media/1b4414545ca3dd9f87f549607d7eaf19/href</a></iframe><p>❄️initView fonksiyonu ile, başlık, alt başlık ve kısa açıklamayı içeren sade ve ortalanmış bir görünüm oluşturuyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/686f513cdece3225c47de81e58610c5e/href">https://medium.com/media/686f513cdece3225c47de81e58610c5e/href</a></iframe><p>❄️textInputField fonksiyonu, kullanıcıların görev eklemesini veya güncellemesini sağlayan bir alan oluşturur. Bu işlemler için, önce bir TextInput alanı ekledik ve kullanıcının girdiğini this.textInput ile sakladık. Ardından, görev eklemek için bir &quot;Add&quot; butonu ve görev güncellemek için bir &quot;Update&quot; butonu ekledik; görünürlüklerini addVisibility ve updateVisibility ile kontrol ettik. Son olarak, bu bileşenleri düzenleyerek beyaz bir arka plan verdik ve yuvarlatılmış kenarlarla daha estetik hale getirdik.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71c1e5026ae775baf613f3c6ad865420/href">https://medium.com/media/71c1e5026ae775baf613f3c6ad865420/href</a></iframe><p>❄️Bu kod, bir görev listesini gösteren bir yapı oluşturur.</p><p>İlk olarak, taskList fonksiyonu ile bir liste yapısı kurduk. ForEach döngüsü içinde tasksList_ adlı görev listemizdeki her öğeyi sırayla alıp listItemComponent fonksiyonu aracılığıyla ekrana yerleştiriyoruz.</p><p>Her görev öğesi için listItemComponent fonksiyonu kullanılarak bir satır (Row) yapısı oluşturuyoruz. Bu satırda önce görev açıklaması bir metin olarak gösteriliyor. Ardından, bir onay kutusu (Checkbox), silme ve düzenleme ikonları yer alıyor. Silme ve düzenleme ikonlarına tıklanınca sırasıyla deleteItem ve editItem fonksiyonları çalışıyor.</p><p>Sonuç olarak, bu kod görevleri sıralı şekilde gösteren, her göreve onay kutusu, silme ve düzenleme seçenekleri ekleyen bir liste yapısı oluşturur.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bad23883385f295b7e2de10fa71b93cf/href">https://medium.com/media/bad23883385f295b7e2de10fa71b93cf/href</a></iframe><p>❄️Bu model sınıfı, görevlerin tanımlandığı yapıyı içerir ve her bir görev için gerekli özellikleri belirler (örneğin, görev açıklaması gibi). TaskModel, tasksList_ listesinde her bir görev öğesini temsil etmek ve görevle ilgili işlemleri gerçekleştirmek için kullanılır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db29baa514f2e705ae0beffdb65ddd96/href">https://medium.com/media/db29baa514f2e705ae0beffdb65ddd96/href</a></iframe><p>❄️Kodun başındaki import { TaskModel } from &#39;./TaskModel&#39;; ifadesi, TaskModel adlı bir veri modelini başka bir dosyadan projeye dahil eder.</p><p>Bu kod, görev ekleme, düzenleme ve silme işlevlerini gerçekleştiren bir yapı oluşturur.</p><ul><li>İlk olarak, tasksList_ adlı bir görev listesi ve kullanıcı girişi için textInput durumları tanımlıyoruz. updateVisibility ve addVisibility ile düzenleme veya ekleme modunu kontrol ediyoruz.</li><li><strong>addItem()</strong> fonksiyonuyla, textInput alanındaki metni tasksList_ içine yeni bir görev olarak ekliyoruz ve ardından textInput&#39;u temizliyoruz.</li><li><strong>deleteItem()</strong> fonksiyonuyla, belirtilen indekste bulunan görevi tasksList_ listesinden siliyoruz.</li><li><strong>editItem()</strong> ile, belirli bir görev üzerinde düzenleme yapılmasını sağlıyoruz. Seçilen görevin açıklamasını textInput alanına getiriyor ve düzenleme modunu görünür hale getirip ekleme modunu gizliyoruz.</li><li><strong>updateItem()</strong> ile, düzenlenen görevi listeye güncellenmiş olarak kaydediyor ve görünürlük ayarlarını eski haline döndürüp textInput&#39;u temizliyoruz.</li></ul><p>Sonuç olarak, bu kod ile görev ekleme, düzenleme ve silme işlevlerini destekleyen dinamik bir liste yapısı oluşturuyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b91448048fb39861dd079c10510ca335/href">https://medium.com/media/b91448048fb39861dd079c10510ca335/href</a></iframe><ul><li><em>İşte uygulamanın çıktısı ✨</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dn4Prd1Dwyk__Zc6I2n9w.jpeg" /><figcaption><em>Output of the App</em></figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FNFWeHrFDmp3iw%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaudit-kikis-delivery-service-NFWeHrFDmp3iw&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcXlzeHZ1Y3R4bjgwMWFtYTl4djg3enBlYXFxcWpoMmo1eDZmaGFzMyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FNFWeHrFDmp3iw%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b77e5cbc0f4632c9ed0a237bbb41113/href">https://medium.com/media/2b77e5cbc0f4632c9ed0a237bbb41113/href</a></iframe><h3>Sonuç</h3><p>HarmonyOS üzerinde ilk ToDo uygulamamı geliştirirken, hem sistemin yenilikçi özelliklerini hem de karşılaşılan zorlukları deneyimleme fırsatı buldum. HarmonyOS’un kullanıcı dostu arayüz geliştirme araçları ve çoklu cihaz desteği, projenin hızlı ve verimli bir şekilde ilerlemesini sağladı. Bu süreçte edindiğim tecrübeler, gelecekteki HarmonyOS projeleri için güçlü bir temel oluşturdu.</p><p>Bu ilk deneyim, bana sadece teknik beceriler değil, aynı zamanda yeni bir platformda geliştirme yapmanın dinamiklerini de öğretti. HarmonyOS ile yeni projelerde buluşmak üzere! 😊</p><h3>Referanslar</h3><p>HarmonyOS NEXT ArkTS:</p><p><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/arkts-api-V5">Document</a></p><p>HarmonyOS NEXT ArkUI:</p><p><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/arkui-api-V5">Document</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a367c992871" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/harmonyosu-ke%C5%9Ffet-arkts-ve-arkui-ile-todo-app-geli%C5%9Ftirme-0a367c992871">HarmonyOS’u Keşfet: ArkTS ve ArkUI ile ToDo App Geliştirme</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring HarmonyOS: A ToDo App Development with ArkTS, ArkUI]]></title>
            <link>https://medium.com/huawei-developers/exploring-harmonyos-a-todo-app-development-with-arkts-arkui-09cca21eea6b?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/09cca21eea6b</guid>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 06:14:18 GMT</pubDate>
            <atom:updated>2024-11-13T06:14:18.213Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*raJYb4Z6eLSljBS5" /><figcaption>Photo by <a href="https://unsplash.com/@fabianmardi?utm_source=medium&amp;utm_medium=referral">Fabian Mardi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>HarmonyOS is a new operating system developed by Huawei and stands out with its inter-device connectivity. In this article, I will describe my first development experience with HarmonyOS via a ToDo application.</p><p>Let&#39;s take a closer look at the process of working on a new platform with HarmonyOS! 💥</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FcKL8JnaSDj6V2%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaudit-kikis-delivery-service-cKL8JnaSDj6V2&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExYmNld3l2N2ZoZXhscG44bDQzZTk5cWFoZnF0eDRhem8wenE1ZWR2MiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FcKL8JnaSDj6V2%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0e3e1b080c322caf2f6d880627df872/href">https://medium.com/media/a0e3e1b080c322caf2f6d880627df872/href</a></iframe><p>When I started developing with HarmonyOS, I first installed DevEco Studio and installed the necessary SDKs and emulators. After preparing the development environment, I decided to make a simple ToDo app.</p><p>This app basically allows users to create to-do lists, update them, and mark them off when completed.</p><p><strong>🚀<em> Development Environment:</em></strong></p><ul><li><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/ide-tools-overview-V5">Introduction to DevEco Studio</a></li><li>Version of DevEco Studio:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*PBXLHiQedgUy18EBxqQMgg.png" /><figcaption>Version of DevEco Studio</figcaption></figure><ul><li>Version of HarmonyOS SDK:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*OIPsM-qo2d51YJsI9yY0Bw.png" /><figcaption>Version of HarmonyOS SDK</figcaption></figure><h3>Key ArkUI Decorators 🎨</h3><p><strong>🔺<em> @Entry</em></strong></p><p>A custom component decorated with @Entry is used as the default entry component of the page. Only one component can be decorated with @Entry in a single page.</p><p><strong>🔺<em> @Component</em></strong></p><p>In ArkUI, components are what’s displayed on the UI. The custom component has the following features:</p><ul><li><strong>Combinable:</strong> allows you to combine built-in components and other components, as well as their attributes and methods.</li><li><strong>Reusable:</strong> can be reused by other components and used as different instances in different parent components or containers.</li><li><strong>Data-driven update:</strong> holds some state and triggers UI re-rendering with the change of state variables.</li></ul><p><strong>🔺<em>@State</em></strong></p><p>State variable, is a variable that holds the state property and is used to render the owning custom component. When it changes, the UI is re-rendered accordingly.</p><p><strong>🔺 <em>@Builder</em></strong></p><p>@Builder decorator is a lightweight UI element reuse mechanism. This custom component has a fixed internal UI structure and passes the data only to the user. You can abstract reused UI elements into a method and call the method in the <strong>build</strong> method.</p><h3>Development Steps</h3><p>❄️ First, we define a struct Index, which is an input component for HarmonyOS in the ArkTS language.</p><ul><li><strong>@Entry and @Component</strong> : Defines the class Index as the entry component of the application.</li><li><strong>build()</strong> : Creates the structure to be displayed on the screen.</li><li><strong>Column()</strong> : Creates a column and places the initView, textInputField, and taskListfunctions in vertical order in it.</li><li><strong>width(&#39;100%&#39;) and height(&#39;100%&#39;)</strong> : This makes the column cover the entire screen.</li></ul><p>In short, with this code we create a full screen column structure and make the components appear in vertical order.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b4414545ca3dd9f87f549607d7eaf19/href">https://medium.com/media/1b4414545ca3dd9f87f549607d7eaf19/href</a></iframe><p>❄️ With the initViewfunction, we create a simple and centered view that includes the title, subtitle, and short description.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/686f513cdece3225c47de81e58610c5e/href">https://medium.com/media/686f513cdece3225c47de81e58610c5e/href</a></iframe><p>❄️ The textInputFieldfunction creates a field that allows users to add or update tasks. For these operations, we first TextInputadded a field and this.textInputstored what the user entered with. Then, we added an &quot;Add&quot; button to add a task and an &quot;Update&quot; button to update a task; we controlled their visibility with addVisibilityand updateVisibility. Finally, we arranged these components, giving them a white background and making them more aesthetic with rounded edges.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71c1e5026ae775baf613f3c6ad865420/href">https://medium.com/media/71c1e5026ae775baf613f3c6ad865420/href</a></iframe><p>❄️This code creates a structure that displays a task list.</p><p>First, we set up a list structure with the function taskList. Inside the loop ForEach, we take each item in our task list tasksList_ in order and place it on the screen using the builder function listItemComponent.</p><p>For each task item, we create a row structure using the function listItemComponent. In this row, the task description is first displayed as a text. Then, there is a checkbox, delete and edit icons. When the delete and edit icons are clicked, the deleteItemand editItemfunctions are executed respectively.</p><p>As a result, this code creates a list structure that displays tasks in sequential order, adding checkboxes, delete, and edit options to each task.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bad23883385f295b7e2de10fa71b93cf/href">https://medium.com/media/bad23883385f295b7e2de10fa71b93cf/href</a></iframe><p>❄️This model class contains the structure in which tasks are defined and specifies the required properties for each task (such as task description). TaskModelis used to represent each task item in its list tasksList_and to perform tasks related to the task.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db29baa514f2e705ae0beffdb65ddd96/href">https://medium.com/media/db29baa514f2e705ae0beffdb65ddd96/href</a></iframe><p>❄️The import { TaskModel } from &#39;./TaskModel&#39;;statement at the beginning of the code TaskModelincludes a named data model from another file into the project.</p><p>This code creates a structure that performs the functions of adding, editing, and deleting tasks.</p><ul><li>First, we define a task list called tasksList_and textInput states for user input. We control the edit or add mode with updateVisibility and addVisibility.</li><li><strong>With the addItem()</strong> function, we add the text in the textInput field as a new task into tasksList_and then clear textInput.</li><li><strong>With the deleteItem()</strong> function, we delete the task at the specified index from the list tasksList_.</li><li><strong>With editItem(),</strong> we enable editing on a specific task. We bring the description of the selected task to its field textInput and make the edit mode visible and hide the add mode.</li><li>With <strong>updateItem() </strong>we save the edited task as updated to the list, revert the visibility settings to their previous state and clear textInput.</li></ul><p>As a result, with this code we create a dynamic list structure that supports adding, editing and deleting tasks.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b91448048fb39861dd079c10510ca335/href">https://medium.com/media/b91448048fb39861dd079c10510ca335/href</a></iframe><ul><li><em>Here’s the output of the app ✨</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dn4Prd1Dwyk__Zc6I2n9w.jpeg" /><figcaption><em>Output of the App</em></figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FNFWeHrFDmp3iw%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaudit-kikis-delivery-service-NFWeHrFDmp3iw&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcXlzeHZ1Y3R4bjgwMWFtYTl4djg3enBlYXFxcWpoMmo1eDZmaGFzMyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FNFWeHrFDmp3iw%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b77e5cbc0f4632c9ed0a237bbb41113/href">https://medium.com/media/2b77e5cbc0f4632c9ed0a237bbb41113/href</a></iframe><h3>Conclusion</h3><p>While developing my first ToDo app on HarmonyOS, I had the opportunity to experience both the innovative features of the system and the challenges encountered. HarmonyOS&#39;s user-friendly interface development tools and multi-device support allowed the project to proceed quickly and efficiently. The experiences I gained during this process laid a strong foundation for future HarmonyOS projects.</p><p>This first experience taught me not only technical skills but also the dynamics of developing on a new platform. See you in new projects with HarmonyOS! 😊</p><h3>References</h3><p>HarmonyOS NEXT ArkTS:</p><p><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/arkts-api-V5">Document</a></p><p>HarmonyOS NEXT ArkUI:</p><p><a href="https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/arkui-api-V5">Document</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09cca21eea6b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/exploring-harmonyos-a-todo-app-development-with-arkts-arkui-09cca21eea6b">Exploring HarmonyOS: A ToDo App Development with ArkTS, ArkUI</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring CMS DEMO: Account Kit and Auth Service Samples in Android]]></title>
            <link>https://medium.com/huawei-developers/exploring-cms-demo-account-kit-and-auth-service-samples-in-android-a7c09101316b?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7c09101316b</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 08:28:15 GMT</pubDate>
            <atom:updated>2024-09-23T08:28:15.614Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qfORgeEcwIsIToZ1" /><figcaption>Photo by <a href="https://unsplash.com/@andyvult?utm_source=medium&amp;utm_medium=referral">Andy Vult</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>The Common Mobile Services (CMS) library simplifies the integration of Huawei and Google Mobile Services through a unified solution, while the CMS DEMO project offers practical examples to help developers easily integrate the CMS library into their projects.</p><p>In this article, we will explore the CMS DEMO project and focus on examples of Account Kit and Auth Service on Android.</p><blockquote>You can check out this article for more detailed information about the CMS library:</blockquote><p><a href="https://medium.com/huawei-developers/one-library-double-power-integrate-huawei-and-google-services-with-cms-5b46beb66564">One Library, Double Power: Integrate Huawei and Google Services with CMS</a></p><blockquote>If you would like to review our previous article, which is about Map, Location and Ads Kit examples on Android:</blockquote><p><a href="https://medium.com/huawei-developers/exploring-cms-demo-map-location-and-ads-kit-samples-in-android-8072fb7a7400">Exploring CMS DEMO: Map, Location and Ads Kit Samples in Android</a></p><h3>A Quick Overview of the CMS DEMO Project</h3><p>To facilitate seamless integration, the CMS DEMO project provides a live demo showcasing the capabilities and functionalities of the Common Mobile Services library. This demo application is continually updated with new kit demos to ensure developers have access to the latest features and improvements.<br>In the next section, we will take a detailed look at the CMS DEMO project, focusing on examples of Account Kit and Auth Service on Android.</p><h3>Account Kit: Simple, Fast and Secure Login and Authorization</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vBWIn5FJ5cjYUUvYklEx1Q.jpeg" /><figcaption>AccountScreen</figcaption></figure><h4>📌Step 1: Inject account service instance</h4><p>This function provides the AccountService instance that will be used throughout the application. Marking the function with the @Singleton annotation ensures that a single instance of AccountService is used across the entire application. The @Provides annotation tells Dagger that this function is a dependency provider function.</p><p>Inside the function, an AccountService instance is created using the AccountService.Factory.create() method. While creating this instance, the application context (ApplicationContext) is passed as the context parameter. Additionally, SignInParams is required to obtain extra information like email from the user, typically by requesting permission during the sign-in process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/532063a223c36d4a157d0ebb51882673/href">https://medium.com/media/532063a223c36d4a157d0ebb51882673/href</a></iframe><h4>📌<strong>Step 2: Creating the XML Layout for AccountScreen</strong></h4><p>First, create a fragment file for the AccountScreen and define its layout in the XML file.</p><p>Use ConstraintLayout to manage the positions of the UI elements. At the top, add a TextView to display the account screen title, followed by three necessary buttons. The first of these buttons is a SignInButton, which is specifically designed to allow users to sign in and is provided by the third-party CMS library.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/85cb745d75eaabfd9b23fbd37957612a/href">https://medium.com/media/85cb745d75eaabfd9b23fbd37957612a/href</a></iframe><h4>📌 Step 3: Implement AccountScreen Fragment</h4><p><strong>🔸Create account service instance</strong></p><p>This line allows the AccountService instance to be injected into the class using lateinit injection with Dagger Hilt.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14064dbb3b5b4bf0032df27282ff3b38/href">https://medium.com/media/14064dbb3b5b4bf0032df27282ff3b38/href</a></iframe><p><strong>🔸initializeAccountService()</strong></p><p>This function associates the signIn, getLastSignedAccount, and signOut functions with the button click events.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d1f7c3a9e27aa15b14e838d3e934991/href">https://medium.com/media/9d1f7c3a9e27aa15b14e838d3e934991/href</a></iframe><p><strong>🔸signIn()</strong></p><p>This function initiates a sign-in process via the accountService, receives a sign-in request, and starts it using startActivityForResult with the specified REQUEST_CODE to await an activity result.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e47556c7b421c24efbe26f2c1836d3bd/href">https://medium.com/media/e47556c7b421c24efbe26f2c1836d3bd/href</a></iframe><p><strong>🔸getLastSignedAccount()</strong></p><p>This function performs a silent sign-in via the accountService, retrieving the account information of the user who last signed in. Using the ResultCallback interface, it handles different actions based on the sign-in result.</p><ul><li>The onSuccess method retrieves the user’s credentials (ID, email, name) upon a successful sign-in and formats this information as text to display in the textViewAccountInfo component.</li><li>If the sign-in fails, the onFailure method shows the message &quot;Please sign in first.&quot;</li><li>The onCancelled method displays a message indicating that the process was canceled.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/738d6ffe80650af16cebb677bc4645e3/href">https://medium.com/media/738d6ffe80650af16cebb677bc4645e3/href</a></iframe><p><strong>🔸onActivityResult()</strong></p><p>This function uses the onActivityResult method to process the results of the sign-in operation. If the specified requestCode matches REQUEST_CODE and the data object is not null, it calls onSignInActivityResult to handle the sign-in result via the accountService.</p><p>The result is processed using the ResultCallback interface:</p><ul><li>In the case of a successful sign-in, the user’s credentials are printed on the screen.</li><li>If there’s an error, an error message is displayed.</li><li>If the process is canceled, a cancellation message is shown on the screen.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92604b4ab237590a10c861d57416e3bc/href">https://medium.com/media/92604b4ab237590a10c861d57416e3bc/href</a></iframe><p><strong>🔸signOut()</strong></p><p>This function initiates the sign-out process via the accountService and displays an appropriate message on the screen based on whether the operation is successful, unsuccessful, or canceled.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ab0bf358d331e90bf5178fba6a6990e/href">https://medium.com/media/8ab0bf358d331e90bf5178fba6a6990e/href</a></iframe><h3><strong>Auth Service: One or More Authentication Modes</strong></h3><p>1- Email/Password Sign In</p><p>2- Phone Number Sign In</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S16ogMBYa3MGFAnagf3I4Q.jpeg" /><figcaption>AuthScreen</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrpZ3ofuBsFOOAiDsWAIvQ.jpeg" /><figcaption>AuthScreen</figcaption></figure><h4>📌Step 1: Inject auth service instance</h4><p>This code defines a dependency injection module using Dagger Hilt. The @Module and @InstallIn(SingletonComponent::class) annotations indicate that the module should provide dependencies that are valid throughout the application (singleton). Within the AuthServiceModule class, a function marked with @Singleton and @Provides creates the AuthService and provides this service using the Context dependency. The @ApplicationContext annotation specifies that the application-wide context will be injected.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97fa3a2c6f89a95f00cfa7c2b6bcf454/href">https://medium.com/media/97fa3a2c6f89a95f00cfa7c2b6bcf454/href</a></iframe><h4>📌Step 2: Creating XML Layout for Email Password and Phone Sign-In</h4><p>First, we created a sign-up page to collect the user’s email and password information. On this page, users can enter their email and password to create an account. Next, we prepared a sign-in page for existing users to log in. On this page, users can enter their email and password to sign in. Additionally, we added a sign-out button on the same page.</p><h3>1- Email/Password Sign-In</h3><h4>🎯 Step 1: Implement the EmailPasswordScreen Fragment</h4><p>🔸 <strong>Create Auth Service Instance </strong><br>This line allows the AuthService instance to be injected into the class using lateinit injection with Dagger Hilt.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2aa2fbdc0c7fe6e512f973c368a9d6e4/href">https://medium.com/media/2aa2fbdc0c7fe6e512f973c368a9d6e4/href</a></iframe><p>🔸<strong> signInWithEmail()</strong><br>This code defines a function that performs the sign-in operation using email and password. It retrieves the email and password from the user; if these fields are empty, an error message is displayed. If the information is correct, the sign-in process is initiated using the authService. Upon a successful sign-in, the email and password fields are cleared, and a welcome message is shown to the user. If the sign-in fails, an error message is displayed on the screen.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ae8ad97c362f3ce26ad83f83ad0bcfe/href">https://medium.com/media/0ae8ad97c362f3ce26ad83f83ad0bcfe/href</a></iframe><p><strong>🔸checkUser()</strong></p><p>This code checks if there is a currently logged-in user. It retrieves the logged-in user using authService.getUser(). If a user exists, a welcome message is displayed along with the user&#39;s ID. If no user is found, a general welcome message is shown.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1a42fd4de0fc1106bea30d65e774ae0/href">https://medium.com/media/d1a42fd4de0fc1106bea30d65e774ae0/href</a></iframe><p>🔸 <strong>signOut()</strong><br>This code defines a function that signs out the user. It calls authService.signOut(), and then checkUser() is invoked again to verify if there is any logged-in user.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/57aa51f61007355ea091c0aab84019c8/href">https://medium.com/media/57aa51f61007355ea091c0aab84019c8/href</a></iframe><h4>🎯 <strong>Step 2: Implementing the SignUpScreen Fragment</strong></h4><p>🔸 <strong>signUp()</strong><br>This code defines a function that registers a user using email and password. It retrieves the email and password from the user; if these fields are empty, an error message is displayed. If the information is valid, the sign-up process is initiated using authService.signUp(). Upon successful registration, two different actions are taken based on the verification type: if a verification code is required, an alert dialog is shown (showAlertDialog()); if no verification is needed, a success message is displayed, and the user is returned to the previous screen. If registration fails, an error message is shown.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a39d4c0b1cc1854b05de42b223faa0f3/href">https://medium.com/media/a39d4c0b1cc1854b05de42b223faa0f3/href</a></iframe><p>🔸 <strong>showAlertDialog()</strong><br>This code displays an alert dialog to prompt the user for the verification code. It uses AlertDialog.Builder to create the dialog and adds a custom view (bindingVerify.root) to it. When the user clicks the &quot;Verify&quot; button, the verifyCode(dialog) function is called to initiate the verification process. The created dialog is then shown (dialog.show()).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fc4db9f0c44a776f231a3f49deb0d60/href">https://medium.com/media/6fc4db9f0c44a776f231a3f49deb0d60/href</a></iframe><p>🔸 <strong>verifyCode()</strong><br>This code processes the verification code entered by the user. If the verification code field is empty, an error message is displayed. If the code is not empty, the verification is performed using authService.verifyCode() with the email, password, and verification code. If verification is successful, a success message is displayed, the dialog is closed, and the user is returned to the previous screen. If verification fails, an error message is shown.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffa5b3147fa9d2af6aae484636b9456e/href">https://medium.com/media/ffa5b3147fa9d2af6aae484636b9456e/href</a></iframe><h3><strong>2- Phone Number Sign-In</strong></h3><h4>🎯 <strong>Step 1: Implementing the PhoneSignInScreen Fragment</strong></h4><p>🔸 <strong>initUI()</strong><br>This code initializes the user interface (UI) elements in an Android application and sets their visibility and functionality based on certain conditions. First, it checks which type of mobile service the device is using (GMS or HMS). If GMS (Google Mobile Services) is used, the sign-up option (tvSignUp) is made invisible, and the phone code is updated with a GMS-specific code. Then, click listeners are assigned to various buttons to allow users to sign up, log in, and log out.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b18d2ec93fdba0df5082122ad4cabcc3/href">https://medium.com/media/b18d2ec93fdba0df5082122ad4cabcc3/href</a></iframe><p>🔸 <strong>signInWithPhone()</strong><br>This code performs the sign-in operation using a phone number. It retrieves the phone number and password from the user; if these fields are empty, an error message is displayed. If they are not empty, a verification code is sent to the specified phone number. If the verification code is successfully sent, an alert dialog is displayed for the user to enter the code. If sending the code fails, an error message is shown.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ce604419861375ce65178312e76ac04/href">https://medium.com/media/6ce604419861375ce65178312e76ac04/href</a></iframe><p>🔸 <strong>showAlertDialog()</strong><br>This code displays an alert dialog for the user to enter the verification code in an Android application. It uses AlertDialog.Builder to create a dialog and ensures it has a view for entering the verification code (bindingVerify.root). When the user clicks the &quot;Verify&quot; button, the verifyCode function is called to process the entered verification code. After creating and showing the dialog, the user can proceed with the verification.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2dd65066655a4760d9f017a91fc4dc8/href">https://medium.com/media/f2dd65066655a4760d9f017a91fc4dc8/href</a></iframe><p>🔸 <strong>verifyCode()</strong><br>This code uses the verification code entered by the user to perform the phone sign-in. If the entered code is empty, an error message is displayed. If the code is not empty, sign-in is attempted using the phone number, password, and verification code. Upon a successful sign-in, a success message is shown, the dialog is closed, and the UI is updated (input fields cleared, welcome message displayed). If sign-in fails, an error message is shown.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff4b5ef1c99997dce8bfb64ac40c8cbd/href">https://medium.com/media/ff4b5ef1c99997dce8bfb64ac40c8cbd/href</a></iframe><p>🔸 <strong>checkUser() signOut()</strong><br>This code checks the user’s sign-in status and manages sign-in/sign-out operations. The checkUser function retrieves the phone number if the user is signed in and displays a &quot;Welcome&quot; message; if not signed in, it shows a general welcome message. The signOut function logs out the user and calls checkUser to verify the updated sign-in status.</p><h4>🎯 <strong>Step 2: Implementing the PhoneSignUpScreen Fragment</strong></h4><p>🔸 <strong>signUpWithPhone()</strong><br>This code initiates the registration process using a phone number. It retrieves the phone number and password from the user; if these fields are empty, an error message is displayed. If not empty, a verification code is sent to the specified phone number. Upon successful sending of the code, a dialog is shown for the user to enter the code. If sending fails, an error message is displayed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/811ea75567301682ddc4a77e52c71b39/href">https://medium.com/media/811ea75567301682ddc4a77e52c71b39/href</a></iframe><p>🔸 <strong>showAlertDialog() &amp; verifyCode()</strong><br>This code displays an alert dialog for the user to enter the verification code. It uses AlertDialog.Builder to create the dialog and includes the verification screen (bindingVerify.root). When the user clicks the &quot;Verify&quot; button, the verifyCode function is called to process the entered code. This code performs the phone registration using the verification code provided by the user. If the verification code is empty, an error message is shown. If not empty, registration is attempted using the phone number, password, and verification code. Upon successful registration, a success message is displayed, the dialog is closed, and the user is returned to the previous screen. If registration fails, an error message is displayed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5acc887c112171854b0438fbe5922c3/href">https://medium.com/media/a5acc887c112171854b0438fbe5922c3/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FY0IMe2pJZYXxv7mgIH%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FAnimationOnFOX-the-simpsons-foxtv-Y0IMe2pJZYXxv7mgIH&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcWRjc3ZyYzMzcGo1ZWRwZDVlcjdnMnc0YXQ3ZHV6bnR3ZDZ1YWw0NyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FY0IMe2pJZYXxv7mgIH%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/08d3103edef66dc73ede48e3a6809105/href">https://medium.com/media/08d3103edef66dc73ede48e3a6809105/href</a></iframe><h3><strong>Conclusion</strong></h3><p>In this article, we explored the integration of Account and Authentication (Auth) services into an Android application using the CMS DEMO project. By following these examples, you can effectively implement user authentication and account management in your projects, enhancing both security and user experience.</p><p>Feel free to delve deeper into CMS DEMO and share your feedback on how it can benefit your projects! 😊</p><h3><strong>References</strong></h3><ul><li><a href="https://github.com/Explore-In-HMS/common-mobile-services-demo">GitHub - Explore-In-HMS/common-mobile-services-demo: Common Mobile Services Demo Usage Project</a></li><li><a href="https://github.com/Explore-In-HMS/common-mobile-services">GitHub - Explore-In-HMS/common-mobile-services: It is a library that provides a common interface for mobile services for Android developers. Its aim is removing special mobile service dependencies for your app code.</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7c09101316b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/exploring-cms-demo-account-kit-and-auth-service-samples-in-android-a7c09101316b">Exploring CMS DEMO: Account Kit and Auth Service Samples in Android</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CMS DEMO’yu Keşfedin: Android’de Hesap Kiti ve Kimlik Doğrulama Servisi Örnekleri]]></title>
            <link>https://medium.com/huawei-developers-tr/cms-demoyu-ke%C5%9Ffedin-android-de-hesap-kiti-ve-kimlik-do%C4%9Frulama-servisi-%C3%B6rnekleri-4ee63be17641?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ee63be17641</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[mobile-programming]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 07:37:47 GMT</pubDate>
            <atom:updated>2024-09-23T08:29:40.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qfORgeEcwIsIToZ1" /><figcaption>Photo by <a href="https://unsplash.com/@andyvult?utm_source=medium&amp;utm_medium=referral">Andy Vult</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Giriş</h3><p>Common Mobile Services (CMS) kütüphanesi, Huawei ve Google Mobil Servislerinin tek bir çözüm aracılığıyla entegrasyonunu basitleştirirken CMS DEMO projesi, geliştiricilerin CMS kütüphanesini projelerine kolayca entegre etmelerine yardımcı olacak pratik örnekler sunar.</p><p>Bu makalede, CMS DEMO projesini keşfedeceğiz ve Android’deki Hesap Kiti ve Kimlik Doğrulama Servisi örneklerine odaklanacağız.</p><blockquote>CMS kütüphanesi hakkında daha detaylı bilgi için bu yazıya göz atabilirsiniz:</blockquote><p><a href="https://medium.com/huawei-developers-tr/tek-k%C3%BCt%C3%BCphane-%C3%A7ifte-g%C3%BC%C3%A7-huawei-ve-google-servislerini-cms-ile-entegre-edin-53b5e75ce1bd">Tek Kütüphane, Çifte Güç: Huawei ve Google Servislerini CMS ile Entegre Edin</a></p><blockquote>Android’de Harita, Konum ve Reklam Kiti örneklerini konu alan bir önceki yazımızı incelemek isterseniz:</blockquote><p><a href="https://medium.com/huawei-developers-tr/cms-demoyu-ke%C5%9Ffedin-android-de-harita-konum-ve-reklam-kiti-%C3%B6rnekleri-406aaa0a6fd8">CMS DEMO’yu Keşfedin: Android’de Harita, Konum ve Reklam Kiti Örnekleri</a></p><h3>CMS DEMO Projesine Hızlı Bir Genel Bakış</h3><p>Sorunsuz bir entegrasyonu kolaylaştırmak için CMS DEMO projesi, Common Mobile Services kütüphanesinin yeteneklerini ve işlevselliklerini sergileyen canlı bir demo sunar. Bu demo uygulaması, geliştiricilerin en son özelliklere ve iyileştirmelere erişimini sağlamak için sürekli olarak yeni kit demolarıyla güncellenmektedir.</p><p>Bir sonraki bölümde, Android’deki Hesap Kiti ve Kimlik Doğrulama Servisi örneklerine odaklanarak CMS DEMO projesini ayrıntılı olarak inceleyeceğiz.</p><h3>Hesap Kiti: Basit, Hızlı ve Güvenli Oturum Açma ve Yetkilendirme</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vBWIn5FJ5cjYUUvYklEx1Q.jpeg" /><figcaption>AccountScreen</figcaption></figure><h4><strong>📌</strong>Adım 1: Hesap hizmeti örneğini enjekte edin</h4><p>Bu fonksiyon, uygulama genelinde kullanılacak olan AccountService nesnesini sağlar.</p><p>Fonksiyon, @Singleton anotasyonu ile işaretlenerek, uygulama genelinde AccountService nesnesinin tek bir örneğinin kullanılmasını garanti eder. @Provides anotasyonu ise Dagger&#39;a bu fonksiyonun bir bağımlılık sağlama fonksiyonu olduğunu söyler.</p><p>Fonksiyonun içerisinde, AccountServic.Factory.create() metoduyla bir AccountServicenesnesi oluşturuluyor. Bu nesnenin oluşturulması sırasında, context parametresi olarak uygulama bağlamı (ApplicationContext) veriliyor. Ayrıca, e-posta gibi ek bilgiler almak amacıyla kullanıcıdan izin almak için SignInParams’a ihtiyaç vardır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/532063a223c36d4a157d0ebb51882673/href">https://medium.com/media/532063a223c36d4a157d0ebb51882673/href</a></iframe><h4><strong>📌Ad</strong>ı<strong>m 2: </strong>AccountScreen için XML Düzeninin Oluşturulması</h4><p>Öncelikle AccountScreeniçin bir fragment dosyası oluşturun ve XML dosyasındaki düzenini tanımlayın.</p><p>Kullanıcı arayüzü öğelerinin konumlarını yönetmek için ConstraintLayout&#39;u kullanın; hesap ekranı başlığını görüntülemek için en üste bir TextView ve daha sonra gerekli 3 butonu yerleştirin. Bu butonlardan ilki, bir SignInButton’dur; bu, kullanıcıların oturum açmasını sağlamak için özel olarak tasarlanmış bir giriş butonudur ve üçüncü taraf kütüphane olan CMS tarafından sağlanmaktadır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/85cb745d75eaabfd9b23fbd37957612a/href">https://medium.com/media/85cb745d75eaabfd9b23fbd37957612a/href</a></iframe><h4>📌 Adım 3: AccountScreen Fragment’ını Uygulama</h4><p><strong>🔸Create account service instance</strong></p><p>Bu satır, Dagger Hilt kullanarak AccountServicenesnesinin, sınıf içerisine lateinit enjeksiyon ile enjekte edilmesini sağlar.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14064dbb3b5b4bf0032df27282ff3b38/href">https://medium.com/media/14064dbb3b5b4bf0032df27282ff3b38/href</a></iframe><p><strong>🔸initializeAccountService()</strong></p><p>Bu fonksiyon, signIn, getLastSignedAccount ve signOut fonksiyonlarini butonlarin tıklama işlevleriyle ilişkilendirir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d1f7c3a9e27aa15b14e838d3e934991/href">https://medium.com/media/9d1f7c3a9e27aa15b14e838d3e934991/href</a></iframe><p><strong>🔸signIn()</strong></p><p>Bu fonksiyon, accountService üzerinden oturum açma işlemini başlatmak için bir giriş isteği alır ve bu isteği startActivityForResult ile belirtilen REQUEST_CODE kullanarak bir etkinlik sonucu beklemek üzere başlatır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e47556c7b421c24efbe26f2c1836d3bd/href">https://medium.com/media/e47556c7b421c24efbe26f2c1836d3bd/href</a></iframe><p><strong>🔸getLastSignedAccount()</strong></p><p>Bu fonksiyon, accountService üzerinden sessiz oturum açma (silentSignIn) işlemi gerçekleştirerek kullanıcının en son oturum açtığı hesap bilgilerini alır. ResultCallback arayüzü kullanılarak oturum açma sonucuna göre farklı işlemler yapılır.</p><ul><li>onSuccess metodu, başarılı bir girişte kullanıcının kimlik bilgilerini (ID, e-posta, ad) alıp, bu bilgileri bir metin formatında textViewAccountInfo bileşenine yerleştirir.</li><li>Eğer oturum açma başarısız olursa, onFailure metodu &quot;Lütfen önce oturum açın&quot; mesajını gösterir.</li><li>onCancelled metodu ise işlemin iptal edildiği bilgisini ekrana yansıtır.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/738d6ffe80650af16cebb677bc4645e3/href">https://medium.com/media/738d6ffe80650af16cebb677bc4645e3/href</a></iframe><p><strong>🔸onActivityResult()</strong></p><p>Bu fonksiyon, oturum açma işlemi için sonuçları işlemek amacıyla onActivityResult metodunu kullanır. Belirtilen requestCode&#39;un REQUEST_CODE ile eşleşmesi ve data nesnesinin boş olmaması durumunda, accountService aracılığıyla oturum açma sonucunu işlemek için onSignInActivityResult çağrılır.</p><p>Sonuç, ResultCallback arayüzü kullanılarak işlenir:</p><ul><li>Başarılı bir oturum açma durumunda kullanıcının kimlik bilgileri ekrana yazdırılır.</li><li>Bir hata olursa hata mesajı gösterilir.</li><li>Işlem iptal edilirse iptal mesajı ekrana yansıtılır.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92604b4ab237590a10c861d57416e3bc/href">https://medium.com/media/92604b4ab237590a10c861d57416e3bc/href</a></iframe><p><strong>🔸signOut()</strong></p><p>Bu fonksiyon, accountServicearacılığıyla oturum kapatma işlemini başlatır ve işlem başarılı, başarısız veya iptal edildiğinde duruma uygun mesajı ekrana yansıtır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ab0bf358d331e90bf5178fba6a6990e/href">https://medium.com/media/8ab0bf358d331e90bf5178fba6a6990e/href</a></iframe><h3>Kimlik Doğrulama Servisi: Bir veya Daha Fazla Kimlik Doğrulama Modu</h3><p>1- Eposta/Şifre Girişi</p><p>2- Telefon Numarasıyla Giriş</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S16ogMBYa3MGFAnagf3I4Q.jpeg" /><figcaption>AuthScreen</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrpZ3ofuBsFOOAiDsWAIvQ.jpeg" /><figcaption>AuthScreen</figcaption></figure><h4>📌Adım 1: Kimlik doğrulama hizmeti örneğini enjekte etme</h4><p>Bu kod, Dagger Hilt kullanarak bir bağımlılık enjeksiyonu modülü tanımlar. @Module ve @InstallIn(SingletonComponent::class) anotasyonları, modülün uygulama boyunca geçerli olan (singleton) bağımlılıkları sağlaması gerektiğini belirtir. AuthServiceModule sınıfı içinde, @Singleton ve @Provides ile işaretlenmiş bir fonksiyon, AuthService&#39;i oluşturur ve Context bağımlılığını kullanarak bu servisi sağlar. @ApplicationContext anotasyonu ise, uygulama genelinde kullanılan bağlamın (Context) enjekte edileceğini belirtir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97fa3a2c6f89a95f00cfa7c2b6bcf454/href">https://medium.com/media/97fa3a2c6f89a95f00cfa7c2b6bcf454/href</a></iframe><h4>📌Adım 2: Email Password ve Phone Sign In için XML Düzeninin Oluşturulması</h4><p>İlk olarak, kullanıcıdan e-posta ve şifre bilgilerini almak için bir kayıt (sign up) sayfası oluşturduk. Bu sayfada kullanıcı, e-posta ve şifresini girerek hesap oluşturabiliyor. Sonrasında, mevcut kullanıcıların oturum açabilmesi için bir oturum açma (sign in) sayfası hazırladık. Bu sayfada, kullanıcı yine e-posta ve şifresini girerek giriş yapabiliyor. Ayrıca, aynı sayfaya oturumu kapatmak için bir oturum kapatma (sign out) butonu da ekledik.</p><h3>1- Eposta/Şifre Girişi</h3><h4>🎯 Adım 1: EmailPasswordScreen Fragment’ını Uygulama</h4><p><strong>🔸Kimlik doğrulama hizmeti örneği oluştur</strong></p><p>Bu satır, Dagger Hilt kullanarak AuthServicenesnesinin, sınıf içerisine lateinit enjeksiyon ile enjekte edilmesini sağlar.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2aa2fbdc0c7fe6e512f973c368a9d6e4/href">https://medium.com/media/2aa2fbdc0c7fe6e512f973c368a9d6e4/href</a></iframe><p><strong>🔸signInWithEmail()</strong></p><p>Bu kod, e-posta ve şifre ile oturum açma işlemini gerçekleştiren bir fonksiyondur. Kullanıcıdan e-posta ve şifre alınır; eğer bu bilgiler boşsa, bir hata mesajı gösterilir. Bilgiler doğruysa, authService kullanılarak oturum açma işlemi başlatılır. Oturum başarılı olursa, e-posta ve şifre alanları temizlenir ve kullanıcıya hoş geldiniz mesajı gösterilir. Eğer oturum açma işlemi başarısız olursa, hata mesajı ekrana yansıtılır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ae8ad97c362f3ce26ad83f83ad0bcfe/href">https://medium.com/media/0ae8ad97c362f3ce26ad83f83ad0bcfe/href</a></iframe><p><strong>🔸checkUser()</strong></p><p>Bu kod, mevcut oturum açmış bir kullanıcı olup olmadığını kontrol eden bir fonksiyondur. authService kullanarak oturum açmış bir kullanıcı alır (getUser()). Eğer kullanıcı mevcutsa, kullanıcı kimliğiyle birlikte bir hoş geldiniz mesajı gösterilir. Kullanıcı yoksa, genel bir hoş geldiniz mesajı görüntülenir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1a42fd4de0fc1106bea30d65e774ae0/href">https://medium.com/media/d1a42fd4de0fc1106bea30d65e774ae0/href</a></iframe><p><strong>🔸signOut()</strong></p><p>Bu kod, kullanıcının oturumunu kapatan bir fonksiyondur. authService.signOut() fonksiyonu ile oturum kapatılır ve ardından checkUser() çağrılarak oturum açmış bir kullanıcı olup olmadığı tekrar kontrol edilir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/57aa51f61007355ea091c0aab84019c8/href">https://medium.com/media/57aa51f61007355ea091c0aab84019c8/href</a></iframe><h4>🎯Adım 2: SignUpScreen Fragment’ını Uygulama</h4><p><strong>🔸signUp()</strong></p><p>Bu kod, e-posta ve şifre ile kullanıcı kaydı gerçekleştiren bir fonksiyondur. Kullanıcıdan e-posta ve şifre alınır; eğer bu alanlar boşsa, bir hata mesajı gösterilir. Bilgiler geçerliyse, authService.signUp ile kayıt işlemi başlatılır. Kayıt başarılı olursa, doğrulama türüne göre iki farklı işlem yapılır: Eğer doğrulama kodu gerekiyorsa, bir uyarı penceresi gösterilir (showAlertDialog()); doğrulama gerekmezse, başarı mesajı gösterilir ve önceki ekrana geri dönülür. Kayıt başarısız olursa, hata mesajı ekrana yansıtılır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a39d4c0b1cc1854b05de42b223faa0f3/href">https://medium.com/media/a39d4c0b1cc1854b05de42b223faa0f3/href</a></iframe><p><strong>🔸showAlertDialog()</strong></p><p>Bu kod, kullanıcıdan doğrulama kodunu almak için bir uyarı penceresi (alert dialog) gösteren bir fonksiyondur. AlertDialog.Builder kullanarak bir uyarı penceresi oluşturulur ve özel bir görünüm (bindingVerify.root) pencereye eklenir. Kullanıcı &quot;Doğrula&quot; butonuna tıkladığında, verifyCode(dialog) fonksiyonu çağrılarak doğrulama işlemi başlatılır. Ardından, oluşturulan diyalog gösterilir (dialog.show()).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fc4db9f0c44a776f231a3f49deb0d60/href">https://medium.com/media/6fc4db9f0c44a776f231a3f49deb0d60/href</a></iframe><p><strong>🔸verifyCode()</strong></p><p>Bu kod, kullanıcının girdiği doğrulama kodunu işleyen bir fonksiyondur. Doğrulama kodu alanı boşsa, bir hata mesajı gösterilir. Kod boş değilse, authService.verifyCode fonksiyonu ile e-posta, şifre ve doğrulama kodu kullanılarak doğrulama işlemi gerçekleştirilir. Doğrulama başarılı olursa, başarı mesajı gösterilir, diyalog kapatılır ve önceki ekrana geri dönülür. Eğer doğrulama başarısız olursa, hata mesajı ekrana yansıtılır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffa5b3147fa9d2af6aae484636b9456e/href">https://medium.com/media/ffa5b3147fa9d2af6aae484636b9456e/href</a></iframe><h3>2- Telefon Numarasıyla Giriş</h3><h4>🎯 Adım 1: PhoneSignInScreen Fragment’ını Uygulama</h4><p><strong>🔸initUI()</strong></p><p>Bu kod, bir Android uygulamasında kullanıcı arayüzü (UI) elemanlarını başlatır ve belirli koşullara göre görünürlüklerini ve işlevlerini ayarlar. İlk olarak, cihazın hangi mobil servis türünü (GMS veya HMS) kullandığını kontrol eder ve eğer GMS (Google Mobile Services) kullanılıyorsa, kayıt olma seçeneği (tvSignUp) görünmez hale getirilir ve telefon kodu GMS&#39;e özgü bir kodla güncellenir. Ardından, çeşitli butonlara tıklama dinleyicileri atanarak, kullanıcıların kayıt olma, giriş yapma ve çıkış yapma işlemleri gerçekleştirilir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b18d2ec93fdba0df5082122ad4cabcc3/href">https://medium.com/media/b18d2ec93fdba0df5082122ad4cabcc3/href</a></iframe><p><strong>🔸signInWithPhone()</strong></p><p>Bu kod, bir Android uygulamasında telefon numarası ile giriş yapma işlemini gerçekleştirir. Kullanıcıdan telefon numarası ve şifre alınır, eğer bu bilgiler boşsa bir hata mesajı gösterilir. Boş değilse, önce belirtilen telefon numarasına doğrulama kodu gönderilir. Doğrulama kodu başarıyla gönderilirse, kullanıcıya bu kodu girmesi için bir uyarı penceresi (alert dialog) gösterilir. Kod gönderme işlemi başarısız olursa, hata mesajı kullanıcıya gösterilir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ce604419861375ce65178312e76ac04/href">https://medium.com/media/6ce604419861375ce65178312e76ac04/href</a></iframe><p>🔸<strong>showAlertDialog()</strong></p><p>Bu kod, bir Android uygulamasında doğrulama kodunu girmek için kullanıcıya bir uyarı penceresi (alert dialog) gösterir. AlertDialog.Builder kullanarak bir diyalog oluşturur ve bindingVerify.root adlı bir görünüme (doğrulama kodunu girmek için hazırlanmış bir UI bileşeni) sahip olmasını sağlar. Kullanıcı &quot;Doğrula&quot; (Verify) düğmesine bastığında, verifyCode fonksiyonu çağrılarak girilen doğrulama kodu işlenir. Diyalog oluşturulup gösterildikten sonra, kullanıcı bu diyalog üzerinden doğrulama işlemini gerçekleştirebilir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2dd65066655a4760d9f017a91fc4dc8/href">https://medium.com/media/f2dd65066655a4760d9f017a91fc4dc8/href</a></iframe><p><strong>🔸verifyCode()</strong></p><p>Bu kod, kullanıcıdan alınan doğrulama kodunu kullanarak telefonla giriş yapma işlemini gerçekleştirir. Girilen kod boşsa, hata mesajı gösterilir. Kod boş değilse, telefon numarası, şifre ve doğrulama kodu kullanılarak giriş yapılır. Giriş başarılı olursa, kullanıcıya bir başarı mesajı gösterilir, dialog kapatılır ve arayüz güncellenir (giriş alanları temizlenir, karşılama mesajı gösterilir). Başarısız olursa, hata mesajı görüntülenir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff4b5ef1c99997dce8bfb64ac40c8cbd/href">https://medium.com/media/ff4b5ef1c99997dce8bfb64ac40c8cbd/href</a></iframe><p><strong>🔸checkUser()</strong></p><p><strong>🔸signOut()</strong></p><p>Bu kod, kullanıcının oturum durumunu kontrol eder ve oturum açma/çıkma işlemlerini yönetir. checkUser fonksiyonu, kullanıcı oturum açmışsa telefon numarasını alıp ekrana &quot;Hoş geldiniz&quot; mesajı ile birlikte gösterir, oturum açılmamışsa genel bir hoş geldiniz mesajı gösterir.</p><p>signOut fonksiyonu ise kullanıcının oturumunu kapatır ve ardından checkUser fonksiyonunu çağırarak güncel oturum durumunu kontrol eder.</p><h4>🎯Adım 2: PhoneSignUpScreen Fragment’ını Uygulama</h4><p><strong>🔸signUpWithPhone()</strong></p><p>Bu kod, telefon numarası ile kayıt olma işlemini başlatır. Kullanıcıdan telefon numarası ve şifre alınır, bu alanlar boşsa bir hata mesajı gösterilir. Boş değilse, belirtilen telefon numarasına doğrulama kodu gönderilir. Kod başarılı bir şekilde gönderildiğinde, kullanıcıya bu kodu girmesi için bir doğrulama penceresi gösterilir. Gönderim başarısız olursa, hata mesajı kullanıcıya iletilir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/811ea75567301682ddc4a77e52c71b39/href">https://medium.com/media/811ea75567301682ddc4a77e52c71b39/href</a></iframe><p><strong>🔸showAlertDialog()</strong></p><p><strong>🔸verifyCode()</strong></p><p>Bu kod, kullanıcıya doğrulama kodunu girmesi için bir uyarı penceresi (alert dialog) gösterir. AlertDialog.Builder kullanarak bir diyalog oluşturur ve doğrulama ekranı (bindingVerify.root) eklenir. Kullanıcı &quot;Doğrula&quot; düğmesine bastığında, verifyCode fonksiyonu çağrılarak girilen kod işlenir. Ardından diyalog gösterilir.</p><p>Bu kod, kullanıcıdan alınan doğrulama kodunu kullanarak telefonla kayıt olma işlemini gerçekleştirir. Eğer doğrulama kodu boşsa, hata mesajı gösterilir. Kod boş değilse, telefon numarası, şifre ve doğrulama kodu kullanılarak kayıt işlemi yapılır. Kayıt başarılı olursa, başarı mesajı gösterilir, dialog kapatılır ve önceki ekrana geri dönülür. Kayıt başarısız olursa, hata mesajı kullanıcıya iletilir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5acc887c112171854b0438fbe5922c3/href">https://medium.com/media/a5acc887c112171854b0438fbe5922c3/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FY0IMe2pJZYXxv7mgIH%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FAnimationOnFOX-the-simpsons-foxtv-Y0IMe2pJZYXxv7mgIH&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcWRjc3ZyYzMzcGo1ZWRwZDVlcjdnMnc0YXQ3ZHV6bnR3ZDZ1YWw0NyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FY0IMe2pJZYXxv7mgIH%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/08d3103edef66dc73ede48e3a6809105/href">https://medium.com/media/08d3103edef66dc73ede48e3a6809105/href</a></iframe><h3>Sonuç</h3><p>Bu makalede, <strong>CMS DEMO</strong> projesini kullanarak bir Android uygulamasına <strong>Account</strong> ve <strong>Authentication (Auth)</strong> servislerinin entegrasyonunu inceledik. Bu örnekleri takip ederek, projelerinizde kullanıcı kimlik doğrulama ve hesap yönetimini etkili bir şekilde uygulayabilir, güvenliği ve kullanıcı deneyimini artırabilirsiniz.</p><p>CMS DEMO’yu daha ayrıntılı incelemekten ve projelerinize nasıl fayda sağlayabileceği konusunda geri bildiriminizi bizimle paylaşmaktan çekinmeyin 😊</p><h3>Referanslar</h3><ul><li><a href="https://github.com/Explore-In-HMS/common-mobile-services-demo">GitHub - Explore-In-HMS/common-mobile-services-demo: Common Mobile Services Demo Usage Project</a></li><li><a href="https://github.com/Explore-In-HMS/common-mobile-services">GitHub - Explore-In-HMS/common-mobile-services: It is a library that provides a common interface for mobile services for Android developers. Its aim is removing special mobile service dependencies for your app code.</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ee63be17641" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/cms-demoyu-ke%C5%9Ffedin-android-de-hesap-kiti-ve-kimlik-do%C4%9Frulama-servisi-%C3%B6rnekleri-4ee63be17641">CMS DEMO’yu Keşfedin: Android’de Hesap Kiti ve Kimlik Doğrulama Servisi Örnekleri</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tek Kütüphane, Çifte Güç: Huawei ve Google Servislerini CMS ile Entegre Edin]]></title>
            <link>https://medium.com/huawei-developers-tr/tek-k%C3%BCt%C3%BCphane-%C3%A7ifte-g%C3%BC%C3%A7-huawei-ve-google-servislerini-cms-ile-entegre-edin-53b5e75ce1bd?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/53b5e75ce1bd</guid>
            <category><![CDATA[mobile-application]]></category>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 11:39:22 GMT</pubDate>
            <atom:updated>2024-08-06T11:49:09.477Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sn68ec92SR3obG-0" /><figcaption>Photo by <a href="https://unsplash.com/@sylviasyang?utm_source=medium&amp;utm_medium=referral">Sylvia Yang</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Giriş</h3><p>Herkese merhaba!😊 Huawei geliştiricileri olarak yazdığımız açık kaynaklı projemizde, mobil uygulama geliştiricilerinin hem Huawei Mobile Services (HMS) hem de Google Mobile Services (GMS) servislerini tek bir kütüphane ile entegre edebilmelerini sağlamayı amaçladık.</p><p>❤️ Gelin birlikte bu kütüphaneyi ve diğer çalışmalarımızı inceleyelim!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FbAwEiGwtV8mRy%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaudit-my-neighbor-totoro-bAwEiGwtV8mRy&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExaTgzdnl5ZDRwZDFzYmZ2bWI1eWN1bzdvamtqNTl5dG40ZHExbzI2aiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FbAwEiGwtV8mRy%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb011da49e76d258fe3775b6cb43bff5/href">https://medium.com/media/eb011da49e76d258fe3775b6cb43bff5/href</a></iframe><h3>Common Mobile Services (CMS)</h3><p>Bu kütüphane, Android geliştiricileri için mobil hizmetler konusunda ortak bir arayüz sunar. Amacı, uygulama kodunuzdaki özel mobil hizmet bağımlılıklarını ortadan kaldırmaktır. Bu sayede aşağıdaki faydaları sağlar:</p><p>💫 <strong>Sorumlulukların Ayrılması (Separation of Concerns)</strong></p><ul><li>Oluşturma ve yaşam döngüsü kontrol kodunu uygulama kodunuzdan kaldırarak, sınıflarınızın gereksiz sorumluluklardan arınmasını sağlar. Bu, kodun daha temiz, bakımı kolay ve sürdürülebilir olmasını temin eder.</li></ul><p>💫 <strong>Esneklik ve Uyumluluk</strong></p><ul><li>Farklı mobil hizmetlerin kullanılmasına olanak tanır. Örneğin, tüm Android cihazlar Google Mobil Hizmetlerine (GMS) sahip değildir. Bu kütüphane, cihazın hangi mobil hizmeti desteklediğine bakılmaksızın uyumluluk sağlar ve bu sayede uygulama kodunuzu değiştirmeye gerek kalmadan farklı hizmetleri kullanabilirsiniz.</li></ul><p>💫 <strong>Kolay Entegrasyon</strong></p><ul><li>Tek bir kütüphane ile aynı anda hem HMS hem de GMS hizmetlerini kolayca entegre edip mobil uygulama geliştirmeyi basitleştirebilirsiniz.</li></ul><p>💫 <strong>Geniş Cihaz Desteği</strong></p><ul><li>Uygulamalarınızın daha geniş bir cihaz yelpazesiyle uyumlu olmasını sağlar, bu da kullanıcı kitlenizi artırır.</li></ul><p>💫 <strong>Geliştirme Süresini Kısaltma</strong></p><ul><li>Daha modüler ve esnek bir kod tabanı sayesinde geliştirme sürecini hızlandırır.</li></ul><p>💫 <strong>Kullanıcı Deneyimini İyileştirme</strong></p><ul><li>Farklı hizmetler arasında sorunsuz geçiş sağlayarak kullanıcı deneyimini iyileştirir.</li></ul><p>💫 <strong>Bakım Kolaylığı</strong></p><ul><li>Modüler yapısı sayesinde kod bakımını ve güncellemelerini daha kolay hale getirir.</li></ul><p>Bu kütüphane, geliştiricilere daha esnek ve sürdürülebilir bir çözüm sunar, böylece uygulamalarının hem uyumluluğunu artırır hem de kullanıcı deneyimini iyileştirir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k4r18nYbrlB8lsnw" /><figcaption>Photo by <a href="https://unsplash.com/@marvelous?utm_source=medium&amp;utm_medium=referral">Marvin Meyer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Şu Anda Projede Neler Yapıyoruz?</h4><h4>💥Yeni Kit Entegrasyonları</h4><ul><li>Projede, çeşitli yeni kit entegrasyonları üzerinde çalışıyoruz.</li><li>Her kitin API’lerini ve özelliklerini kullanarak projeyi daha işlevsel hale getiriyoruz.</li><li>Entegrasyon sonrası testler yaparak kitlerin düzgün çalıştığını doğruluyoruz.</li></ul><h4>💥Sürüm Güncellemeleri</h4><ul><li>Mevcut kitlerin sürümlerini en güncel versiyonlarla güncelliyoruz.</li><li>Yeni sürümlerin getirdiği değişiklikleri ve yenilikleri projeye entegre ediyoruz.</li><li>Sürüm güncellemeleri ile gelen güvenlik yamalarını ve performans iyileştirmelerini projeye dahil ediyoruz.</li></ul><h4>💥README Dosyasının Güncellenmesi</h4><ul><li>Projede yapılan tüm değişiklikleri ve yenilikleri README dosyasına ekliyoruz.</li><li>Yeni eklenen kitler, yapılan sürüm güncellemeleri ve entegrasyon süreçleri hakkında bilgi sağlıyoruz.</li><li>Kullanıcıların projeye dair en güncel bilgilere kolayca ulaşabilmesi için README dosyasını dikkatlice düzenliyoruz.</li></ul><h4>💥Dokümantasyon</h4><ul><li>Kdoc belgeleri ile her bir metodun, sınıfın ve paketin işlevselliğini açıklayan açıklamalar yazıyoruz.</li><li>Bu belgeler, geliştiricilerin kodu daha iyi anlamalarına ve projeyi daha kolay bir şekilde sürdürebilmelerine yardımcı oluyor.</li><li>Projede yapılan uygulamalar, değişiklikler ve yenilikler üzerine bu makale gibi materyaller oluşturuyoruz.</li><li>Kullanıcıların ve geliştiricilerin yeni özellikler ve kitlerden haberdar olabilmeleri için bu hazırlığın faydalı olacağını umuyoruz.</li></ul><p>Tüm bu çalışmalarla, projeyi daha kapsamlı ve kullanıcı dostu hale getirmeyi amaçlıyoruz.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fdl5zvKLJg1WkE%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fstudio-ghibli-spirited-away-dl5zvKLJg1WkE&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcW9haWhjbGl4bTMybzR6a2hra2JybWp0N28wMnl4YmhzZjIxaDRlciZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fdl5zvKLJg1WkE%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="248" frameborder="0" scrolling="no"><a href="https://medium.com/media/e4f51eda52287c9d25d013d451a4466c/href">https://medium.com/media/e4f51eda52287c9d25d013d451a4466c/href</a></iframe><h3>CMS DEMO: CMS Kütüphanesi ile Kitlerin Kullanımı</h3><p>CMS DEMO projesi ile bu kütüphanenin kullanımını daha anlaşılır ve erişilebilir hale getirmeyi amaçlıyoruz.</p><p>Bu proje kapsamında, kitlerin en yaygın ve temel özelliklerini kullanarak pratik örnekler sunuyoruz. Örneğin, Ads Kit ile basit reklam entegrasyonları yapıyoruz. Map Kit ile harita görüntüleme ve Location Kit ile konum verilerini kullanarak yer tespiti ve yönlendirme işlemlerini gerçekleştiriyoruz. Bu sayede, geliştiricilerin kitlerin temel işlevlerini nasıl kullanabileceklerini öğrenmelerini sağlıyoruz.</p><p>Amacımız, CMS kütüphanesini entegre etmek isteyen kişilere kolaylık sağlamak ve projelerinde kullanabilecekleri hazır çözümler sunmaktır. CMS DEMO ile geliştiriciler, kitlerin potansiyelini keşfederken, kendi projelerine değer katacak özellikleri hızlı ve etkin bir şekilde uygulayabileceklerdir.</p><p>🎯 Projelerimizin GitHub repolarına referanslar kısmından ulaşabilirsiniz.</p><h4>Demo Projenin Bize Sağladığı Faydalar</h4><p><strong>💙 Gerçek Dünya Testi</strong>: CMS kütüphanesini gerçek dünya senaryolarında test etme imkanı sağlar ve fonksiyonelliğini doğrular.</p><p><strong>💙 İyileştirme ve Refaktörleme</strong>: Demo proje sayesinde CMS kütüphanesindeki eksiklikleri ve iyileştirme alanlarını tespit eder, gerekli düzenlemeleri yaparız.</p><p><strong>💙 Hata Tespiti ve Çözümü</strong>: Proje sırasında ortaya çıkan hataları hızlıca tespit edip çözebiliriz.</p><p><strong>💙 Dokümantasyon Geliştirme</strong>: Kullanıcıların karşılaşabileceği sorunları önceden görüp, daha kapsamlı ve açıklayıcı bir dokümantasyon oluşturabiliriz.</p><p><strong>💙 Yeni Özelliklerin Testi</strong>: Yeni eklenen özelliklerin entegrasyonunu ve etkisini test ederek, stabiliteyi artırabiliriz.</p><p><strong>💙 Proje Uyumunu Sağlama</strong>: Farklı cihaz ve hizmetlerle uyumluluğunu kontrol ederek, CMS kütüphanesinin geniş bir yelpazede sorunsuz çalışmasını temin edebiliriz.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FxYMTfc3UFuqKTS0NP0%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ftiff-studio-ghibli-the-wind-rises-xYMTfc3UFuqKTS0NP0&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExYWJyNXl3OHY2eGo3emp3cWlnd2Z5MXpib3dxZXo4MDV3eTBqa3dyNiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FxYMTfc3UFuqKTS0NP0%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/65541d527271149498a42636d64d0cf1/href">https://medium.com/media/65541d527271149498a42636d64d0cf1/href</a></iframe><h3>Sonuç</h3><p>CMS kütüphanesi, geliştiricilere farklı hizmetleri tek bir kütüphane ile kullanma imkanı sunarak geliştirme sürecini kolaylaştırmaktadır. Açık kaynaklı olan bu kütüphane, mobil uygulamalarda çeşitlilik ve esneklik sağlamayı amaçlamaktadır.</p><p>CMS DEMO, geliştiricilerin CMS kütüphanesini kolayca kullanmalarını ve projelerine entegre etmelerini sağlar. Umarız bu makale, projelerinizi daha kullanıcı dostu ve kapsamlı hale getirmenize yardımcı olur 😊</p><h3>Referanslar</h3><ul><li><a href="https://github.com/Explore-In-HMS/common-mobile-services">GitHub - Explore-In-HMS/common-mobile-services: It is a library that provides a common interface for mobile services for Android developers. Its aim is removing special mobile service dependencies for your app code.</a></li><li><a href="https://github.com/Explore-In-HMS/common-mobile-services-demo">GitHub - Explore-In-HMS/common-mobile-services-demo: Common Mobile Services Demo Usage Project</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53b5e75ce1bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/tek-k%C3%BCt%C3%BCphane-%C3%A7ifte-g%C3%BC%C3%A7-huawei-ve-google-servislerini-cms-ile-entegre-edin-53b5e75ce1bd">Tek Kütüphane, Çifte Güç: Huawei ve Google Servislerini CMS ile Entegre Edin</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Library, Double Power: Integrate Huawei and Google Services with CMS]]></title>
            <link>https://medium.com/huawei-developers/one-library-double-power-integrate-huawei-and-google-services-with-cms-5b46beb66564?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b46beb66564</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[mobile-application]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[huawei]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 11:38:51 GMT</pubDate>
            <atom:updated>2024-08-06T11:49:37.299Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sn68ec92SR3obG-0" /><figcaption>Photo by <a href="https://unsplash.com/@sylviasyang?utm_source=medium&amp;utm_medium=referral">Sylvia Yang</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>Hello everyone! 😊 As Huawei developers, we created an open-source project to enable mobile application developers to integrate both Huawei Mobile Services (HMS) and Google Mobile Services (GMS) using a single library.</p><p>❤️ Let’s explore this library and our other projects together!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FbAwEiGwtV8mRy%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaudit-my-neighbor-totoro-bAwEiGwtV8mRy&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExaTgzdnl5ZDRwZDFzYmZ2bWI1eWN1bzdvamtqNTl5dG40ZHExbzI2aiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FbAwEiGwtV8mRy%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb011da49e76d258fe3775b6cb43bff5/href">https://medium.com/media/eb011da49e76d258fe3775b6cb43bff5/href</a></iframe><h3>Common Mobile Services (CMS)</h3><p>This library provides a unified interface for mobile services for Android developers. Its purpose is to eliminate specific mobile service dependencies in your application code, offering the following benefits:</p><p>💫 <strong>Separation of Concerns</strong></p><ul><li>By removing creation and lifecycle control code from your application code, it ensures that your classes are free from unnecessary responsibilities. This results in cleaner, more maintainable, and sustainable code.</li></ul><p>💫 <strong>Flexibility and Compatibility</strong></p><ul><li>Allows the use of different mobile services. For instance, not all Android devices have Google Mobile Services (GMS). This library ensures compatibility regardless of which mobile service the device supports, allowing you to use different services without changing your application code.</li></ul><p>💫 <strong>Easy Integration</strong></p><ul><li>With a single library, you can easily integrate both HMS and GMS services simultaneously, simplifying mobile application development.</li></ul><p>💫 <strong>Wide Device Support</strong></p><ul><li>Ensures that your applications are compatible with a broader range of devices, increasing your user base.</li></ul><p>💫 <strong>Reduced Development Time</strong></p><ul><li>Speeds up the development process with a more modular and flexible codebase.</li></ul><p>💫 <strong>Improved User Experience</strong></p><ul><li>Enhances the user experience by enabling seamless transitions between different services.</li></ul><p>💫 <strong>Ease of Maintenance</strong></p><ul><li>Makes code maintenance and updates easier due to its modular structure.</li></ul><p>This library offers developers a more flexible and sustainable solution, enhancing both the compatibility and user experience of their applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k4r18nYbrlB8lsnw" /><figcaption>Photo by <a href="https://unsplash.com/@marvelous?utm_source=medium&amp;utm_medium=referral">Marvin Meyer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What Are We Currently Working On in the Project?</h3><p>💥 <strong>New Kit Integrations</strong></p><ul><li>We are working on integrating various new kits into the project.</li><li>By utilizing each kit’s APIs and features, we are making the project more functional.</li><li>We conduct tests after integration to ensure that the kits work correctly.</li></ul><p>💥 <strong>Version Updates</strong></p><ul><li>We are updating the versions of existing kits to the latest versions.</li><li>We integrate the changes and innovations brought by the new versions into the project.</li><li>Security patches and performance improvements from version updates are included in the project.</li></ul><p>💥 <strong>Updating the README File</strong></p><ul><li>We add all the changes and innovations made in the project to the README file.</li><li>We provide information about newly added kits, version updates, and integration processes.</li><li>We carefully organize the README file so that users can easily access the most up-to-date information about the project.</li></ul><p>💥 <strong>Documentation</strong></p><ul><li>We write explanations with Kdoc documents that describe the functionality of each method, class, and package.</li><li>These documents help developers better understand the code and maintain the project more easily.</li><li>We create materials, like this article, about the implementations, changes, and innovations made in the project.</li><li>We hope that this preparation will be helpful for users and developers to be aware of new features and kits.</li></ul><p>Through all these efforts, we aim to make the project more comprehensive and user-friendly.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fdl5zvKLJg1WkE%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fstudio-ghibli-spirited-away-dl5zvKLJg1WkE&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcW9haWhjbGl4bTMybzR6a2hra2JybWp0N28wMnl4YmhzZjIxaDRlciZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fdl5zvKLJg1WkE%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="248" frameborder="0" scrolling="no"><a href="https://medium.com/media/e4f51eda52287c9d25d013d451a4466c/href">https://medium.com/media/e4f51eda52287c9d25d013d451a4466c/href</a></iframe><h3>CMS DEMO: Using Kits with the CMS Library</h3><p>With the CMS DEMO project, we aim to make the use of this library more understandable and accessible.</p><p>In this project, we provide practical examples using the most common and fundamental features of the kits. For instance, we perform simple ad integrations with the Ads Kit, display maps with the Map Kit, and use location data for location detection and navigation with the Location Kit. This helps developers learn how to use the basic functions of the kits.</p><p>Our goal is to facilitate the integration of the CMS library for those who want to use it and provide ready-made solutions they can use in their projects. With CMS DEMO, developers will be able to quickly and effectively implement features that add value to their projects while discovering the potential of the kits.</p><p>🎯 You can access the GitHub repositories of our projects from the references section.</p><h3>Benefits of the Demo Project</h3><p>💙 <strong>Real-World Testing</strong>: It allows us to test the CMS library in real-world scenarios and validate its functionality.</p><p>💙 <strong>Improvement and Refactoring</strong>: The demo project helps us identify shortcomings and areas for improvement in the CMS library, allowing us to make necessary adjustments.</p><p>💙 <strong>Bug Detection and Resolution</strong>: We can quickly identify and fix bugs that arise during the project.</p><p>💙 <strong>Documentation Development</strong>: By anticipating issues users may encounter, we can create more comprehensive and explanatory documentation.</p><p>💙 <strong>Testing New Features</strong>: We can test the integration and impact of newly added features, increasing stability.</p><p>💙 <strong>Ensuring Project Compatibility</strong>: By checking compatibility with different devices and services, we can ensure the CMS library works seamlessly across a wide range of environments.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FxYMTfc3UFuqKTS0NP0%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ftiff-studio-ghibli-the-wind-rises-xYMTfc3UFuqKTS0NP0&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExYWJyNXl3OHY2eGo3emp3cWlnd2Z5MXpib3dxZXo4MDV3eTBqa3dyNiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FxYMTfc3UFuqKTS0NP0%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/65541d527271149498a42636d64d0cf1/href">https://medium.com/media/65541d527271149498a42636d64d0cf1/href</a></iframe><h3>Result</h3><p>The CMS library simplifies the development process by allowing developers to use various services through a single library. This open-source library aims to provide diversity and flexibility in mobile applications.</p><p>CMS DEMO helps developers easily use and integrate the CMS library into their projects. We hope this article assists you in making your projects more user-friendly and comprehensive 😊</p><h3>References</h3><ul><li><a href="https://github.com/Explore-In-HMS/common-mobile-services">GitHub - Explore-In-HMS/common-mobile-services: It is a library that provides a common interface for mobile services for Android developers. Its aim is removing special mobile service dependencies for your app code.</a></li><li><a href="https://github.com/Explore-In-HMS/common-mobile-services-demo">GitHub - Explore-In-HMS/common-mobile-services-demo: Common Mobile Services Demo Usage Project</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b46beb66564" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/one-library-double-power-integrate-huawei-and-google-services-with-cms-5b46beb66564">One Library, Double Power: Integrate Huawei and Google Services with CMS</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Build Sistemi Nasıl Yapılandırılır?]]></title>
            <link>https://medium.com/huawei-developers-tr/android-build-sistemi-nas%C4%B1l-yap%C4%B1land%C4%B1r%C4%B1l%C4%B1r-5e28c7b72c20?source=rss-e23c102a508a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e28c7b72c20</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[gradle]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[hms]]></category>
            <dc:creator><![CDATA[Feyza Ürkut]]></dc:creator>
            <pubDate>Thu, 27 Jun 2024 13:41:06 GMT</pubDate>
            <atom:updated>2024-07-01T17:21:57.338Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dCAQemRbe66OeiGk" /><figcaption>Photo by <a href="https://unsplash.com/@eilisgarvey?utm_source=medium&amp;utm_medium=referral">Eilis Garvey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Giriş</h3><p>Bu yazımda sizlere modern yazılım geliştirme süreçlerinin vazgeçilmez unsurlarından olan yazılım yapılandırma yönetimi ve derleme araçlarından bahsedeceğim. Android build sistemi üzerinde güncel olarak tercih edilen bu teknolojilerin örneklerini bu yazıda bulabilirsiniz.</p><p>Keyifli okumalarr şimdiden!</p><blockquote><a href="#eff3">1- DSL (Domain Specific Language)</a></blockquote><blockquote><a href="#5743">2- Sürüm Katalogları (Version Catalogs)</a></blockquote><blockquote><a href="#03af">3- HMS Entegrasyonu için Sürüm Kataloglarının Kullanımı</a></blockquote><blockquote><a href="#2443">4- KAPT’den KSP’ye</a></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FfrZXpAY6PltKVreyYc%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fthecoolidge-animation-studio-ghibli-frZXpAY6PltKVreyYc&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExemUwYmV0NjBnYzJvZmx5ZmZiaW90cnBsYzJpdWg2a2k1eW9uOTVtNiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FfrZXpAY6PltKVreyYc%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/4727b39412a6e3184f004b7dd51baac7/href">https://medium.com/media/4727b39412a6e3184f004b7dd51baac7/href</a></iframe><h4>Yazılım Yapılandırma Yönetimi</h4><p>Yazılım projelerinin kaynak kodu, dokümantasyon ve ilgili diğer varlıklarının sürüm kontrolü, değişiklik yönetimi ve yapılandırma bilgilerini yönetmek için kullanılan yöntem ve araçları kapsar. Bu sayede, ekipler karmaşık projelerde bile düzenli ve koordineli bir şekilde çalışabilirler.</p><h4>Derleme Araçları</h4><p>Kaynak kodun çalıştırılabilir bir hale getirilmesi sürecinde devreye girer ve bu süreci otomatikleştirir. İyi yapılandırılmış derleme araçları, yazılımın doğru bir şekilde derlenmesini, test edilmesini ve dağıtılmasını sağlayarak, geliştiricilerin verimliliğini artırır ve hata olasılığını azaltır.</p><p><strong>1. DSL (Domain Specific Language) ile Yapılandırma:</strong></p><ul><li><strong>Groovy DSL:</strong> Gradle gibi araçlarda kullanılan, Groovy dili ile yazılmış yapılandırma dosyaları.</li><li><strong>Kotlin DSL:</strong> Gradle gibi araçlarda kullanılan, Kotlin dili ile yazılmış yapılandırma dosyaları.</li></ul><p><strong>2. Bağımlılık Yönetimi:</strong></p><ul><li><strong>Version Catalogs:</strong> Proje bağımlılıklarının merkezi bir yerde tanımlanmasını sağlayan yapılandırma yöntemi.</li></ul><p><strong>3. Derleme Zamanı İşleme ve Araçlar:</strong></p><ul><li><strong>KAPT (Kotlin Annotation Processing Tool):</strong> Kotlin’de, Java Annotation Processing ile aynı işlemi gerçekleştiren araç.</li><li><strong>KSP (Kotlin Symbol Processing):</strong> Kotlin için özel olarak tasarlanmış, daha hızlı ve verimli bir derleme zamanı işleme aracı.</li></ul><h3><strong>1- DSL (Domain Specific Language)</strong></h3><p>DSL (Domain Specific Language), belirli bir alan veya problem için optimize edilmiş özel bir dil türüdür.</p><h4>1- Groovy DSL</h4><p>Groovy DSL, Groovy programlama dili kullanılarak oluşturulan DSL’lerdir. Groovy, Java Sanal Makinesi (JVM) üzerinde çalışan dinamik bir dildir ve DSL yazmak için oldukça uygun özelliklere sahiptir.</p><pre>// build.gradle dosyası (Groovy DSL kullanarak Gradle yapılandırma)<br>plugins {<br>    id &#39;java&#39;<br>}<br><br>repositories {<br>    mavenCentral()<br>}<br><br>dependencies {<br>    implementation &#39;org.springframework.boot:spring-boot-starter-web&#39;<br>    testImplementation &#39;org.springframework.boot:spring-boot-starter-test&#39;<br>}</pre><h4>2- Kotlin DSL</h4><p>Kotlin DSL, Kotlin programlama dili kullanılarak oluşturulan DSL’lerdir. Kotlin, modern ve statik olarak yazılmış bir JVM dilidir ve DSL yazmak için güçlü özellikler sunar. Gradle gibi yapı araçları, artık yapılandırma dosyaları için Kotlin DSL’yi desteklemektedir.</p><pre>// build.gradle.kts dosyası (Kotlin DSL kullanarak Gradle yapılandırma)<br>plugins {<br>    kotlin(&quot;jvm&quot;) version &quot;1.5.21&quot;<br>}<br><br>repositories {<br>    mavenCentral()<br>}<br><br>dependencies {<br>    implementation(&quot;org.jetbrains.kotlin:kotlin-stdlib&quot;)<br>    testImplementation(&quot;org.jetbrains.kotlin:kotlin-test&quot;)<br>}</pre><blockquote>İki teknolojiyi de aktardıktan sonra, son güncel Android Studio Koala versiyonunda bizlere Kotlin DSL kullanmamızı önerdiğini görebilirsiniz.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Az211ourTYzykeTIoD6E7A.png" /><figcaption>Build Configuration Language</figcaption></figure><h4>📌 Komut dosyası adlandırma</h4><p>Komut dosyası (script file) uzantısı adları, derleme dosyasının yazıldığı dile bağlıdır:</p><ul><li>Groovy’de yazılan Gradle derleme dosyaları, .gradle dosya adı uzantısını kullanır.</li><li>Kotlin’de yazılan Gradle derleme dosyaları .gradle.kts dosya adı uzantısını kullanır.</li></ul><h4>📌 Yöntem çağrılarına parantez ekleyin</h4><p>Groovy, yöntem çağrılarında parantezleri atlamanıza izin verirken, Kotlin bunu gerektirir. Yapılandırmanızı taşımak için bu tür yöntem çağrılarına parantez ekleyin.</p><p>Bu kod, Groovy’de bir ayarın nasıl yapılandırılacağını gösterir:</p><pre>compileSdkVersion 30</pre><p>Bu Kotlin’de yazılan kodun aynısıdır:</p><pre>compileSdkVersion(30)</pre><h4>📌Atama çağrılarına “=” ekleyin</h4><p>Groovy DSL, özellikleri atarken = atama operatörünü atlamanıza izin verir, oysa Kotlin bunu gerektirir. Bu kod, Groovy’de özelliklerin nasıl atanacağını gösterir:</p><pre>java {<br>    sourceCompatibility JavaVersion.VERSION_17<br>    targetCompatibility JavaVersion.VERSION_17<br>}</pre><p>Bu kod, Kotlin’de özelliklerin nasıl atanacağını gösterir:</p><pre>java {<br>    sourceCompatibility = JavaVersion.VERSION_17<br>    targetCompatibility = JavaVersion.VERSION_17<br>}</pre><h3>2- Sürüm Katalogları (Version Catalogs)</h3><p>Gradle 7.0 ile birlikte tanıtılan Version Catalogs, proje bağımlılıklarının merkezi bir yerde tanımlanmasını sağlar. Bu, bağımlılık versiyonlarını yönetmeyi ve paylaşmayı kolaylaştırır.</p><pre>// gradle/libs.versions.toml dosyası<br>[versions]<br>kotlin = &quot;1.5.21&quot;<br>springBoot = &quot;2.5.3&quot;<br><br>[libraries]<br>kotlinStdlib = { module = &quot;org.jetbrains.kotlin:kotlin-stdlib&quot;, version.ref = &quot;kotlin&quot; }<br>springBootStarterWeb = { module = &quot;org.springframework.boot:spring-boot-starter-web&quot;, version.ref = &quot;springBoot&quot; }</pre><pre>// build.gradle.kts dosyası<br>plugins {<br>    kotlin(&quot;jvm&quot;) version libs.versions.kotlin<br>}<br>repositories {<br>    mavenCentral()<br>}<br><br>dependencies {<br>    implementation(libs.kotlinStdlib)<br>    implementation(libs.springBootStarterWeb)<br>}</pre><h3>3- HMS Entegrasyonu için Sürüm Kataloglarının Kullanımı</h3><p>Bu örnekte aşağıdaki adımları takip ederek HMS Map Kit ve Location Kit implementasyonları yapacağız.</p><p>💫 İlgili kod parçalarını devamında bulabilirsiniz</p><ol><li><em>build.gradle.kts (project level): </em><strong>buildscript</strong> &gt; <strong>dependencies</strong> gidin ve AppGallery Connect eklenti yapılandırmasını ekleyin.</li><li><em>settings.gradle.kts:</em> HMS Core SDK için Maven repository adresini yapılandırın.</li><li><em>build.gradle.kts (app level): </em><strong>dependencies </strong>bloğuna yapı bağımlılıklarını ekleyin.</li><li><em>build.gradle.kts (app level): </em>Eklenti yapılandırmasını <strong>plugins </strong>bloğuna ekleyin.</li></ol><ul><li><strong>libs.versions.toml </strong>dosyasında dependency ve pluginleri belirtelim:</li></ul><pre>[versions]<br>...<br>agconnect = &quot;1.9.1.300&quot;<br>agconnect-agcp = &quot;1.7.1.300&quot;<br>gradle = &quot;8.0.0&quot;<br>hmsMap = &quot;6.11.0.304&quot;<br>hmsLocation = &quot;6.12.0.300&quot;<br><br>[libraries]<br>...<br>agconnect-core = { group = &quot;com.huawei.agconnect&quot;, name = &quot;agconnect-core&quot;, version.ref = &quot;agconnect&quot; }<br>agconnect-agcp = { group = &quot;com.huawei.agconnect&quot;, name = &quot;agcp&quot;, version.ref = &quot;agconnect-agcp&quot; }<br>tools-gradle = { group = &quot;com.android.tools.build&quot;, name = &quot;gradle&quot;, version.ref = &quot;gradle&quot; }<br>hms-map-kit = { group = &quot;com.huawei.hms&quot;, name = &quot;maps&quot;, version.ref = &quot;hmsMap&quot; }<br>hms-location-kit = { group = &quot;com.huawei.hms&quot;, name = &quot;location&quot;, version.ref = &quot;hmsLocation&quot; }<br><br>[plugins]<br>androidApplication = { id = &quot;com.android.application&quot;, version.ref = &quot;agp&quot; }<br>jetbrainsKotlinAndroid = { id = &quot;org.jetbrains.kotlin.android&quot;, version.ref = &quot;kotlin&quot; }<br>agconnect = { id = &quot;com.huawei.agconnect&quot;, version.ref = &quot;agconnect-agcp&quot; }</pre><ul><li><strong>build.gradle.kts (app level) </strong>dosyasında gerekli bağımlılıkları ve plugini çağıralım (plugin’i bulmada sorun yaşadığı için id’si ile çağırdık):</li></ul><pre>plugins {<br>    alias(libs.plugins.androidApplication)<br>    alias(libs.plugins.jetbrainsKotlinAndroid)<br>    id(libs.plugins.agconnect.get().pluginId)<br>}<br><br>android {<br>    ...<br>}<br><br>dependencies {<br>    implementation(libs.androidx.core.ktx)<br>    implementation(libs.androidx.appcompat)<br>    implementation(libs.material)<br>    implementation(libs.androidx.activity)<br>    implementation(libs.androidx.constraintlayout)<br>    testImplementation(libs.junit)<br>    androidTestImplementation(libs.androidx.junit)<br>    androidTestImplementation(libs.androidx.espresso.core)<br>    implementation(libs.agconnect.core)<br>    implementation(libs.hms.location.kit)<br>    implementation(libs.hms.map.kit)<br>}</pre><ul><li><strong>build.gradle.kts (project level) </strong>dosyasında ilgili AppGallery Connect plugin classpath’ini veriyoruz:</li></ul><pre>buildscript{<br>    dependencies {<br>        // Add dependencies.<br>        classpath(libs.tools.gradle)<br>        classpath(libs.agconnect.agcp)<br>    }<br>}<br>// Top-level build file where you can add configuration options common to all sub-projects/modules.<br>plugins {<br>    alias(libs.plugins.androidApplication) apply false<br>    alias(libs.plugins.jetbrainsKotlinAndroid) apply false<br>}</pre><ul><li><strong>settings.gradle.kts </strong>dosyasında HMS Core SDK için Maven repository adresini veriyoruz:</li></ul><pre>pluginManagement {<br>    repositories {<br>        google {<br>            content {<br>                includeGroupByRegex(&quot;com\\.android.*&quot;)<br>                includeGroupByRegex(&quot;com\\.google.*&quot;)<br>                includeGroupByRegex(&quot;androidx.*&quot;)<br>            }<br>        }<br>        mavenCentral()<br>        gradlePluginPortal()<br><br>        maven(&quot;https://developer.huawei.com/repo/&quot; )<br>    }<br>}<br>dependencyResolutionManagement {<br>    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)<br>    repositories {<br>        google()<br>        mavenCentral()<br><br>        maven(&quot;https://developer.huawei.com/repo/&quot; )<br>    }<br>}<br><br>rootProject.name = &quot;*&quot;<br>include(&quot;:app&quot;)</pre><h3>4- KAPT’den KSP’ye</h3><p>KAPT (Kotlin Annotation Processing Tool), Kotlin’de Java Annotation Processing (APT) ile aynı işlemi gerçekleştirir. KSP (Kotlin Symbol Processing), daha iyi performans ve Kotlin’in tüm özelliklerini daha etkin kullanma imkanı sunar.</p><p>⭐KSP, Kotlin için özel olarak tasarlandığından, KAPT’a göre daha hızlı ve daha verimlidir.</p><pre>// build.gradle.kts dosyası (KAPT kullanarak)<br>plugins {<br>    kotlin(&quot;jvm&quot;) version &quot;1.5.21&quot;<br>    kotlin(&quot;kapt&quot;) version &quot;1.5.21&quot;<br>}<br><br>dependencies {<br>    implementation(&quot;com.google.dagger:dagger:2.37&quot;)<br>    kapt(&quot;com.google.dagger:dagger-compiler:2.37&quot;)<br>}<br><br>// build.gradle.kts dosyası (KSP kullanarak)<br>plugins {<br>    kotlin(&quot;jvm&quot;) version &quot;1.5.21&quot;<br>}<br><br>dependencies {<br>    implementation(&quot;com.google.dagger:dagger:2.37&quot;)<br>    ksp(&quot;com.google.dagger:dagger-compiler:2.37&quot;)<br>}</pre><h3>Sonuç</h3><p>Yazılım yapılandırma yönetimi ve derleme araçları, modern yazılım geliştirme süreçlerinde kalite, verimlilik ve sürdürülebilirlik açısından kritik bir rol oynar. Bu araçların doğru ve etkin kullanımı, projelerin başarıyla tamamlanmasını ve bakım süreçlerinin kolaylaşmasını sağlar.</p><p>Tüm bu yöntemleri doğru ve etkili bir şekilde kullanarak, projelerimizde gradle işlemlerini otomatikleştirip optimize edebiliriz.</p><p>Yeni yazılarda görüşmek üzere!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FeHQ5BsgBIBIGI%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmovie-film-eHQ5BsgBIBIGI&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExeDcxMDFzeHkxdmVpcDRyeWpxbm1ldjB1c3Q5cmg0ejVwaXF4NTllZSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FeHQ5BsgBIBIGI%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/8df5530b461f8b301f90d49d7fecb80e/href">https://medium.com/media/8df5530b461f8b301f90d49d7fecb80e/href</a></iframe><h3>Referanslar</h3><ul><li><a href="https://developer.android.com/build/migrate-to-kotlin-dsl">Migrate your build configuration from Groovy to Kotlin | Android Studio | Android Developers</a></li><li><a href="https://developer.android.com/build/migrate-to-catalogs">Migrate your build to version catalogs | Android Studio | Android Developers</a></li><li><a href="https://developer.android.com/build/migrate-to-ksp">Migrate from kapt to KSP | Android Studio | Android Developers</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e28c7b72c20" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/android-build-sistemi-nas%C4%B1l-yap%C4%B1land%C4%B1r%C4%B1l%C4%B1r-5e28c7b72c20">Android Build Sistemi Nasıl Yapılandırılır?</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>