<?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 Application Library Engineering Group on Medium]]></title>
        <description><![CDATA[Stories by Application Library Engineering Group on Medium]]></description>
        <link>https://medium.com/@applibgroup?source=rss-93faa5a3015e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MvzDJIcFYVl3k4YBKhdrug.jpeg</url>
            <title>Stories by Application Library Engineering Group on Medium</title>
            <link>https://medium.com/@applibgroup?source=rss-93faa5a3015e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 03:32:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@applibgroup/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 do a FloatingActionButton for HarmonyOS]]></title>
            <link>https://applibgroup.medium.com/how-to-do-a-floatingactionbutton-for-harmonyos-88abd0982d03?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/88abd0982d03</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[floating-action-button]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Thu, 09 Jun 2022 05:15:35 GMT</pubDate>
            <atom:updated>2022-06-09T05:15:35.604Z</atom:updated>
            <content:encoded><![CDATA[<p>Here we are again with another interesting component in the mobile application Ecosystem, it is none other than FloatingActionButton. It represents the primary action in an application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/0*RjX2ZKKGzETZiDHU" /></figure><p>It is this simple circular button that triggers the primary action in your app and changes its appearance as it responds to the button click. In this article, we are going to see the various ways types of FloatingAction buttons and ways to implement them in HarmonyOS.</p><p>In most scenarios you must have seen the floating button in the bottom right corner for easy access, however, this position is not mandatory we can customize the position, color, icon, and the number of sublayers you prefer as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*m0e0n_2ZAyJuR5nVulPBUg.png" /></figure><p>We can also have nested floating buttons which leads to layered floating buttons, in case your app requires more action items then this could be used.</p><p>let’s see the usage of the <strong>FloatingActionButtton </strong>Library in HarmonyOS Mobile App and the setup required.</p><p>If you are new to <strong>HarmonyOS</strong><em> </em>then do check out the articles about HarmonyOS <a href="https://www.harmonyos.com/en/">here</a>.</p><p>More info on the <strong>FloatingActionButtton </strong>library can be found <a href="https://github.com/applibgroup/FloatingActionButtton">here</a></p><h3>Step by Step Implementation</h3><p><strong>1.DevEco Studio</strong></p><p>Here we would be using DevEco studio IDE which is designed exclusively to run HarmonyOS applications, if you haven’t installed one then you can get it from the official link with the SDK. Also, we have a step by step instructions for the environment setup available <a href="https://developer.harmonyos.com/en/develop/deveco-studio">here</a>.</p><p><strong>2. Project Creation</strong></p><p>Once you have the DevEco Studio up running you can create a select a <strong>”File” -&gt; New -&gt; New Project Option</strong>, then you are presented with multiple templates to choose from, select the template as shown below which is Empty Ability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*4vcvRpHj4uiuM_fa.png" /></figure><p>As a next step, you will have to “<strong>Configure the Project</strong>” with the project details, and path and ensure to select</p><ul><li>Language as Java and</li><li>API version to 5</li></ul><p>After the initial setup, you are ready to start working on the application.</p><p><strong>3. Dependency</strong></p><p>Next add the <strong>FloatingActionButtton </strong>Dependency, in order to use the library in your HarmonyOS mobile app, you need to first install it by adding the below dependency in your <strong>entry/build.gradle file.</strong></p><pre>dependencies {<br>    implementation &#39;io.openharmony.tpc.thirdlib:floatingactionbutton:1.0.0&#39;<br>}</pre><p>4. Define layout via XML</p><p>Add the com.github.clans.fab.FloatingActionButton to your layout XML file.</p><pre>&lt;StackLayout<br>    xmlns:ohos=&quot;http://schemas.huawei.com/res/ohos&quot;<br>    ohos:id=&quot;$+id:parent&quot;<br>    ohos:height=&quot;match_parent&quot;<br>    ohos:width=&quot;match_parent&quot;&gt;<br><br>    &lt;com.github.clans.fab.FloatingActionButton<br>        ohos:id=&quot;$+id:fabBtn&quot;<br>        ohos:height=&quot;match_content&quot;<br>        ohos:width=&quot;match_content&quot;<br>        ohos:bottom_margin=&quot;12vp&quot;<br>        ohos:fab_elevation=&quot;4vp&quot;<br>        ohos:image_src=&quot;$media:ic_menu&quot;<br>        ohos:layout_alignment=&quot;bottom|right&quot;<br>        ohos:right_margin=&quot;16vp&quot;/&gt;<br><br>&lt;/StackLayout&gt;</pre><p>5. Now we can add the java API for customization as shown below.</p><pre>@Override<br>    public void onStart(Intent intent) {<br>        super.onStart(intent);<br>        ComponentContainer root_layout = (ComponentContainer)LayoutScatter.getInstance(getContext()).parse(ResourceTable.Layout_slice_home, null, false);<br>        mFab = (FloatingActionButton) mRootId.findComponentById(ResourceTable.Id_fabBtn);<br>    }</pre><p>The below code helps to define the FloatingAction Menu in HarmonyOS</p><p>Add the com.github.clans.fab.FloatingActionMenu to your layout XML file.</p><pre>&lt;com.github.clans.fab.FloatingActionMenu<br>        ohos:id=&quot;$+id:menu_green&quot;<br>        ohos:height=&quot;match_content&quot;<br>        ohos:width=&quot;match_content&quot;<br>        ohos:align_parent_bottom=&quot;true&quot;<br>        ohos:align_parent_right=&quot;true&quot;<br>        ohos:bottom_margin=&quot;10vp&quot;<br>        ohos:left_margin=&quot;10vp&quot;<br>        ohos:menu_animationDelayPerItem=&quot;500&quot;<br>        ohos:menu_colorNormal=&quot;#43A047&quot;<br>        ohos:menu_colorPressed=&quot;#2E7D32&quot;<br>        ohos:menu_icon=&quot;$media:ic_star&quot;<br>        ohos:right_margin=&quot;150vp&quot;<br>        ohos:top_margin=&quot;10vp&quot;<br>        &gt;<br><br>        &lt;com.github.clans.fab.FloatingActionButton<br>            ohos:height=&quot;match_content&quot;<br>            ohos:width=&quot;match_content&quot;<br>            ohos:fab_colorNormal=&quot;#43A047&quot;<br>            ohos:fab_colorPressed=&quot;#2E7D32&quot;<br>            ohos:fab_label=&quot;lorem_ipsum&quot;<br>            ohos:fab_size=&quot;1&quot;<br>            ohos:image_src=&quot;$media:ic_edit&quot;/&gt;<br><br>    &lt;/com.github.clans.fab.FloatingActionMenu&gt;</pre><p>Now we can add the java API for customization as shown below.</p><pre>@Override<br>    public void onStart(Intent intent) {<br>        super.onStart(intent);<br>        ComponentContainer root_layout = (ComponentContainer)LayoutScatter.getInstance(getContext()).parse(com.github.clans.fab.sample.ResourceTable.Layout_slice_menu, null, false);<br>        menuGreen = (FloatingActionMenu) root_layout.findComponentById(ResourceTable.Id_menu_green);<br>    }</pre><h3>List of XML attributes supported for Floating action Button</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*2rDSDyZh98-hB_melPMKwQ.gif" /></figure><p>Let&#39;s see some of the Customising Floating action buttons in action, the first being the loading action button, onclick it gives the loading effect as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIUp6cGaoGGGYrTzQVUMQg.gif" /></figure><p>Until now we have seen the standard floating action button and let&#39;s see some customizations.</p><pre>&lt;com.github.clans.fab.FloatingActionMenu<br>        ohos:id=&quot;$+id:menu_red&quot;<br>        ohos:height=&quot;match_content&quot;<br>        ohos:width=&quot;match_parent&quot;<br>        ohos:align_parent_bottom=&quot;true&quot;<br>        ohos:align_parent_right=&quot;true&quot;<br>        ohos:bottom_padding=&quot;10vp&quot;<br>        ohos:right_margin=&quot;10vp&quot;<br>        ohos:menu_backgroundColor=&quot;#ccffffff&quot;<br>        ohos:menu_fab_size=&quot;normal&quot;<br>        ohos:menu_showShadow=&quot;true&quot;<br>        ohos:menu_shadowColor=&quot;#66000000&quot;<br>        ohos:menu_shadowRadius=&quot;4dp&quot;<br>        ohos:menu_shadowXOffset=&quot;1dp&quot;<br>        ohos:menu_shadowYOffset=&quot;3dp&quot;<br>        ohos:menu_colorNormal=&quot;#DA4336&quot;<br>        ohos:menu_colorPressed=&quot;#E75043&quot;<br>        ohos:menu_colorRipple=&quot;#99FFFFFF&quot;<br>        ohos:menu_animationDelayPerItem=&quot;50&quot;<br>        ohos:menu_icon=&quot;$media:/fab_add&quot;<br>        ohos:menu_buttonSpacing=&quot;0dp&quot;<br>        ohos:menu_labels_margin=&quot;0dp&quot;<br>        ohos:menu_labels_paddingTop=&quot;4dp&quot;<br>        ohos:menu_labels_paddingRight=&quot;8dp&quot;<br>        ohos:menu_labels_paddingBottom=&quot;4dp&quot;<br>        ohos:menu_labels_paddingLeft=&quot;8dp&quot;<br>        ohos:menu_labels_padding=&quot;8dp&quot;<br>        ohos:menu_labels_textColor=&quot;#FFFFFF&quot;<br>        ohos:menu_labels_textSize=&quot;14sp&quot;<br>        ohos:menu_labels_cornerRadius=&quot;3dp&quot;<br>        ohos:menu_labels_colorNormal=&quot;#333333&quot;<br>        ohos:menu_labels_colorPressed=&quot;#444444&quot;<br>        ohos:menu_labels_colorRipple=&quot;#66FFFFFF&quot;<br>        ohos:menu_labels_showShadow=&quot;true&quot;<br>        ohos:menu_labels_singleLine=&quot;false&quot;<br>        ohos:menu_labels_ellipsize=&quot;none&quot;<br>        ohos:menu_labels_maxLines=&quot;-1&quot;<br>        ohos:menu_labels_position=&quot;left&quot;<br>        ohos:menu_openDirection=&quot;up&quot;<br>        ohos:menu_fab_label=&quot;your_label_here&quot;&gt;</pre><pre>&lt;com.github.clans.fab.FloatingActionButton<br>        ohos:id=&quot;$+id:fab1&quot;<br>        ohos:height=&quot;match_content&quot;<br>        ohos:width=&quot;match_content&quot;<br>        ohos:fab_label=&quot;Call&quot;<br>        ohos:fab_size=&quot;1&quot;<br>        ohos:image_src=&quot;$media:ic_call_white_24dp&quot;/&gt;<br><br><br>    &lt;com.github.clans.fab.FloatingActionButton<br>        ohos:id=&quot;$+id:fab2&quot;<br>        ohos:height=&quot;match_content&quot;<br>        ohos:width=&quot;match_content&quot;<br>        ohos:fab_label=&quot;Message&quot;<br>        ohos:fab_size=&quot;1&quot;<br>        ohos:image_src=&quot;$media:ic_chat_white_24dp&quot;/&gt;<br><br>    &lt;com.github.clans.fab.FloatingActionButton<br>        ohos:id=&quot;$+id:fab3&quot;<br>        ohos:height=&quot;match_content&quot;<br>        ohos:width=&quot;match_content&quot;<br>        ohos:fab_label=&quot;Delete&quot;<br>        ohos:fab_size=&quot;1&quot;<br>        ohos:image_src=&quot;$media:ic_delete_forever_white_24dp&quot;/&gt;</pre><pre>&lt;/com.github.clans.fab.FloatingActionMenu&gt;</pre><p>Below the output from the above code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/0*q6mEbqdY9qg4B-yp.gif" /></figure><p>I think FloatingAction Button is one of the simple, smallest and at the same time most intricating features, if used efficiently we can create powerful components on the Application side.</p><p>More info on the FloatingAction library can be found <a href="https://github.com/applibgroup/FloatingActionButtton">here</a></p><p>Check out more articles on HarmonyOS <a href="https://medium.com/@applibgroup">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88abd0982d03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calendar ListView in HarmonyOS]]></title>
            <link>https://applibgroup.medium.com/calendar-listview-in-harmonyos-4b80b40cbff4?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b80b40cbff4</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[listview]]></category>
            <category><![CDATA[calendar]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Wed, 20 Apr 2022 10:12:37 GMT</pubDate>
            <atom:updated>2022-04-20T10:12:37.507Z</atom:updated>
            <content:encoded><![CDATA[<p>Calendar plays an important part in Application development, every app needs a calendar to book slots or appointments. In those cases, the entire app is solely dependent on the calendar factor from booking, notifications, and viewing dates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/0*RKCRsszHS3dNwpl5.gif" /></figure><p>In this article, we will walk through about CalendarListView Library and how to implement the CalendarListView in HarmonyOS or how to utilize it to the maximum under various scenarios.</p><p>The CalendarListView library consists of two many features one being the <strong>CalendarList </strong>and the other being the <strong>DatePicker</strong>. This is just not a normal picker it consists of day, month, and year in the Custom user interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/0*TCGhY4aAX3VYleu9.gif" /></figure><p>let’s see the usage of the CalendarListview Library in HarmonyOS Mobile App and the setup required.</p><p>If you are new to <strong>HarmonyOS</strong><em> </em>then do check out the articles about HarmonyOS <a href="https://www.harmonyos.com/en/">here</a>.</p><p>More info on the CalendarListview library can be found <a href="https://github.com/applibgroup/CalendarListview">here</a></p><h3>Step by Step Implementation</h3><p><strong>1.DevEco Studio</strong></p><p>Here we would be using DevEco studio IDE which is designed exclusively to run HarmonyOS applications, if you haven’t installed one then you can get it from the official link with the SDK. Also, we have a step by step instructions for the environment setup available <a href="https://developer.harmonyos.com/en/develop/deveco-studio">here</a>.</p><p><strong>2. Project Creation</strong></p><p>Once you have the DevEco Studio up running you can create a select a <strong>”File” -&gt; New -&gt; New Project Option</strong>, then you are presented with multiple templates to choose from, select the template as shown below which is Empty Ability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*aP0UfnHcmZkp20Wo.png" /></figure><p>As a next step, you will have to “<strong>Configure the Project</strong>” with the project details, path and ensure to select</p><ul><li>Language as Java and</li><li>API version to 5</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*-OlWZlIMa8YMIoePt0WcHg.png" /></figure><p>After the initial setup, you are ready to start working on the application.</p><p><strong>3. Dependency</strong></p><p>Next add the CalendarListView Dependency, in order to use the library in your HarmonyOS mobile app, you need to first install it by adding the below dependency in your <strong>entry/build.gradle file.</strong></p><pre>implementation &#39;io.openharmony.tpc.thirdlib:CalendarListview:1.0.2&#39;</pre><p>4. Define layout via XML</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;com.andexert.calendarlistview.library.DayPickerView<br>    xmlns:ohos=&quot;http://schemas.huawei.com/res/ohos&quot;<br>    ohos:id=&quot;$+id:pickerView&quot;<br>    ohos:height=&quot;match_parent&quot;<br>    ohos:width=&quot;match_parent&quot;<br>/&gt;</pre><p>5. Now we can add the java API for customization as shown below.</p><pre>dayPickerView = (DayPickerView) findComponentById(ResourceTable.Id_pickerView);<br>dayPickerView.setController(new DatePickerController() {<br>    @Override<br>    public int getMaxYear() {<br>        return 2023;<br>    }<br><br>    @Override<br>    public void onDayOfMonthSelected(int year, int month, int day) {<br>    }<br><br>    @Override<br>    public void onDateRangeSelected(SimpleMonthAdapter.SelectedDays&lt;SimpleMonthAdapter.CalendarDay&gt; selectedDays) {<br><br>    }<br>});</pre><p>We have a set of public method that could be used as listed below.</p><ul><li>getDaysInMonth()</li><li>getMaxYear()</li><li>onDayOfMonthSelected()</li><li>onDateRangeSelected()</li><li>setController()</li><li>getSelectedDays()</li><li>setDay()</li><li>getDate()</li><li>SelectedDays</li></ul><h3>List of XML attributes supported for CalendarListview</h3><p>Below is the list of XML attributes that are supported by the library</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-t8Xv_yH7lj6r3VKXQ7wdQ.png" /></figure><p>The first use case is the color change of the current date, using the below snippet.</p><ul><li>Add the property — <strong>ohos:colorCurrentDay </strong>with the required color.</li></ul><pre>&lt;com.andexert.calendarlistview.library.DayPickerView<br>    xmlns:ohos=&quot;http://schemas.huawei.com/res/ohos&quot;<br>    ohos:id=&quot;$+id:pickerView&quot;<br>    ohos:height=&quot;match_parent&quot;<br>    ohos:width=&quot;match_parent&quot;<br>    ohos:colorCurrentDay=&quot;#00ff04&quot;/&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*ewHDq5i2I2CTXqsMD6yHQg.png" /></figure><p>The second use case is to change the color of the selected date, using the below snippet.</p><ul><li>Add the property — <strong>ohos:colorSelectedDayText </strong>with the required color.</li></ul><pre>&lt;com.andexert.calendarlistview.library.DayPickerView<br>    xmlns:ohos=&quot;http://schemas.huawei.com/res/ohos&quot;<br>    ohos:id=&quot;$+id:pickerView&quot;<br>    ohos:height=&quot;match_parent&quot;<br>    ohos:width=&quot;match_parent&quot;<br>    ohos:colorCurrentDay=&quot;#00ff04&quot;<br>    ohos:colorSelectedDayText=&quot;#c300ff&quot;<br>    /&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*XKXGXWxb8C8y3udDDGFHBA.png" /></figure><p>You get the above display on the emulator.</p><p>The third use case is to change the color of the displayed month, using the below snippet.</p><ul><li>Add the property —<strong> ohos:colorMonthName </strong>with the required color.</li></ul><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;com.andexert.calendarlistview.library.DayPickerView<br>    xmlns:ohos=&quot;http://schemas.huawei.com/res/ohos&quot;<br>    ohos:id=&quot;$+id:pickerView&quot;<br>    ohos:height=&quot;match_parent&quot;<br>    ohos:width=&quot;match_parent&quot;<br>    ohos:colorCurrentDay=&quot;#00ff04&quot;<br>    ohos:colorSelectedDayText=&quot;#c300ff&quot;<br>    ohos:colorMonthName=&quot;#89c940&quot;<br>    /&gt;</pre><p>By using the above snippet you get the below display on the emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*QF6KcahKLloGgSxjyL8MOw.png" /></figure><p>By now you must have got an idea of how to use CalendarListviewLayout in HarmonyOS and how to add variations like changing colors on the selected date or range of dates, months.</p><p>More info on the CalendarListview library can be found <a href="https://github.com/applibgroup/CalendarListview">here</a></p><p>Check out more articles on HarmonyOS <a href="https://medium.com/@applibgroup">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b80b40cbff4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explore DialogV3 in HarmonyOS]]></title>
            <link>https://applibgroup.medium.com/explore-dialogv3-in-harmonyos-37c9770f2b40?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/37c9770f2b40</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[harmony]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[dialog]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Thu, 17 Feb 2022 11:18:55 GMT</pubDate>
            <atom:updated>2022-02-17T11:18:55.413Z</atom:updated>
            <content:encoded><![CDATA[<p>An overview of the <strong>DialogV3 </strong>library in <strong>HarmonyOS</strong> and deep dive on various available <strong>DialogV3 formats</strong>.</p><h3><strong>Introduction</strong></h3><p>Have you ever created dialogs and found them boring or not visually appealing, and always looked on customizing these dialogs, then we have got you covered in this article.</p><p>One-Stop solution to display the various style, themes of dialogs, with styles ranging from <strong>iOS, Material, MIUI,</strong> and the dialog types like <strong>Dialog Box, Tips, Bottom Menu</strong>.</p><p>Also, we have <strong>Kongzue themes Dialog V3</strong> which provides a fully customizable dialog box style for the quick and easy realization of special effects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*jfq5G81kjd0raB94.gif" /><figcaption>Kongzue themes</figcaption></figure><h3><strong>Background</strong></h3><p>First, let’s understand Kongzue’s Dialog and how this led to the creation of DialogV3 in HarmonyOS. Kongzue’s Dialog has pop-up styles that provide the simplest way to invoke a message box, a selection box, an input box, await prompt, a warning prompt, a completion prompt, an error prompt, and so on.</p><p>You can find more info on the Konguzue dialog <a href="https://github.com/kongzue/Dialog/">here</a>.</p><p>Below are some of the listed available themes and their view in HarmonyOS.</p><p><strong>iOS theme</strong></p><p>iOS theme dialog box in light and dark modes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*5VyUB9X7b5WYeqMg.gif" /><figcaption>iOS Theme</figcaption></figure><p><strong>Material theme</strong></p><p>The material Theme dialog box in light and dark modes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*jcPKwPuR5-mRcDxA.gif" /><figcaption>Material theme</figcaption></figure><p><strong>MIUI theme</strong></p><p>MIUI theme dialog box in light and dark modes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*la-waiZcMgm3Q8U3.gif" /><figcaption>MIUI theme</figcaption></figure><p>Let’s dive deep into how to implement this in <strong>HarmonyOS</strong>.</p><h3>Step by Step Implementation</h3><p><strong>Step 1</strong>: Here we would be using <strong>DevEco studio IDE</strong> which is designed exclusively to run HarmonyOS applications, if you haven’t installed one then you can get it from the official link with the SDK. Also, we have a step by step instructions for the environment setup available <a href="https://github.com/applibgroup/applibgroup/wiki/HarmonyOS-Environment-Setup">here</a>.</p><p><strong>Step 2</strong>: Once you have the DevEco Studio up running you can create a select a <strong>“File” -&gt; New -&gt; New Project Option,</strong> then you are presented with multiple templates to choose from, select the template as shown below which is <strong>Empty Ability.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*3phKPgXqrYkPjfRc.PNG" /><figcaption>Ability Template</figcaption></figure><p>While setting up the project ensure to select the <strong>language as Java and API version 5.</strong></p><p>• Language as Java and</p><ul><li>API version to 5</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*ePFDvwXAoq5omr-_.PNG" /><figcaption>Project Setup</figcaption></figure><p><strong>Step 4:</strong> After the initial setup you are ready to start working on the application.</p><p><strong>Step 5:</strong> Next add the DialogV3 Dependency, in order to use the library in your HarmonyOS mobile app, you need to first install it by adding the below dependency in your entry/build.gradle file.</p><pre>dependencies {</pre><pre>implementation fileTree(dir: &#39;libs&#39;, include: [&#39;*.har&#39;])<br>   implementation &#39;io.openharmony.tpc.thirdlib:DialogV3:1.0.0&#39;<br>   testCompile &#39;junit:junit:4.12&#39;</pre><pre>}</pre><p><strong>Now we will try some use-cases</strong></p><ol><li><strong>Input Dialog Box </strong>— The input dialog box can be used to get input from users or can be used to validate passwords.</li></ol><pre>// set the theme IOS,Material,kongzue or MIUI<br>DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;<br>// set the mode light or dark<br>DialogSettings.theme = DialogSettings.THEME.LIGHT;</pre><pre>// Onclick display the messege<br>InputDialog.build(getContext())<br>//set the prompt messege<br>.setTitle(&quot;prompt&quot;).setMessage(&quot;Please<br>enter the password(123456)&quot;)<br>//set input text to show in prompt messge<br>.setInputText(&quot;111111&quot;)<br>.setOkButton(&quot;ok&quot;, new</pre><pre>OnInputDialogButtonClickListener(){<br>    <a href="http://twitter.com/Override">@Override</a> public boolean onClick(String inputStr)<br>    {<br>        // check validation of input string<br>        if (inputStr.equals(&quot;123456&quot;)) {<br>            TipDialog.show(getContext(), &quot;success!&quot;,<br>                           TipDialog.TYPE.SUCCESS);<br>            return false;<br>        }<br>        else {<br>TipDialog.show(getContext(), &quot;Incorrect<br>password&quot;, TipDialog.TYPE.ERROR);<br>return true;<br>        }<br>    }<br>})<br>.setCancelButton(&quot;cancel&quot;)<br>//Hint for helping user<br>.setHintText(&quot;Please enter the password&quot;)<br>.setInputInfo(new InputInfo()<br>//maximum length of the input string<br>.setMAX_LENGTH(6)<br>)<br>.setCancelable(true)<br>.show(getContext());</pre><p>Below is the output for the <strong>Input Dialog Box.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*bK8T42QfvqgeDhvY.gif" /><figcaption>Input Dialog Box</figcaption></figure><p>2. <strong>Crash DialogBox Display </strong>— The crash dialog box can be used to display when your app is not responding.</p><pre>// set the theme IOS,Material,kongzue or MIUI<br>DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;<br>// set the mode light or dark<br>DialogSettings.theme = DialogSettings.THEME.LIGHT;</pre><pre>// Onclick Wait Dialog crash will apper with messege<br>MessageDialog.show(getContext(), &quot;Tips&quot;, &quot;Crash Messege&quot;, &quot;cancel&quot;)<br>.setMessageTextInfo(new TextInfo().setGravity(TextAlignment.LEFT))<br>.setOnOkButtonClickListener(new OnDialogButtonClickListener() {<br>    <a href="http://twitter.com/Override">@Override</a> public boolean onClick()<br>    {<br>        WaitDialog.show(getContext(),<br>                        &quot;Preparing to crash...&quot;);<br>        WaitDialog.show(getContext(), &quot;Please wait...&quot;);<br>        EventHandler handler = new EventHandler(<br>            EventRunner.getMainEventRunner());<br>handler.postTask(new Runnable() {<br>            <a href="http://twitter.com/Override">@Override</a> public void run()<br>            {<br>getUITaskDispatcher().asyncDispatch(() -&gt; {<br>  TipDialog.show(getContext(), &quot;success&quot;, TipDialog.TYPE.SUCCESS)<br>    .setOnDismissListener(new OnDismissListener() {<br>                        <a href="http://twitter.com/Override">@Override</a> public void onDismiss()<br>                        {<br>                        // jump(MainActivity.class);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*e7sdT7MI2oeh9nHQ.gif" /><figcaption>Crash DialogBox Display</figcaption></figure><p>3. <strong>Share DialogBox Display</strong> — The Share dialog box can be used to share information to the platform available on the user’s device.</p><pre>// set the theme IOS,Material,kongzue or MIUI<br>DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;</pre><pre>// set the mode light or dark<br>DialogSettings.theme = DialogSettings.THEME.LIGHT;</pre><pre>// set the the items to be presesnt in share dialog<br>itemList.add(new ShareDialog.Item(<br>    getContext(), ResourceTable.Media_img_email_ios,<br>    &quot;email&quot;));<br>itemList.add(new ShareDialog.Item(<br>    getContext(), ResourceTable.Media_img_qq_ios, &quot;QQ&quot;));</pre><pre>// Show the shared content<br> ShareDialog.show(getContext(), itemList, (shareDialog, <br> index, item) -&gt; {<br>    toast(&quot;Clicked：&quot; + item.getText());<br>    return false;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*vmpXNncXgSOt2oeu.gif" /><figcaption>Share DialogBox Display</figcaption></figure><p>There are some more uses cases that could be added to this list like</p><p><strong>1. Fully Customize Dialog Display</strong></p><p><strong>2. Content customized Dialog Display</strong></p><p><strong>3. Bottom Menu Dialog Display</strong></p><p><strong>4. Notification Dialog Display</strong></p><p><strong>5. Serialization of Dialog Display</strong></p><p>More of these implementations can be found here in the “<strong>entry</strong>” folder which is the application module.</p><h3>List of public APIs for app developers</h3><p>The public methods are accessible for developers to use the <strong>DialogV3 library</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d815c12283168407c26ebb4e401813de/href">https://medium.com/media/d815c12283168407c26ebb4e401813de/href</a></iframe><h3>Conclusion</h3><p>Until now you have seen multiple uses cases, API details, and the implementation, also got the essence of the powerful library DialogV3 with its implementation in HarmonyOS.</p><p>If you are interested to try dialog functionality in HarmonyOS using the DialogV3 then you should definitely try the above use cases.</p><p>More Information on the library can be found <a href="https://github.com/applibgroup/DialogV3">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37c9770f2b40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HarmonyOS for Android Developers — Part 2]]></title>
            <link>https://medium.com/application-library-engineering-group/harmonyos-for-android-developers-part-2-93070ca6fe8?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/93070ca6fe8</guid>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Tue, 24 Aug 2021 03:07:54 GMT</pubDate>
            <atom:updated>2021-08-24T03:13:53.613Z</atom:updated>
            <content:encoded><![CDATA[<h3>HarmonyOS for Android Developers — Part 2</h3><p>My previous article about HarmonyOS and the importance of it can be checked here, I would suggest you go through this article before starting with this.</p><p><a href="https://applibgroup.medium.com/harmonyos-for-android-developers-part-1-5d80072d0252">HarmonyOS for Android Developers — Part 1</a></p><h3>What does HarmonyOS have to offer for Android Developers?</h3><p>· Devices use it only if it is necessary, like a modular operating system.</p><p>· The modularized decoupled HarmonyOS can be embedded in various devices according to the requirement.</p><p>· Adaptable to a wide variety of devices.</p><p>· A distributed app can be developed via the distributed capability kit in the same way a standalone app is created.</p><p>· Integrated development environment for multi-device development.</p><p>· Multiple languages will be supported by the compiler for unified development.</p><p>Ideally, all the devices connected to a user should be able to benefit from the connectivity capabilities of the hardware, regardless of where the software is installed.</p><p>HarmonyOS helps us to accomplish this goal by creating a fair ecosystem that is capable of full connectivity in any scenario and allows us to achieve a smart ecosystem.</p><h3><strong>Below list down some of the comparison between HarmonyOS and Android</strong></h3><p><strong>What is the equivalent of a AndroidMainifest.xml file?</strong></p><p>In Android, an AndroidMainifest.xml file contains information of your package, including components of the application such as activities, services, broadcast receivers, content providers etc. It also includes information related to project such as App name, App Icon, App theme, Permission, app version, sdk version, etc.</p><pre><strong>&lt;manifest</strong></pre><pre>xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>package=&quot;com.org.example&quot;<br>android:versionCode=&quot;1&quot;<br>android:versionName=&quot;1.0&quot; <strong>&gt;</strong></pre><pre><strong>&lt;uses-sdk<br></strong>android:minSdkVersion=&quot;8&quot;<br>android:targetSdkVersion=&quot;15&quot; <strong>/&gt;</strong></pre><pre><strong>&lt;application<br></strong>android:icon=&quot;@drawable/ic_launcher&quot;<br>android:label=&quot;@string/app_name&quot;<br>android:theme=&quot;@style/AppTheme&quot; <strong>&gt;</strong></pre><pre><strong>&lt;activity<br></strong>android:name=&quot;.MainActivity&quot;<br>android:label=&quot;@string/title_activity_main&quot; <strong>&gt;</strong></pre><pre><strong>&lt;intent-filter&gt;<br>&lt;action</strong> android:name=&quot;android.intent.action.MAIN&quot; <strong>/&gt;<br>&lt;category</strong> android:name=&quot;android.intent.category.LAUNCHER&quot; <strong>/&gt;&lt;/intent-filter&gt;</strong></pre><pre><strong>&lt;/activity&gt;<br>&lt;/application&gt;<br>&lt;/manifest&gt;</strong></pre><p>For same in HarmonyOS we have <strong>config.json</strong> file which contains information of your app, api version, module, device configuration, etc. also include information related to project such as App name, App Icon, Permission, etc. for more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/basic-config-file-elements-0000000000034463">check here</a>.</p><pre>{<br>   <strong>&quot;app&quot;</strong>: {<br>     <strong>&quot;bundleName&quot;</strong>: <strong>&quot;com.org.example&quot;</strong>,<br>     <strong>&quot;vendor&quot;</strong>: <strong>&quot;vendorName&quot;</strong>,<br>     <strong>&quot;version&quot;</strong>: {<br>       <strong>&quot;code&quot;</strong>: 1000000,<br>       <strong>&quot;name&quot;</strong>: <strong>&quot;1.0.0&quot;<br>     </strong>},<br>     <strong>&quot;apiVersion&quot;</strong>: {<br>       <strong>&quot;compatible&quot;</strong>: 5,<br>       <strong>&quot;target&quot;</strong>: 5,<br>       <strong>&quot;releaseType&quot;</strong>: <strong>&quot;Release&quot;<br>     </strong>}<br>   },<br>   <strong>&quot;deviceConfig&quot;</strong>: {},<br>   <strong>&quot;module&quot;</strong>: {<br>     <strong>&quot;package&quot;</strong>: <strong>&quot;com.org.example&quot;</strong>,<br>     <strong>&quot;name&quot;</strong>: <strong>&quot;.MyApplication&quot;</strong>,<br>     <strong>&quot;reqPermissions&quot;</strong>: [<br>       {<br>         <strong>&quot;name&quot;</strong>: <strong>&quot;ohos.permission.VIBRATE&quot;</strong>,<br>         <strong>&quot;reason&quot;</strong>: <strong>&quot;vibration&quot;</strong>,<br>         <strong>&quot;usedScene&quot;</strong>: {<br>           <strong>&quot;ability&quot;</strong>: [<br>             <strong>&quot;.MainAbility&quot;<br>           </strong>],<br>           <strong>&quot;when&quot;</strong>: <strong>&quot;inuse&quot;<br>         </strong>}<br>       }<br>     ],<br>     <strong>&quot;deviceType&quot;</strong>: [<br>       <strong>&quot;phone&quot;<br>     </strong>],<br>     <strong>&quot;abilities&quot;</strong>: [<br>       {<br>         <strong>&quot;skills&quot;</strong>: [<br>           {<br>             <strong>&quot;entities&quot;</strong>: [<br>               <strong>&quot;entity.system.home&quot;<br>             </strong>],<br>             <strong>&quot;actions&quot;</strong>: [<br>               <strong>&quot;action.system.home&quot;<br>             </strong>]<br>           }<br>         ],<br>         <strong>&quot;orientation&quot;</strong>: <strong>&quot;unspecified&quot;</strong>,<br>         <strong>&quot;name&quot;</strong>: <strong>&quot;com.org.example.MainAbility&quot;</strong>,<br>         <strong>&quot;icon&quot;</strong>: <strong>&quot;$media:icon&quot;</strong>,<br>         <strong>&quot;description&quot;</strong>: <strong>&quot;$string:mainability_description&quot;</strong>,<br>         <strong>&quot;label&quot;</strong>: <strong>&quot;$string:app_name&quot;</strong>,<br>         <strong>&quot;type&quot;</strong>: <strong>&quot;page&quot;</strong>,<br>         <strong>&quot;launchType&quot;</strong>: <strong>&quot;standard&quot;<br>       </strong>}<br>     ]<br>   }<br> }</pre><p>As you have seen, both the files are containing all the details needed by the OS system about the application. But you have seen one major difference between this two files that is AndroidManifest.xml is in xml format and config.json is in json format. So below is some comparison between important elements</p><p><strong>1.</strong> <strong>Versions details</strong></p><p>In AndroidManifest.xml file, you have to put version details in &lt;manifest&gt; tag and sdk version put in &lt;uses-sdk&gt; tag.</p><pre>&lt;manifest <br> android:versionCode=&quot;1&quot;<br> android:versionName=&quot;1.0&quot; &gt;<br> <br> &lt;uses-sdk<br>     android:minSdkVersion=&quot;16&quot;<br>     android:targetSdkVersion=&quot;30&quot; /&gt;<br> &lt;/manifest&gt;</pre><p>In config.json file, you have to put version details in app object.</p><pre>&quot;app&quot;: {<br>   &quot;version&quot;: {<br>     &quot;code&quot;: 101,<br>     &quot;name&quot;: &quot;1.0.0&quot;<br>   },<br>   &quot;apiVersion&quot;: {<br>     &quot;compatible&quot;: 5,<br>     &quot;target&quot;: 5,<br>     &quot;releaseType&quot;: &quot;Release&quot;<br>   }<br> }</pre><p><strong>2.</strong> <strong>Package</strong></p><p>In AndroidManifest.xml file, you have to put package name in root tag that is &lt;manifest&gt; tag.</p><pre>&lt;manifest<br> package=&quot;com.org.example&quot;&gt;<br>     ...<br> &lt;/manifest&gt;</pre><p>In config.json file, you have to put package name in module object.</p><pre>&quot;module&quot;: {<br>     &quot;package&quot;: &quot;com.orzangleli.radarview</pre><pre>}</pre><p><strong>3.</strong> <strong>Application details</strong></p><p>In AndroidManifest.xml file, you have to put application details under &lt; application&gt; tag.</p><pre>&lt;application<br>     android:name=&quot;.MainApplication&quot;<br>     android:allowBackup=&quot;true&quot;<br>     android:icon=&quot;@drawable/logo&quot;<br>     android:label=&quot;@string/app_name&quot;<br>     android:supportsRtl=&quot;true&quot;<br>     android:theme=&quot;@style/AppTheme&quot;&gt;<br> …</pre><pre>…<br> &lt;/application&gt;</pre><p>In config.json file, you have to put application details in multiple object deviceConfig and module.</p><pre>&quot;deviceConfig&quot;: {<br>   &quot;default&quot;: {<br>     &quot;supportBackup&quot;: false,<br>     &quot;network&quot;: {<br>       &quot;cleartextTraffic&quot;: true,<br>       &quot;securityConfig&quot;: {<br>         &quot;domainSettings&quot;: {<br>           &quot;cleartextPermitted&quot;: true,<br>           &quot;domains&quot;: [<br>             {<br>               &quot;subdomains&quot;: true,<br>               &quot;name&quot;: &quot;example.ohos.com&quot;<br>             }<br>           ]<br>         }<br>       }<br>     }<br>   }<br> },<br> &quot;module&quot;: {<br>   &quot;package&quot;: &quot;com.orzangleli.radarview&quot;,<br>   &quot;name&quot;: &quot;.MyApplication&quot;,<br>   &quot;deviceType&quot;: [<br>     &quot;phone&quot;<br>   ],<br>   &quot;colorMode&quot;: &quot;light&quot;<br> }</pre><p>4. <strong>Activities and Services</strong></p><p>In AndroidManifest.xml file, you have to register Activities and Services under &lt;application&gt; tag with &lt;activity&gt; and &lt;service&gt; tag respective.</p><pre>&lt;application<br>     android:icon=&quot;@drawable/app_icon&quot;<br>     android:label=&quot;@string/app_name&quot; &gt;<br>     &lt;activity<br>         android:label=&quot;@string/activity_title&quot;<br>         android:name=&quot;.MainActivity&quot; &gt;<br>         &lt;intent-filter &gt;<br>             &lt;action          android:name=&quot;android.intent.action.MAIN&quot; /&gt;<br> <br>             &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;<br>         &lt;/intent-filter&gt;<br>     &lt;/activity&gt;</pre><pre>&lt;service <br>         android:name=&quot;.MyService&quot;<br>         android:exported=&quot;true&quot;<br>         /&gt;<br> &lt;/application&gt;</pre><p>In HarmonyOS, the equivalent of Activity and Service is Ability. So in config.json file you have to register all the abilities under module object as <strong>abilities </strong>json array. And you can set type(i.e. Page, Service) of ability using <strong>type</strong> attribute.</p><pre>&quot;module&quot;: {<br>   …<br>   &quot;abilities&quot;: [<br>     {<br>       &quot;name&quot;: &quot;.MainAbility&quot;,<br>       &quot;description&quot;: &quot;himusic main ability&quot;,<br>       &quot;icon&quot;: &quot;$media:ic_launcher&quot;,<br>       &quot;label&quot;: &quot;HiMusic&quot;,<br>       &quot;launchType&quot;: &quot;standard&quot;,<br>       &quot;orientation&quot;: &quot;unspecified&quot;,<br>       &quot;permissions&quot;: [<br>       ],<br>       &quot;visible&quot;: true,<br>       &quot;skills&quot;: [<br>         {<br>           &quot;actions&quot;: [<br>             &quot;action.system.home&quot;<br>           ],<br>           &quot;entities&quot;: [<br>             &quot;entity.system.home&quot;<br>           ]<br>         }<br>       ],<br>       &quot;type&quot;: &quot;page&quot;<br>     },<br>     {<br>       &quot;name&quot;: &quot;.MyService&quot;,<br>       &quot;description&quot;: &quot;himusic play ability&quot;,<br>       &quot;icon&quot;: &quot;$media:ic_launcher&quot;,<br>       &quot;label&quot;: &quot;My Service&quot;,<br>       &quot;launchType&quot;: &quot;standard&quot;,<br>       &quot;orientation&quot;: &quot;unspecified&quot;,<br>       &quot;visible&quot;: false,<br>       &quot;skills&quot;: [<br>         {<br>           &quot;actions&quot;: [<br>             &quot;action.play.music&quot;,<br>             &quot;action.stop.music&quot;<br>           ],<br>           &quot;entities&quot;: [<br>             &quot;entity.audio&quot;<br>           ]<br>         }<br>       ],<br>       &quot;type&quot;: &quot;service&quot;<br>     }<br>   ] <br> }</pre><p>5. <strong>Permission</strong></p><p>In AndroidManifest.xml file, you have add permission under &lt; manifest &gt; tag using &lt; uses-permission&gt; tag.</p><pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;</pre><pre>package=&quot;com.org.example&quot;&gt;<br> <br>     &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;<br>     &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;<br>     &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot;/&gt;<br> <br> …<br> <br> &lt;/manifest&gt;</pre><p>In config.json file, you have to add permission under module object as <strong>reqPermissions </strong>json array.</p><pre>&quot;module&quot;: {<br>   &quot;package&quot;: &quot;com.org.example&quot;,<br>   &quot;name&quot;: &quot;.MyApplication&quot;,<br>   &quot;reqPermissions&quot;: [<br>     {<br>       &quot;name&quot;: &quot;ohos.permission.READ_MEDIA&quot;,<br>       &quot;reason&quot;: &quot;reading files&quot;,<br>       &quot;usedScene&quot;: {<br>         &quot;ability&quot;: [<br>           &quot;.MainAbility&quot;<br>         ],<br>         &quot;when&quot;: &quot;always&quot;<br>       }<br>     },<br>     {<br>       &quot;name&quot;: &quot;ohos.permission.WRITE_MEDIA&quot;,<br>       &quot;reason&quot;: &quot;writing files&quot;,<br>       &quot;usedScene&quot;: {<br>         &quot;ability&quot;: [<br>           &quot;.MainAbility&quot;<br>         ],<br>         &quot;when&quot;: &quot;always&quot;<br>       }<br>     },<br>     {<br>       &quot;name&quot;: &quot;ohos.permission.INTERNET&quot;<br>     }<br>   ] <br> }</pre><p><strong>What is equivalent of Activities and it’s lifecycle?</strong></p><p>In Android, an Activity represents a single focused screen with a user interface the user can do. In HarmonyOS you can used <strong>PageAbility</strong> for provide user interface. A Page ability may contain one ability slice or multiple ability slices that provide highly relevant capabilities.</p><pre><strong>public class </strong>MainAbility <strong>extends </strong>Ability {<br><br>    @Override<br><br>    <strong>public void </strong>onStart(Intent intent) {<br><br>        <strong>super</strong>.onStart(intent);<br><br>        <strong>super</strong>.setMainRoute(MainAbilitySlice.<strong>class</strong>.getName());<br><br>    }<br><br>}</pre><p>In Android, you can override methods from the Activity to capture lifecycle methods for the activity itself. In HarmonyOS, You can override methods from the Ability to capture lifecycle methods for the page ability. for more details about Page Ability and it’s lifecycle please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ability-page-concept-0000000000033573">check here</a>.</p><p>Below image shows transitions between different lifecycle states of a Page ability and the callbacks to be invoked during the transitions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*iHjq-Fvjh0PfjcSvQhH73w.png" /><figcaption>Transitions between different states in a Page ability’s lifecycle</figcaption></figure><p><strong>What is equivalent of Fragment and it’s lifecycle?</strong></p><p>In Android, A Fragment is a piece of an activity which represents a behavior or a portion of user interface. Fragments are a way to modularize your code, compose sophisticated user interfaces for larger screens, and help scale your application UI. In HarmonyOS you have <strong>Fraction</strong>. A Fraction can be placed in a container (an Ability) as a part of its UI and cannot be used independently. for more details about Fraction and it’s lifecycle please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-references/fraction-0000001059908801"><strong>check here</strong></a>.</p><p>In below example you can see extended Fraction class with all its lifecycle method overrided.</p><pre><strong>public class </strong>MyFraction <strong>extends </strong>Fraction {<br><br>    @Override<br>    <strong>protected </strong>Component onComponentAttached(LayoutScatter scatter, ComponentContainer container, Intent intent) {<br>        <strong>return super</strong>.onComponentAttached(scatter, container, intent);<br>    }<br><br>    @Override<br>    <strong>protected void </strong>onStart(Intent intent) {<br>        <strong>super</strong>.onStart(intent);<br>    }<br><br>    @Override<br>    <strong>protected void </strong>onActive() {<br>        <strong>super</strong>.onActive();<br>    }<br><br>    @Override<br>    <strong>protected void </strong>onInactive() {<br>        <strong>super</strong>.onInactive();<br>    }<br><br>    @Override<br>    <strong>protected void </strong>onForeground(Intent intent) {<br>        <strong>super</strong>.onForeground(intent);<br>    }<br><br>    @Override<br>    <strong>protected void </strong>onBackground() {<br>        <strong>super</strong>.onBackground();<br>    }<br><br>    @Override<br>    <strong>protected void </strong>onStop() {<br>        <strong>super</strong>.onStop();<br>    }<br><br>    @Override<br>    <strong>protected void </strong>onComponentDetach() {<br>        <strong>super</strong>.onComponentDetach();<br>    }<br>}</pre><p><strong>What is equivalent of Services and it’s lifecycle?</strong></p><p>In Android, A service is a component that runs in the background to perform long-running operations such as playing music, handle network transactions, interacting content providers etc. It doesn’t have any UI (user interface). In HarmonyOS you have <strong>Service Ability</strong>. A Service ability is used to run tasks in the background, such as playing music or downloading files. It does not provide a UI for user interaction. for more details about Service Ability and it’s lifecycle please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ability-service-concept-0000000000044457"><strong>check here</strong></a>.</p><p>You can create service ability as follow.</p><pre><strong>public class </strong>ServiceAbility <strong>extends </strong>Ability {<br><br>    @Override<br>    <strong>public void </strong>onStart(Intent intent) {<br>        <strong>super</strong>.onStart(intent);<br>    }<br><br>    @Override<br>    <strong>public void </strong>onCommand(Intent intent, <strong>boolean </strong>restart, <strong>int </strong>startId) {<br>        <strong>super</strong>.onCommand(intent, restart, startId);<br>    }<br><br>    @Override<br>    <strong>public </strong>IRemoteObject onConnect(Intent intent) {<br>        <strong>return super</strong>.onConnect(intent);<br>    }<br><br>    @Override<br>    <strong>public void </strong>onDisconnect(Intent intent) {<br>        <strong>super</strong>.onDisconnect(intent);<br>    }<br><br>    @Override<br>    <strong>public void </strong>onStop() {<br>        <strong>super</strong>.onStop();<br>    }<br><br>}</pre><p>Below image show Transitions between different states in a Service ability’s lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*hRa1NEg8j60rWpDnJgCSHg.png" /><figcaption>Transitions between different states in a Service ability’s lifecycle</figcaption></figure><p><strong>What is the equivalent of a LinearLayout?</strong></p><p>In Android, a LinearLayout is used to lay your widgets out linearly — either horizontally or vertically. In HarmonyOS you have <strong>DirectionalLayout</strong>. Directional layout is used to arrange a group of components horizontally or vertically. For more details please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-layout-directionallayout-0000001050769565"><strong>check here</strong></a>.</p><p>In Android</p><pre>&lt;LinearLayout<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    android:orientation=&quot;vertical&quot;&gt;</pre><p>In HarmonyOS</p><pre>&lt;<strong>DirectionalLayout<br>    ohos:height=&quot;match_content&quot;<br>    ohos:width=&quot;match_parent&quot;<br>    ohos:orientation=&quot;vertical&quot;</strong>&gt;</pre><p><strong>What is the equivalent of a RelativeLayout?</strong></p><p>In Android, A RelativeLayout lays your widgets out relative to each other. In HarmonyOS you have <strong>DependentLayout</strong>. DependentLayout provides more layout modes. You can specify the position of each component relative to other components at the same level or the position relative to the parent component. For more details please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-layout-dependentlayout-0000001050729536"><strong>check here</strong></a>.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</pre><pre>&lt;DependentLayout<br>xmlns:ohos=&quot;http://schemas.huawei.com/res/ohos&quot;<br>ohos:width=&quot;match_content&quot;<br>ohos:height=&quot;match_content&quot;<br>ohos:background_element=&quot;$graphic:color_light_gray_element&quot;&gt;</pre><pre>&lt;Text<br>ohos:id=&quot;$+id:text1&quot;<br>ohos:width=&quot;match_content&quot;<br>ohos:height=&quot;match_content&quot;<br>ohos:left_margin=&quot;15vp&quot;<br>ohos:top_margin=&quot;15vp&quot;<br>ohos:bottom_margin=&quot;15vp&quot;<br>ohos:text=&quot;text1&quot;<br>ohos:text_size=&quot;20fp&quot;<br>ohos:background_element=&quot;$graphic:color_cyan_element&quot;/&gt;</pre><pre>&lt;Text<br>ohos:id=&quot;$+id:text2&quot;<br>ohos:width=&quot;match_content&quot;<br>ohos:height=&quot;match_content&quot;<br>ohos:left_margin=&quot;15vp&quot;<br>ohos:top_margin=&quot;15vp&quot;<br>ohos:right_margin=&quot;15vp&quot;<br>ohos:bottom_margin=&quot;15vp&quot;<br>ohos:text=&quot;end_of text1&quot;<br>ohos:text_size=&quot;20fp&quot;<br>ohos:background_element=&quot;$graphic:color_cyan_element&quot;<br>ohos:end_of=&quot;$id:text1&quot;/&gt;</pre><pre>&lt;/DependentLayout&gt;</pre><p><strong>What is the equivalent of a View in HarmonyOS?</strong></p><p>In Android, the View is the foundation of everything that shows up on the screen. View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.). In HarmonyOS you have <strong>Component</strong> class. Component occupies a rectangular area on the screen and is responsible for drawing and event processing in this area. For more details about Component please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-references/component-0000001054678683"><strong>check here</strong></a>.</p><p>Below image showing View hierarchy (Android).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*6Hx9yXlDiAetYcavPT4gAg.png" /><figcaption>View hierarchy (Android)</figcaption></figure><p>Below image showing Component hierarchy (HMOS).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*GTw9ru1NkV_FszaVYhe63g.png" /><figcaption>Component and ComponentContainer hierarchy (HarmonyOS)</figcaption></figure><p><strong>What is the alternative of a basic UI components (i.e., TextView, EditText, ect) in HarmonyOS?</strong></p><p>In Android, there are some pre-define widgets available for creating user interface such as TextView, EditText, Button, etc. In HarmonyOS also there are some pre-define component available in HMOS sdk.</p><p>Below is the list of alternative for android widgets.</p><p><strong>1.</strong> <strong>TextView -&gt; Text</strong></p><p>In Android, TextView is a UI Component that displays the text to the user on their Display Screen. In HarmonyOS you can use <strong>Text</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-text-0000001050729534"><strong>check here</strong></a>.</p><pre>&lt;<strong>Text<br>     ohos:id=&quot;$+id:text_welcome&quot;<br>     ohos:height=&quot;match_content&quot;<br>     ohos:width=&quot;match_content&quot;<br>     ohos:layout_alignment=&quot;horizontal_center&quot;<br>     ohos:text=&quot;welcome&quot;<br>     ohos:text_size=&quot;26fp&quot;<br>     </strong>/&gt;</pre><p><strong>2.</strong> <strong>EditText -&gt; TextField</strong></p><p>In Android, EditText is a user interface control that allows the users to enter some text. In HarmonyOS you can use <strong>TextField</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-textfield-0000001061125582"><strong>check here</strong></a>.</p><pre>&lt;<strong>TextField<br>    ohos:id=&quot;$+id:input_email&quot;<br>    ohos:height=&quot;match_content&quot;<br>    ohos:width=&quot;match_parent&quot;<br>    ohos:hint=&quot;Enter Email&quot;<br>    ohos:top_margin=&quot;8vp&quot;<br>    ohos:text_size=&quot;16fp&quot;<br>    ohos:padding=&quot;16vp&quot;<br>    ohos:background_element=&quot;$graphic:background_text_field&quot;<br>    ohos:text_input_type=&quot;pattern_text&quot;<br>    </strong>/&gt;</pre><p><strong>3.</strong> <strong>Button -&gt; Button</strong></p><p>In Android, Button is a UI that is used to perform some action as soon as the user clicks on it. In HarmonyOS also have <strong>Button</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-button-0000001051009585"><strong>check here</strong></a>.</p><pre>&lt;<strong>Button<br>    ohos:id=&quot;$+id:btn_login&quot;<br>    ohos:height=&quot;match_content&quot;<br>    ohos:width=&quot;match_content&quot;<br>    ohos:text=&quot;Login&quot;<br>    ohos:layout_alignment=&quot;horizontal_center&quot;<br>    ohos:text_size=&quot;18fp&quot;  <br>    ohos:start_padding=&quot;20vp&quot;<br>    ohos:end_padding=&quot;20vp&quot;<br>    ohos:top_padding=&quot;16vp&quot;<br>    ohos:bottom_padding=&quot;16vp&quot;<br>    </strong>/&gt;</pre><p><strong>4.</strong> <strong>ImageView -&gt; Image</strong></p><p>In Android, ImageView is a view where you can show image. In HarmonyOS you have <strong>Image</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-image-0000001058976860"><strong>check here</strong></a>.</p><pre>&lt;<strong>Image<br>    ohos:id=&quot;$+id:icon&quot;<br>    ohos:height=&quot;200vp&quot;<br>    ohos:width=&quot;200vp&quot;<br>    ohos:image_src=&quot;$media:profile_person&quot;<br>    ohos:scale_mode=&quot;clip_center&quot;<br>    </strong>/&gt;</pre><p>5<strong>.</strong> <strong>Seekbar -&gt; Slider</strong></p><p>In Android, Seekbar is an extended Progress bar. A Seekbar comes with a pointer that is draggable throughout the bar either in left or right. This pointer helps to set the progress as well. This helps the user to choose a particular range of values. In HarmonyOS you have <strong>Slider</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/design/des-guides/slider-0000001053339774"><strong>check here</strong></a>.</p><pre>&lt;<strong>Slider<br>    ohos:id=&quot;$+id:slider&quot;<br>    ohos:width=&quot;match_content&quot;<br>    ohos:height=&quot;40vp&quot;<br>    ohos:max=&quot;4&quot;<br>    ohos:progress=&quot;4&quot; </strong>/&gt;</pre><p><strong>6.</strong> <strong>CheckBox -&gt; CheckBox</strong></p><p>A CheckBox is the UI control that has two states that are either checked or unchecked. If we have a group of CheckBox, we can select as many as we want, unlike RadioGroup. In HarmonyOS also have <strong>CheckBox</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-checkbox-0000001060487804"><strong>check here</strong></a>.</p><pre>&lt;<strong>Checkbox<br>    ohos:height=&quot;match_content&quot;<br>    ohos:width=&quot;match_content&quot;<br>    ohos:text=&quot;Agree&quot;<br>    </strong>/&gt;</pre><p>7. <strong>Switch -&gt; Switch</strong></p><p>In Android, a switch is a two-state UI element that holds either ON or OFF state. ON generally means Yes and OFF means No. By default, a switch is in the OFF state. A user can change its state many times. In HarmonyOS also have <strong>Switch</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-switch-0000001060806006"><strong>check here</strong></a>.</p><pre>&lt;<strong>Switch<br>    ohos:height=&quot;match_content&quot;<br>    ohos:width=&quot;match_content&quot;<br>    ohos:text=&quot;Agree&quot;<br>    ohos:enabled=&quot;false&quot;<br>    </strong>/&gt;</pre><p>8. <strong>Progressbar -&gt; Progressbar, RoundProgressbar</strong></p><p>In Android, we have a progress bar that shows the progress of some action that is happening like pasting a file to some location. A progress bar can be in two modes: a) Determinate Mode, b) Indeterminate Mode.</p><p>In HarmonyOS, you have <strong>Progressbar</strong> and <strong>RoundProgressbar</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-progressbar-0000001060379891"><strong>check here</strong></a>.</p><pre>&lt;<strong>ProgressBar<br>    ohos:id=&quot;$+id:progressbar&quot;<br>    ohos:progress_width=&quot;10vp&quot;<br>    ohos:height=&quot;60vp&quot;<br>    ohos:width=&quot;600vp&quot;<br>    ohos:max=&quot;100&quot;<br>    ohos:min=&quot;0&quot;<br>    ohos:progress=&quot;60&quot;</strong>/&gt;</pre><pre>&lt;<strong>RoundProgressBar<br>     ohos:id=&quot;$+id:round_progress_bar&quot;<br>     ohos:height=&quot;200vp&quot;<br>     ohos:width=&quot;200vp&quot;<br>     ohos:progress_width=&quot;10vp&quot;<br>     ohos:progress=&quot;20&quot;<br>     ohos:progress_color=&quot;#47CC47&quot;</strong>/&gt;</pre><p><strong>9.</strong> <strong>Toast -&gt; ToastDialog</strong></p><p>In Andorid, Toast can be used to display information for the short period of time. A toast contains message to be displayed quickly and disappears after some time. In HarmonyOS you have <strong>ToastDialog</strong>. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-component-toastdialog-0000001060125963"><strong>check here</strong></a>.</p><pre><strong>new </strong>ToastDialog(getContext())<br>        .setText(<strong>&quot;This is a ToastDialog displayed in the middle&quot;</strong>)<br>        .setAlignment(LayoutAlignment.<strong><em>CENTER</em></strong>)<br>        .show();</pre><p><strong>What is the equivalent of a Drawables in HarmonyOS?</strong></p><p>In Android, A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon. There are several different types of drawables: such as Shape Drawable, Vector Drawable, Scale Drawable, ect.</p><p>In HarmonyOS you have <strong>Element</strong>. Element an abstract class of something that can be drawn. When static images need to be displayed in an application, this class and its child classes can be used to draw shapes and images. There are several subclasses which is used as per the type of Element such as ShapeElement, VectorElement, PixelMapElement. For more details <a href="https://developer.harmonyos.com/en/docs/documentation/doc-references/element-0000001054358705"><strong>check here</strong></a>.</p><p><strong>How do I create notification in HarmonyOS?</strong></p><p>In Android, A notification is a message you can display to the user outside of your application. you need to set the notification’s content and channel using a NotificationCompat.Builder object. Also it is compulsory from Android Oreo to create notification channel. And for showing notification you need NotificationManager object.</p><p>Same in HarmonyOS also we have notification for displaying message outside of application. To create notification in HarmonyOS you need NotificationRequest object to set notification’s content, slot(channel) and other details. In HarmonyOS equivalent of NotificationChannel is NotificationSlot. And with the help of NotificationHelper class you can publish your notification. For more details about notification <a href="https://developer.harmonyos.com/en/docs/documentation/doc-references/overview-0000001054358819">check here</a>.</p><pre><em>//Create notification slot.<br> </em>NotificationSlot notificationSlot = new NotificationSlot(&quot;notification_001&quot;, &quot;low priority&quot;, NotificationSlot.<em>LEVEL_LOW</em>);<br> notificationSlot.setEnableVibration(true);<br> notificationSlot.setEnableLight(true);<br> try {<br>     NotificationHelper.<em>addNotificationSlot</em>(notificationSlot);<br> } catch (RemoteException e) {<br>     e.printStackTrace();<br> }<br> <br> <em>//Create notification.<br> </em>NotificationRequest notificationRequest = new NotificationRequest();<br> NotificationRequest.NotificationNormalContent content = new NotificationRequest.NotificationNormalContent();<br> content.setTitle(&quot;Notification&quot;);<br> content.setText(&quot;Hi there&quot;);<br> NotificationRequest.NotificationContent notificationContent = new NotificationRequest.NotificationContent(content);<br> notificationRequest.setTapDismissed(true);<br> notificationRequest.setSlotId(&quot;notification_001&quot;);<br> notificationRequest.setContent(notificationContent);<br> notificationRequest.setIntentAgent(getLaunchAction());<br> try {<br>     NotificationHelper.<em>publishNotification</em>(notificationRequest);<br> } catch (RemoteException e) {<br>     e.printStackTrace();<br> }</pre><pre><em>// Create Intent agent.<br> </em>private IntentAgent getLaunchAction() {<br>     Operation operation = new Intent.OperationBuilder()<br>             .withDeviceId(&quot;&quot;)<br>             .withBundleName(this.getBundleName())<br>             .withAbilityName(&quot;com.huawei.notification.SecondAbility&quot;)<br>             .build();<br>     Intent intent = new Intent();<br>     intent.setOperation(operation);<br>     List&lt;Intent&gt; intentList = new ArrayList&lt;&gt;();<br>     intentList.add(intent);<br>     List&lt;IntentAgentConstant.Flags&gt; flags = new ArrayList&lt;&gt;();<br>     flags.add(IntentAgentConstant.Flags.<em>UPDATE_PRESENT_FLAG</em>);<br>     IntentAgentInfo paramsInfo = new IntentAgentInfo(90, IntentAgentConstant.OperationType.<em>START_ABILITY</em>, flags, intentList, null);<br>     return IntentAgentHelper.<em>getIntentAgent</em>(this, paramsInfo);<br> }</pre><p><strong>How do I Add Animation on any component in HarmonyOS?</strong></p><p>In Android, you either create animations using XML, or call the animate() method on a view. Also using ValueAnimator you have more control over animations and customize them at each step of execution.</p><p>In HarmonyOS, java sdk provides three major classes for animation: FrameAnimationElement, AnimatorValue, AnimatorProperty, and AnimatorGroup. For more details please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/ui-java-animation-0000000000580278">check here</a>.</p><p><strong>What is the equivalent of local database(SQLite) in HarmonyOS?</strong></p><p>In Android, for managing local data of application we have SQLite database and for small amount of data we have SharedPreference where we can store the data in the key-value pairs.</p><p>In HarmonyOS, the Object Relational Mapping (ORM) database is masks operations in structured query language (SQL) in the underlying SQLite database, and provides a series of object-oriented APIs for adding, deleting, modifying, and querying entities and relational data. The ORM is an abstraction layer above the SQLite database. For more details about ORM database please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/database-orm-overview-0000000000030070">check here</a>.</p><p>You can see the workflow of ORM database in below figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*KZXFeKZeQ-4_2pF0bvQf3Q.png" /><figcaption>How the ORM database works</figcaption></figure><p>In HarmonyOS, the equivalent of SharedPreference is Lightweight Preference. In the Lightweight Preference you can store the data in the form of key-value pairs. For more details about Lightweight Preference please <a href="https://developer.harmonyos.com/en/docs/documentation/doc-guides/database-preference-overview-0000000000030086">check here</a>.</p><p>You can see the workflow of Lightweight Preference database in below figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*mP93u8Ttrtz_ZCCEw5cGeg.png" /><figcaption>Working Principles of Lightweight preference database</figcaption></figure><pre>Example of Lightweight Preference database:</pre><pre>Context context = getApplicationContext(); <em>// Storage path of data files: /data/data/{PackageName}/preferences<br> </em>DatabaseHelper databaseHelper = new DatabaseHelper(context);<em>// The input parameter context is of the ohos.app.Context type.<br> </em>String fileName = &quot;test_pref&quot;; <em>// fileName indicates the file name, which cannot be empty or contain a path. The default path can be obtained by calling context.getPreferencesDir().<br> </em>Preferences preferences = databaseHelper.getPreferences(fileName);<br> <br> <em>//Read data<br> </em>int value = preferences.getInt(&quot;intKey&quot;, 0);<br> <br> <em>//Write data<br> </em>preferences.putInt(&quot;intKey&quot;, 3);<br> preferences.putString(&quot;StringKey&quot;, &quot;String value&quot;);<br> preferences.flush();</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93070ca6fe8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/application-library-engineering-group/harmonyos-for-android-developers-part-2-93070ca6fe8">HarmonyOS for Android Developers — Part 2</a> was originally published in <a href="https://medium.com/application-library-engineering-group">Application-Library-Engineering-Group</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HarmonyOS for Android Developers — Part 1]]></title>
            <link>https://medium.com/application-library-engineering-group/harmonyos-for-android-developers-part-1-5d80072d0252?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d80072d0252</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Tue, 24 Aug 2021 03:04:32 GMT</pubDate>
            <atom:updated>2021-08-24T03:08:53.400Z</atom:updated>
            <content:encoded><![CDATA[<h3>HarmonyOS for Android Developers — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/0*jR4ILfCgo4BRJb3e.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/0*_b3Ibk-8cc2WZlu5.png" /></figure><p>Mobile devices such as smartphones and tablets run the Android operating system, which is developed under an <a href="https://gitee.com/openharmony"><strong>open-source</strong></a> and Linux-based model. The Android platform enables developers to develop on a unified platform for developing applications for mobile devices, so their applications are likely to run on different Android-powered devices.</p><p>Whereas on the other hand, a microkernel-based operating system, such as <a href="https://www.harmonyos.com/en/"><strong>HarmonyOS</strong></a>, is considered to be safer and more efficient than hybrid kernel-based operating systems.</p><p>In order to successfully connect with other platforms on its devices, Huawei developed a multi-cloud platform operating system called HarmonyOS.</p><p>In its inception, HarmonyOS has been called an embedded operating system, and is meant for industrial applications or devices that are part of the Internet of Things.</p><p>In addition to being multiplatform operating systems and created by two leading technology companies, Android and HarmonyOS share numerous similarities. In reality, these two platforms are very different.</p><p>HarmonyOS comes with Linux Kernel, Micro Kernel, and Lite OS. The OS consists of multiple kernels to select an appropriate kernel for devices of varying resource capabilities.</p><p><strong>Let us see the architectural diagrams of Android and HarmonyOS:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*Llz4MldNnXpPoF3cfQuNxw.png" /><figcaption>Android Architecture Diagram</figcaption></figure><p>Based on the architecture diagram below, Android consists of a stack of software components that are roughly divided into five sections and four layers.</p><h3>Android Libraries</h3><p>Libraries that are specifically designed for Android usage can be found in this category.</p><p>The following is a summary of some of the key Android libraries available to developers:</p><p><strong>Android. app </strong>− This is the kernel of all Android applications and provides access to the application model.</p><p><strong>Android. content </strong>− Enables applications to access, publish, and message content.</p><p><strong>Android. database</strong> − Contains an SQLite database and management classes where users can access the content.</p><p><strong>android.OpenGL</strong> − API for rendering 3D graphics using OpenGL ES.</p><p><strong>Android. os </strong>− Contains standard operating system services, such as message access, network access, and inter-process communication.</p><p><strong>Android. text</strong> − Renders text and manipulates it on a display device.</p><p><strong>Android. view </strong>− User interface components that make up an application.</p><p><strong>Android. widget </strong>— A component for designing graphical user interfaces that includes elements such as buttons, labels, list views, layout managers, and radio buttons.</p><p><strong>android.WebKit</strong> − Provides a way to incorporate web-browsing functionality into applications.</p><p>The Java-based Android runtime libraries are now covered, and we’ll be looking at the C/C++-based libraries in this layer of the Android stack.</p><h3>Android Runtime</h3><p>Located on bottom of the second layer, this is the third section in the architecture. It provides a key component called Dalvik Virtual Machine, an Android-specific Java Virtual Machine.</p><p>As part of the Android runtime, developers can also use standard Java programming languages to write Android applications.</p><h3>Application Framework</h3><p>As a result of the Application Framework layer, there are many higher-level services available to applications. These services are available to application developers.</p><p>Below is a list of key services provided by the Android framework:</p><p>Activity Manager − Manages the lifecycle and stack of activities for the application.</p><p>Content Providers − Publishes and shares data among applications.</p><p>Resource Manager − Accesses embedded non-code resources such as strings, colors, and user interface layouts.</p><p>Notifications Manager − Shows alerts and notifications when an application is running.</p><p>View System − A user interface created by extending view classes.</p><h3>Applications</h3><p>In the top layer, you’ll find all the Android apps. This layer will be the only one on which you will install your application. Contacts Books, Browsers, Games, etc. are some examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*6gZ_bIup2Aoqp54LD0aTKg.png" /><figcaption>HarmonyOS Architecture Diagram</figcaption></figure><p><a href="https://www.harmonyos.com/en/"><strong>HarmonyOS</strong></a> consists of four layers.</p><p>· Kernel Layer</p><p>· System Service Layer</p><p>· Framework Layer</p><p>· Application Layer</p><h3>Kernel Layer</h3><p>Kernels are foundational layers of operating systems. With HarmonyOS, multiple kernels can be selected for devices with different resource limits. The kernel abstraction layer (KAL) shields differences in Kernel implementations and provides the upper layer with kernel functionality such as management of processes, threads, memory, and file systems, as well as peripheral management.</p><h3>System Service Layer</h3><p>System services enable HarmonyOS to provide applications with services through its framework layer.</p><p><strong>Basic Software Service</strong></p><p>The HarmonyOS provides common and universal features, including events, notifications, and telephony, design, and more In addition to Mobile Sensing Development Platform (MSDP) &amp; Device Virtualization (DV) for X(DFX).</p><h3>Enhanced Software Service</h3><p>Integrates a variety of hardware and software services for HarmonyOS, including those devoted to smart TVs, wearables, and IoT devices.</p><h3>Hardware Service</h3><p>Delivers hardware services aimed at wearables and IoT devices, such as geolocation and biometric recognition.</p><p><strong>Framework Layer</strong></p><p>There are two types of applications in this layer: system applications and third-party applications.</p><p>Web browsers and email clients are examples of software that forms the Application layer. It provides protocols that allow software to receive and send data and present information to users.</p><p>The <a href="https://www.harmonyos.com/en/"><strong>HarmonyOS</strong></a> app benefits from its own set of Feature Abilities (FAs) and Particle Abilities (PAs).</p><p>FAs provide a UI for interacting with users.</p><p>Unlike a UI, PAs process background tasks and provide data access from the background.</p><p>Applications developed based on FAs and PAs are specifically tailored for business characteristics and can schedule and distribute across devices, providing users with a consistent and efficient experience.</p><h3>Issues with the current operating system</h3><p>· Provide seamless user experience.</p><p>· The seamless integration of AI.</p><p>· OS challenges.</p><p>· There are over a million lines of codes.</p><p>· Security concerns arise from the interconnection of multiple devices.</p><p>· Close coupling prevents the sharing of ecosystems.</p><p>Say you are listening to music on your phone, but you can use a speaker in the same room that is more powerful. The same music file can also be played on your phone with better audio quality capabilities. You are not prompted to utilize the best resources on your mobile device. The aim is to integrate devices seamlessly.</p><p>Write applications that are not tailored to a single device, but instead take advantage of virtual devices or virtual resources.</p><p>As HarmonyOS grows, it will benefit consumers, developers, and equipment vendors. With its cutting-edge OS, HarmonyOS powers the next generation of smartphones and IoT (Internet of Things) applications. HarmonyOS offers users an engaging, diverse, and rich experience. Our goal is to build out this new ecosystem by inviting developers from around the world. Our goal is to provide consumers with intelligent experiences wherever they may be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*2mPlijz-HY2yvxtZaDneEA.png" /><figcaption>Complexity of Code Management</figcaption></figure><p>The above figure shows the complexity of code management for different devices code base. Developers have to maintain multiple code base for multiple IOT devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*poUH7hRzw-1YdaMO5bFWkQ.png" /><figcaption>OneHop network connection between Other OS vs Harmony OS</figcaption></figure><p>With other OSs it is difficult in configuring networks for IoT devices due to complex steps and different entries. But with <a href="https://www.harmonyos.com/en/"><strong>HarmonyOS</strong></a> OneHop network connection this will help in automatic configuration as shown in figure.</p><p>Customers, equipment manufacturers, and developers will all reap benefits from HarmonyOS. For next-generation smartphones and internet-of-things (IOT) applications, HarmonyOS is the most advanced OS.</p><p>HarmonyOS aims to provide an engaging and diverse experience to its users. As a result, developers all over the world are encouraged to join and participate in this new ecosystem. Together, these technologies will deliver a seamless consumer experience in all situations.</p><p>Until now we have seen the importance of <strong>HarmonyOS </strong>and in Part 2 which is a continuation we will see the What does HarmonyOS have to offer for Android Developers?</p><h3>Check the next part here</h3><p><a href="https://applibgroup.medium.com/harmonyos-for-android-developers-part-2-93070ca6fe8">HarmonyOS for Android Developers — Part 2</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d80072d0252" width="1" height="1" alt=""><hr><p><a href="https://medium.com/application-library-engineering-group/harmonyos-for-android-developers-part-1-5d80072d0252">HarmonyOS for Android Developers — Part 1</a> was originally published in <a href="https://medium.com/application-library-engineering-group">Application-Library-Engineering-Group</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is 1+8+N and Super Devices?]]></title>
            <link>https://medium.com/application-library-engineering-group/what-is-1-8-n-and-super-devices-976894ce0758?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/976894ce0758</guid>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[comunity]]></category>
            <category><![CDATA[harmony-os]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Wed, 07 Jul 2021 10:40:47 GMT</pubDate>
            <atom:updated>2021-08-12T17:44:32.234Z</atom:updated>
            <content:encoded><![CDATA[<p>We have seen the importance of HarmonyOS and the new release HarmonyOS 2, in which Huawei as planned to release HarmonyOS 2 to nearly <strong>300</strong> million devices. The devices ranging from smartphones, tablets, smart wearables, IoT and devices from third party product manufactures.</p><p>If you would like to know more updates about HarmonyOS 2 you can read the entire article <a href="https://applibgroup.medium.com/whats-new-in-harmonyos-2-fe9d249c76b1">here</a>.</p><p>Well, we have been hearing about Huawei that it likely to include <strong>HarmonyOS</strong> into its <strong>1</strong>+<strong>8</strong>+<strong>N</strong> smart ecosystem strategy, today we will see what is this 1+8+N is all about and its importance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V57LF1rJ76CrfIcbwbRzqA.jpeg" /></figure><p>The above image depicts the<strong> 1+8+N </strong>all scenario smart life Strategy, which could be simplified as “<strong>1+8+N</strong>”.</p><p><strong>“1”</strong> → Refers to the Smartphones which is one of the most frequently and commonly used device on daily basis, which is connecting and controlling the other devices.( which is the center core of the ecosystem).</p><p><strong>“8” </strong>→ Refers to the non-Smartphones products which are used based on the specific scenario and its requirements. Which includes Wearables, Headphones, PC, Tablet, Speakers, AR/VR glasses, Vehicle Mounted Devices and Huawei vision( Middle layer in the image represents the 8).</p><p><strong>“N”</strong> → Represents a wide ecosystem of other smart products like printers, games consoles, smart travel, sports, health , entertainment products and so forth (which is the outer layer from the above image).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*CiU7s-aK4FIw8ZhhIxKclg.png" /></figure><p>So, until now we have seen what exactly <strong>1,8, N </strong>represent but then what is the <strong>“+”</strong> represents?</p><p>The <strong>“+” </strong>between <strong>1</strong> and <strong>8</strong> represent the “<strong>Huawei Share</strong>”, well the next question is what is “Huawei Share”? <strong>Huawei Shar</strong>e is the feature that allows you to turn your smartphone into a real server dedicated to storage, from which you can take files from any device that is connected to the same network.</p><p>The later <strong>“+”</strong> between <strong>8</strong> and <strong>N </strong>represent “<strong>HiLink</strong>” It can be used to search for and manage all <strong>HUAWEI HiLink</strong> terminal devices, also to provide you with a more consistent and simplified management experience.</p><p>Until now we have analyzed about the 1+8+N and its importance and now let’s see what the use of this Strategy or architecture is.</p><p>By using this strategy, we can enable interconnection , interoperability, and the capability of sharing all the devices in all Scenario which is the reason for <strong>HarmonyOS </strong>existence.</p><p>In addition, it can also improve user experience, better ecosystem and maximizes values for the users.</p><p>To explain this with an example, say you are listening to music on your phone however you have a better speaker available in the same room that could be used. which is also capable of playing the same music file with better audio quality capabilities, instead it is played on your phone.</p><p>In this Scenario the 1+8+N strategy comes in effect and decides that speaker is the better device and gives a better user experience seamless with inter device collaboration.</p><p><strong>We have tons of new apps and partnerships announced as Huawei expands the ecosystem and you can find the list of all the uses cases </strong><a href="https://www.huaweicentral.com/huawei-1-8-n-strategy/"><strong>here</strong></a><strong>.</strong></p><p>In this article we will also see what a “<strong>Super Device</strong>” is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*-W4Wbxm_1vztNW-9LCPs8A.png" /><figcaption>SuperDevice</figcaption></figure><p><strong>Super Device</strong> reveals the true power of HarmonyOS and depicts the era of Internet of everything, so what forms a Super device is the combination of Distributed power HarmonyOS and allowing users to connect with different devices.</p><p>This allows users to freely use the capability of its smart devices based on users’ needs.</p><p>For example, if you want to watch a movie at home late at night, all you must do is open the Control Panel and drag the smart screen icon to your phone icon, and the movie jumps directly from your phone to the TV. If you’re wearing your HUAWEI Free Buds 4, you can then drag the earphone icon to the phone icon, at which point the movie will play on your smart screen while rerouting its sound through your Free Buds. This is just one example of the Super Device experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*95HnZrBJXM0C_GOAV7WfZw.png" /></figure><p>In simple words it is a combination of the hardware ecosystem(1+8) that are available, with Solutions/Scenarios ( which represents the N) , along with that we have the HarmonyOS key capabilities like (One Hop network connection, Multi Device interaction and Collaboration) gives rise to <strong>Super Device</strong>.</p><p>Hope you got a fair understanding of what is <strong>1+8+N </strong>and <strong>Super Devices</strong> are and follow us for more updates related <strong>HarmonyOS</strong>. If you think you have learned something, then clap your hands 👏 as many times as you can to show your support!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=976894ce0758" width="1" height="1" alt=""><hr><p><a href="https://medium.com/application-library-engineering-group/what-is-1-8-n-and-super-devices-976894ce0758">What is 1+8+N and Super Devices?</a> was originally published in <a href="https://medium.com/application-library-engineering-group">Application-Library-Engineering-Group</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in HarmonyOS 2]]></title>
            <link>https://medium.com/application-library-engineering-group/whats-new-in-harmonyos-2-fe9d249c76b1?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe9d249c76b1</guid>
            <category><![CDATA[huawei]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[harmony-os]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Fri, 02 Jul 2021 04:24:04 GMT</pubDate>
            <atom:updated>2021-07-02T04:24:04.047Z</atom:updated>
            <content:encoded><![CDATA[<h3>“Make the impossible possible.”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JZYy97a2q5lJK1oeMnsa4w.jpeg" /></figure><p>Another day to be marked in the history of Huawei’s with the launch of <strong><em>HarmonyOS 2</em></strong> and all scenario new products launch.</p><p>Over the past decade we have seen a significant transformation of products, lot of innovations and trend for the phone based like the 5G.</p><p>Huawei’s official <strong>HarmonyOS 2</strong> was released on Wednesday (June 2, 2021) and introduced the second version of the in-house OS. HarmonyOS has been around for a couple of years now, but version 2 brings a major shift in the digital era. it will power phones, tablets and smartwatches, not just smart TVs and you can watch the streamed video <a href="https://www.youtube.com/watch?v=XG3ujkhjSL8&amp;t">here</a>.</p><p>Huawei also announced approximately 100 other Huawei devices ranging from smartphones to tablets that will be upgraded to run <strong>HarmonyOS 2</strong> giving consumers access to a seamless intelligent experience across multiple devices in all different types of scenarios.</p><h3>What is Current Era?</h3><p>If we look at the history of Operating system it initially started with DOS and then Windows, Symbian followed by iOS and Android and today we come to a new era where everything is connected and more intelligent.</p><p>However, it seems to be complicated and it go through this fragmented experience and how do we solve this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*hUrTlsBYuuaRN5X5gnzukQ.png" /></figure><p>The current Era looks like every product of device contains an Operating system, If you consider Smartphones, we have a separate OS and smart Watches we have an individual Operating system as shown in the below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*yWp6OLkfh1SgIwngSsnxgQ.png" /></figure><p>If we give each type of product an individual Operating system, then it will make the whole system complicated and that’s where the new era of OS H<strong>armony OS</strong> is into existence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*YEU0WqMQ5yRgDcCdu8--nA.png" /><figcaption>HarmonyOS</figcaption></figure><p><strong>HarmonyOS </strong>is the Operating system that could be used with the Watch, mobile phones, cars, tablet ,tv and wide range of IOT devices and home appliances. HarmonyOS has been utilized in wide range of products <em>“one as all all as one”. that’s the Chinese name of HarmonyOS.</em></p><p>The goal of HarmonyOS is to satisfy different type of hardware ranging from Mobile phones, TV, watches and it even targets smaller devices with 128K as shown below.</p><p>It first and only one to enable such a unique kind of system and starting point for IoT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V5KwKoT03qa2ac0t-MjsiQ.png" /><figcaption>One as All , All as One</figcaption></figure><h4>WHAT HARMONYOS 2.0 OFFERS</h4><ul><li><strong>For Consumers</strong>: HarmonyOS integrates various smart devices to implement fast connection, capability collaboration, and resource sharing between different devices. This way, services can be seamlessly transferred to a suitable device that delivers a smooth all-scenario experience.</li><li><strong>For Application Developers:</strong> HarmonyOS adopts distributed technologies to make application development possible on different device forms. With HarmonyOS, you have the choice to focus on upper-layer service logic and develop applications in a much easier and more efficient way.</li><li><strong>For Device Developers:</strong> HarmonyOS uses a component-based software design to tailor itself to particular device forms based on their respective resource capabilities and service characteristics.</li></ul><p>Alongside the announcement, the final version of HarmonyOS began to rollout for 18 Huawei devices that include Huawei Mate 40, P40, Mate 30, and MatePad Pro series devices. Furthermore, HarmonyOS closed beta made its way to 28 devices from different smartphone lineups.</p><p>Huawei has decided not only to launch HarmonyOS in the recent devices but also target old devices way back up to 2016.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*HZSo1lnHeicMEanOG1mjyA.png" /></figure><p>Below are some of the HarmonyOS features to be highlighted.</p><ol><li><strong>HomeScreen —</strong> The system app icons look smoother and better than the ones on EMUI 11.</li><li><strong>Control Panel —</strong> which is one of the highlighting and interactive features of this release, which consist of shortcut switches like Music controller, super devices, connected devices, volume Controller etc.</li><li><strong>Smart Folder</strong></li><li><strong>Super Device</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*SY2bxrCnW2JP7GsqzbnRiw.png" /><figcaption>Super Device</figcaption></figure><p>To establish a connection, you just need to drag and drop the icon of that device to form a super device and control that newly connected device directly from your Super Device.</p><p>5. <strong>File Access</strong> is super easy without requiring a data cable and provides faster and secure file sharing between Huawei smartphones, computers, and tablets.</p><p>6. <strong>Smart Home</strong> is also covered a way to connect your home devices and control them all in one place.</p><p>7. Comprehensive performance gains for more <strong>privacy and security</strong></p><p>Furthermore, Huawei has also shared the information about the device adaptation roadmap of HarmonyOS 2.0 including the following:</p><ul><li><strong>From September 10, 2020</strong> — Device with 128KB to 128MB RAM</li><li><strong>From April 21, 2021</strong> — Device with 128MB to 4GB RAM</li><li><strong>From October 2021</strong> — Device with 4GB to more than 4GB RAM</li></ul><p>By the end of 2021, Huawei has planned to install HarmonyOS 2.0 in over 300 million. These devices are smartphones, tablets, smart wearables, IoT devices, and devices from third-party product manufacturers.</p><p>You can find more updates on the official Huawei link <a href="https://www.harmonyos.com/en/home">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe9d249c76b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/application-library-engineering-group/whats-new-in-harmonyos-2-fe9d249c76b1">What’s New in HarmonyOS 2</a> was originally published in <a href="https://medium.com/application-library-engineering-group">Application-Library-Engineering-Group</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understand the Github Flow and tips to improve it.]]></title>
            <link>https://medium.com/application-library-engineering-group/understand-the-github-flow-and-tips-to-improve-it-3f07dc3c21cb?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f07dc3c21cb</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[development-tools]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Wed, 05 May 2021 16:59:33 GMT</pubDate>
            <atom:updated>2021-05-05T16:59:33.568Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxXlyuMYGYmlURwjjwYaRQ.jpeg" /></figure><p>We know that <strong>GitHub</strong> is a highly used software that is typically used for version control. We use it day in and day out to manage and develop projects or contributing to Open Source. We need to follow a workflow which is easier to teach and follow, both of which result in a more consistent application. To put it simply, a workflow is how you get the work done.</p><p>In this article we will see what is the Github Flow that we need to follow.</p><p>So, let’s understand what Github Flow does and its usage.</p><p>Github flow is a standard lightweight workflow followed for easy deployment process and this workflow is used regularly.</p><p>Below is the Flow</p><ul><li><a href="https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository"><strong>Create a Branch</strong></a></li><li><a href="https://docs.github.com/en/github/committing-changes-to-your-project/about-commits#about-commits"><strong>Commits</strong></a><strong>( create, edit. delete, update)</strong></li><li><a href="https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request"><strong>Pull request</strong></a></li><li><a href="https://docs.github.com/en/organizations/organizing-members-into-teams/managing-code-review-assignment-for-your-team#about-code-review-assignments"><strong>Review Code</strong></a></li><li><a href="https://docs.github.com/en/articles/merging-a-pull-request"><strong>Merge the Pull request</strong></a></li><li><a href="https://gist.github.com/cedrickchee/55ecfbaac643bf0c24da6874bf4feb08"><strong>Code Cleanup</strong></a></li></ul><p>The above set of actions needs to be followed rigorously in order to achieve a proper Github flow.</p><p>Until now we have seen what a Github Flow is, now let’s see how Github Flow is different from Git Flow.</p><p>Basically, Git Flow works with different branches to manage easily each phase of the software development. It is used in environment with “releases” and it is not best suited for Continuous Deployment.</p><p>The Structure looks like this, there will be four types of branches:</p><p><strong>- master<br>- release<br>- hotfix/*<br>- feature/*</strong></p><p>Well, that is not the case with Github Flow, it is more of a continuous deployment environment with no concept of release. The reason is that every time you have a new feature introduced it is pushed live immediately.</p><p>If you would like to know more about GitHub Flow you can read <a href="https://guides.github.com/introduction/flow/">here</a>.</p><h3>Github Tricks and Tips</h3><p>In this section we will cover some of the random GitHub tips and tricks that would be handy during the Workflow process and can hopefully speed up your development process.</p><ul><li>Organize you contributing guidelines.</li><li>Task list with Markdown as shown below.</li></ul><pre>- [ ] Tests for Error pages<br>- [x] Tests for unauthorized access<br>- [ ] Add Image Check</pre><ul><li>Use GitHub Gist while sharing snippets.</li><li>Structuring commits</li><li>Know about <a href="https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-blame#:~:text=The%20git%20blame%20command%20is%20used%20to%20examine%20the%20contents,author%20of%20the%20modifications%20was.&amp;text=git%20blame%20and%20git%20log,history%20of%20a%20file&#39;s%20contents.">Git Blame</a> and <a href="https://git-scm.com/docs/git-bisect">Git Bisect</a></li><li><strong>GitHub</strong> code review and exploration using <a href="https://chrome.google.com/webstore/detail/octotree-github-code-tree/bkhaagjahfmjljalopjnoealnfndnagc">Octotree</a> Plugin.</li><li>Know your .git folder</li></ul><p>So far, we have seen the basic GitHub Flow and how is it different from the Git Flow and also some of the unique and random tips. I’d love to hear from you about your favorite GitHub tips that save you time and improve your code workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f07dc3c21cb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/application-library-engineering-group/understand-the-github-flow-and-tips-to-improve-it-3f07dc3c21cb">Understand the Github Flow and tips to improve it.</a> was originally published in <a href="https://medium.com/application-library-engineering-group">Application-Library-Engineering-Group</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are the Challenges with Open Source?]]></title>
            <link>https://medium.com/application-library-engineering-group/what-are-the-challenges-with-open-source-848ec75e87bd?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/848ec75e87bd</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[challenge]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Mon, 03 May 2021 17:39:30 GMT</pubDate>
            <atom:updated>2021-05-03T17:39:30.300Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*26_cgK7xI74slHdZ_QoZKQ.jpeg" /><figcaption>Challenges with Open Source</figcaption></figure><p>Until now we have seen the importance and how Open Source play a vital role in today’s world, if you haven’t read our article about the Open Source then you can find the details <a href="https://applibgroup.medium.com/how-to-open-source-your-ideas-f3f9afb68fb2">here</a>. Today we will see what some of the common issues we face while working with the Open Source Ecosystem.</p><p>It could be in terms of Licensing, security concerns or lack of support etc., in this article we will see all these factors and many more in brief and how to handle them.</p><h3>Licensing</h3><p>Even today most of us do not understand the licensing obligations that goes along with it, on top of that there are many projects which lack licenses. This makes it exceedingly difficult for business to comply. I think we need best practices in place to make the Open Source easier.</p><p>If you’re publishing a piece of code that you want to distribute as much as possible, maybe having other people helping you with the code, making sure you’re not going to be sued as well as making sure that your name or your company’s name are not going to be used by others without your approval, then the <strong>BSD 3 clause license</strong> is just the one.</p><p>We do have 3 types of Open-Source Licenses</p><ul><li><strong>MIT</strong></li><li><strong>Apache</strong></li><li><strong>GPL</strong></li></ul><p>You can read more details about the licensing <a href="https://gist.github.com/nicolasdao/a7adda51f2f185e8d2700e1573d8a633">here</a></p><h3>Security</h3><p>Security as always been an area of concern in order to ensure we do not breach before contributing to the Open Source platforms. Most of the Open Source suffer from irregular security updates or Testing. As per the Open Source Survey result it states that</p><p>“<strong><em>78% of companies run open source software, but less than half are managing it properly.</em></strong>”</p><p>Open access means the code is available to all, which creates opportunities for cyber threat actors to manipulate code maliciously.</p><p>we must ensure proper testing is performed and quality assurance is performed throughout the development process else lack of this check can make the IT infrastructure vulnerable.</p><p>It is important to have a dedicated Support team if you are using the Open source project within your organization to perform regular security patches and generate report on regular basis.</p><h3>Coding Standards</h3><p>Code standards are set of guidelines to be followed by every individual contributing to an Open Source project. It is a simple procedure to ensure all the submitted code looks similar when merged and gives us a feel that it is committed from a single source.</p><p>what are the benefits of using coding standards?</p><ol><li>Compliance with industry standards.</li><li>Consistent code quality.</li><li>Software security from the start.</li><li>Reduced development cost.</li></ol><h3>Complexity</h3><p>Complexity of Open-Source projects slowdown the projects as the ecosystem is geared to innovation than usability.</p><p>The diversity of projects is also another contributing factor for complexity,</p><p>Open-source way manages complexity is by embracing open standards. The use of open standards allows for better collaboration between different organizations with different interests.</p><p>Some more minor factors like <strong>Code without Owner, Lack of contributors, too many views </strong>on the projects which diverts the vision of the project.</p><p>So, by now you must have seen the factors or challenges in Open source and there is always pros and cons of Open Source, you need to identify and address the factors to keep the project running and build a community.</p><p>There could be enormous reason why open source may not be perfect, but there are millions of reasons why it is better option than the alternative.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=848ec75e87bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/application-library-engineering-group/what-are-the-challenges-with-open-source-848ec75e87bd">What are the Challenges with Open Source?</a> was originally published in <a href="https://medium.com/application-library-engineering-group">Application-Library-Engineering-Group</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things I wish I knew before building Libraries.]]></title>
            <link>https://medium.com/application-library-engineering-group/things-i-wish-i-knew-before-building-libraries-72bc121dbbe8?source=rss-93faa5a3015e------2</link>
            <guid isPermaLink="false">https://medium.com/p/72bc121dbbe8</guid>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Application Library Engineering Group]]></dc:creator>
            <pubDate>Mon, 26 Apr 2021 06:24:55 GMT</pubDate>
            <atom:updated>2021-04-26T06:24:55.901Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*WMucWGfXynSETadSNqgdww.jpeg" /><figcaption>Libraries</figcaption></figure><p>One of the major reasons for using these libraries is to expedite the development process, i.e., develop an amazing application without any unnecessary or additional efforts.</p><p>These libraries provide developers with basic pre-written codes and other important elements that can be used instantly rather than performing these tasks from scratch.</p><p>Lets, see some of the guidelines/best practices to be followed</p><ul><li>Firstly, there is no defined set of standards or hard and fast rule available for this. However if you follow a structure it could make things easier and clearer.</li><li>Always stick to the goal as to why you initially started creating this library.</li><li>Keep it simple and straight.</li><li>Do some research and find if there is already an existing library available you just reinvent the wheel, you can actually avoid this.</li><li>It is not always necessary to create libraries, fixing a feature in a existing library is contributing and giving back to the community.</li><li>High quality <strong>dependencies</strong></li><li><strong>Permissive license</strong>, including (but not limited to) Apache, Artistic, BSD, CC BY, MIT, MS-PL and W3C</li><li>Github <strong>Version Tag </strong>so you can see exactly what source is in the package.</li><li>Support for the latest <strong>stable </strong>version</li><li>General <strong>usability</strong> when it comes to the overview, docs, sample/example code, and API quality.</li><li>Good <strong>runtime behavior</strong> in terms of CPU and memory usage</li><li>Integration as well as unit <strong>test </strong>coverage.</li></ul><p>Before creating libraries, I would suggest you go through some of the best readily available libraries and see the structure or pattern common in these libraries.</p><p>Below are some of the top libraries.</p><ul><li><a href="https://dagger.dev/"><strong>Dagger 2</strong></a></li><li><a href="https://square.github.io/retrofit/"><strong>Retrofit</strong></a></li><li><a href="https://square.github.io/picasso/"><strong>Picasso</strong></a></li><li><a href="https://github.com/bumptech/glide"><strong>Glide</strong></a></li><li><a href="https://github.com/JakeWharton/butterknife"><strong>ButterKnife</strong></a></li><li><a href="https://github.com/ReactiveX/RxAndroid"><strong>RxJava2</strong></a></li><li><a href="https://developer.android.com/training/testing/espresso"><strong>Espresso</strong></a></li></ul><p>The end goal of every library is to simplify abstract complexities of code and package the code for others to reuse in their projects.</p><p>If you have any details to be shared or steps to follow while working with libraries then feel free to share it in the comments below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72bc121dbbe8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/application-library-engineering-group/things-i-wish-i-knew-before-building-libraries-72bc121dbbe8">Things I wish I knew before building Libraries.</a> was originally published in <a href="https://medium.com/application-library-engineering-group">Application-Library-Engineering-Group</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>