<?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 Damla Ulutas on Medium]]></title>
        <description><![CDATA[Stories by Damla Ulutas on Medium]]></description>
        <link>https://medium.com/@damla-ulutas-ogu?source=rss-75db1e9102fc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*y1ABA0J-WgNRidlClZG5hg.jpeg</url>
            <title>Stories by Damla Ulutas on Medium</title>
            <link>https://medium.com/@damla-ulutas-ogu?source=rss-75db1e9102fc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:10:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@damla-ulutas-ogu/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[CustomView and Custom Attributes]]></title>
            <link>https://damla-ulutas-ogu.medium.com/customview-and-custom-attributes-decff82af65c?source=rss-75db1e9102fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/decff82af65c</guid>
            <dc:creator><![CDATA[Damla Ulutas]]></dc:creator>
            <pubDate>Wed, 31 May 2023 07:52:05 GMT</pubDate>
            <atom:updated>2023-05-31T07:52:05.050Z</atom:updated>
            <content:encoded><![CDATA[<p>Önceden oluşturulmuş widget’lar veya layoutlardan hiçbiri ihtiyaçlarınızı karşılamıyorsa, kendi View subclassınızı oluşturabilirsiniz. Mevcut bir widget veya layout da yalnızca küçük ayarlamalar yapmanız gerekiyorsa, widget veya layoutu subclass yapabilir ve methodlarını override edebilirsiniz.</p><p>Bunu bir örnekle açıklamaya çalışayım.</p><p>Örneğin; android size hazır bir Button sunuyor. Fakat siz kendiniz özel bir buton tasarlamak istiyorsunuz. Belli standart görünümü olan bir button tasarlamak istediğinizi düşünelim. Custom attribute olarak “type” değerini atayalım . Type attribute butonun small, medium yada large olma durumunu ayarlasın. Butonun belli başlı ortak özelliği olsun.Örneğin radius ve en-boy oranı, borderı tüm type lar için aynı olsun. Her button tanımladığımızda bunları girmeyelim. Ama Butonun adını ve boyutunu dışardan değiştirebilelim.</p><p>İşte güzel bir senaryo, peki nasıl yapıcaz.</p><p><strong>Adım- 1)</strong> <strong>res&gt;values&gt;attrs</strong> file’ımızı oluşturuyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*pIcX0cxECkv7k6qFL8j9Rw.png" /></figure><p><strong>Adım- 2) </strong>Oluşturduğumuz<strong> </strong>attrs file’ımızın içinde <strong>&lt;declare-styleable&gt;</strong> tag ile CustomView’mizi ve onun dışardan set edilebilen custom attribute’lerini tanımlıyoruz. name kısmına oluşturacağımız CustomView’imizin adını veriyoruz. <strong>name=”BaseButton”</strong>. Çünkü onun attribute’lerini tanımlıycaz.</p><p>İki tane customattribute belirledik. Bunlar BaseButtonu’umuza dışarıdan verebileceğimiz parametreler.</p><p>3 çeşit button tipi belirledik. BaseButton’u kullandığımız yerlerde type’ini set edebiliriz.</p><p>BaseButton’u kullandığımız yerlerde button text’ini set edebiliriz.</p><pre>&lt;declare-styleable name=&quot;BaseButton&quot;&gt;<br><br>    &lt;attr name=&quot;type&quot; format=&quot;enum&quot;&gt;<br>        &lt;enum name=&quot;SMALL&quot; value=&quot;0&quot; /&gt;<br>        &lt;enum name=&quot;MEDIUM&quot; value=&quot;1&quot; /&gt;<br>        &lt;enum name=&quot;LARGE&quot; value=&quot;2&quot; /&gt;<br>    &lt;/attr&gt;<br>    &lt;attr name=&quot;text&quot; format=&quot;string&quot;/&gt;<br><br>&lt;/declare-styleable&gt;</pre><p><strong>Adım- 3) </strong>CustomView’imizi oluşturuyoruz. CustomView’imizin adı <strong>BaseButton</strong>.</p><pre>class BaseButton constructor(context: Context, attrs: AttributeSet) :<br>    LinearLayout(context, attrs) {<br>    private lateinit var binding: BaseBtnBinding<br><br>    init {<br>        val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater<br>        binding = BaseBtnBinding.inflate(inflater)<br>        addView(binding.root)<br>        attrsSet(attrs)<br>    }<br><br>    @SuppressLint(&quot;UseCompatLoadingForDrawables&quot;)<br>    private fun attrsSet(attrs: AttributeSet) {<br>        attrs.let {<br>            val attributes: TypedArray =<br>                context.obtainStyledAttributes(attrs, R.styleable.BaseButton)<br><br>            try {<br><br>                val text = attributes.getString(R.styleable.BaseButton_text)<br>                binding.baseBtn.text = text<br><br>                val type = attributes.getInt(R.styleable.BaseButton_type,0)<br>                when(type){<br>                    0-&gt;{<br>                        binding.baseBtn.width= 120<br>                        binding.baseBtn.height=90<br>                    }<br>                    1-&gt;{<br>                        binding.baseBtn.width= 200<br>                        binding.baseBtn.height=150<br>                    }<br>                    2-&gt;{<br>                        binding.baseBtn.width= 280<br>                        binding.baseBtn.height=210<br>                    }<br>                }<br><br>            } finally {<br>                attributes.recycle()<br>            }<br>        }<br>    }<br>    <br>}</pre><p><strong>Adım- 3) </strong>BaseButton’umuzun tasarımını yapıyoruz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RC_Q8qIfZMvTZRbP7Nl73A.png" /></figure><p><strong>Adım- 4) </strong>Son olarak oluşturduğumuz CustomView’imizi uygulamamızda çağırıyoruz.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    android:foregroundGravity=&quot;center&quot;<br>    tools:context=&quot;.HomeFragment&quot;&gt;<br><br>    &lt;com.example.BaseButton<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:layout_marginTop=&quot;130dp&quot;<br>        android:gravity=&quot;center&quot;<br>        app:type=&quot;SMALL&quot;<br>        app:text=&quot;Base Small Button&quot; /&gt;<br><br>&lt;/RelativeLayout&gt;</pre><p>İşte oldu :)</p><p><strong><em>Not:</em></strong><em> Aşağıda diğer customattribute’lerden bazılarının örneklerini paylaşıyorum</em></p><ol><li>enum</li></ol><pre>&lt;attr name=&quot;type&quot; format=&quot;enum&quot;&gt;<br>      &lt;enum name=&quot;SMALL&quot; value=&quot;0&quot; /&gt;<br>      &lt;enum name=&quot;MEDIUM&quot; value=&quot;1&quot; /&gt;<br>      &lt;enum name=&quot;LARGE&quot; value=&quot;2&quot; /&gt;<br>&lt;/attr&gt;</pre><pre>val type = attributes.getInt(R.styleable.BaseButton_type,0)</pre><p>2. string</p><pre>&lt;attr name=&quot;text&quot; format=&quot;string&quot;/&gt;</pre><pre>val text = attributes.getString(R.styleable.BaseButton_text)</pre><p>3. drawable</p><pre>&lt;attr name=&quot;btnBackground&quot; format=&quot;reference&quot;/&gt;</pre><pre>val background = attributes.getDrawable(R.styleable.BaseButton_btnBackground)</pre><p>4. color</p><pre>&lt;attr name=&quot;textColor&quot; format=&quot;color&quot;/&gt;</pre><pre>val defaultTextColor = context.getColor(R.color.black);<br>val textColor = attributes.getColor(<br>                   R.styleable.BaseButton_textColor,<br>                   defaultTextColor<br>                )</pre><p>5. dimension</p><pre>&lt;attr name=&quot;padding&quot; format=&quot;dimension&quot;/&gt;</pre><pre>val defaultPadding = context.resources.getDimension(R.dimen.base_btn_padding<br>val padding = attributes.getDimension(<br>            R.styleable.BaseButton_padding,<br>            defaultPadding<br>        )).toInt()</pre><p>6. reference</p><pre> &lt;attr name=&quot;btn_height&quot; format=&quot;reference&quot; /&gt;</pre><pre>val defaultDimen = context.resources.getDimension(R.dimen.base_btn_dimen) <br>val height = attributes.getDimension(<br>            R.styleable.BaseButton_btn_height,<br>            defaultDimen<br>        ).toInt()</pre><p><a href="https://developer.android.com/develop/ui/views/layout/custom-views/custom-components">https://developer.android.com/develop/ui/views/layout/custom-views/custom-components</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=decff82af65c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git-Debugging]]></title>
            <link>https://medium.com/huawei-developers/git-debugging-902837f4c984?source=rss-75db1e9102fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/902837f4c984</guid>
            <dc:creator><![CDATA[Damla Ulutas]]></dc:creator>
            <pubDate>Wed, 09 Jun 2021 08:05:03 GMT</pubDate>
            <atom:updated>2021-06-11T09:40:16.314Z</atom:updated>
            <content:encoded><![CDATA[<p>The indispensable version control system of a big team project is Git. Yes, when working with a large team on a large project, sometimes we need some commands to make our work easier to understand where the code is wrong. Wouldn&#39;t it be nice to have a life-saving debugging command in case we have no idea about the bug?</p><p>In this article, I will talk about these special commands that allow you to debugging Git. I hope to make your job easier.</p><p><strong>Debugging?</strong></p><p>Git has a couple of commands that are used to help debug an issue in your code. This ranges from figuring out where something was introduced to figuring out who introduced it.</p><h3>git bisect</h3><p>Thegit bisecttool is an incredibly helpful debugging tool used to find which specific commit was the first one to introduce a bug or problem by doing an automatic binary search.</p><p>This command uses the binary search algorithm to find out the commit that introduced a bug. It is used by first telling it “bad” commit i.e. commit that is known to contain bug and “good” commit that is known to be before bug was introduced. Then <strong>git bisect</strong> picks a commit from “bad” commit and ask whether the selected commit is good or bad and runs until the “good” commit is reached.</p><p>So let&#39;s talk a little bit about how it does this?</p><blockquote>You are in a project where you are working with your team. There was no problem in your project when you last committed. But when you just pulled the project and realized it was a bug. You searched and could not find the commit with the bug because your teammates pushed more than 20 commits.</blockquote><p>The command lines below will be useful.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af8dfa2b7596f750774b42de4b562755/href">https://medium.com/media/af8dfa2b7596f750774b42de4b562755/href</a></iframe><p>Start Debugging. Define the commit id that you noticed that your code has a bug as &quot;bad&quot;. Also find a commit_id that you are sure is working. Define this as &quot;good&quot;. Git will suggest you a commit_id at each iteration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*dl9vUh7MS83VlBjm1EDTHA.png" /><figcaption>An iteration</figcaption></figure><p>Each suggestion will cheackout that commit_id for you to check your code. If the suggested id is not the commit you want, continue the iteration. You can define the suggested commit_id as good and continue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*bgYZcvv4Yw76-a_t5QEvFg.png" /></figure><p>If you have found the commit with the bug, you can write “git bisect reset” and stop debugging.</p><p><strong><em>I have compiled other bisect options for you.</em></strong></p><p><strong>git bisect reset: </strong>After one complete bisect session, git bisect reset command is used to return to original head.</p><p><strong>To undo the change of state: </strong>Sometimes, rather than finding a bug in commit bisect command it can also be used to switch the previous state. So it can be used when we are looking to commit that caused a change between “old” and “new” state.</p><p>How it works?<br>Instead of bad and good, old and new are used respectively.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/07ebb9a630e0a915489757313f97348d/href">https://medium.com/media/07ebb9a630e0a915489757313f97348d/href</a></iframe><p><strong>git clean: </strong>The git clean command is used to delete untracked files from git project. This command completely removes files from the working tree and cannot be recovered again. So this command should be carefully used.</p><ul><li><strong>-n or –dry-run</strong> This command does not remove files, but it is a dummy command which tells what would be actually done. It is used to test run</li><li><strong>for –force</strong> This command remove files from the current directory. This is a necessary command unless <em>clean.requireforce</em> configuration is set to false.</li><li><strong>-d</strong> This command removes untracked directories along with untracked files.</li><li><strong>-i or –interactive</strong> As the name suggests, it is an interactive command that tells what has to be done.</li></ul><p><strong>Interactive Mode:</strong> It is the command loop which displays the available sub commands.</p><ul><li><strong>clean:</strong> This command deletes untracked directories/files at the point.</li><li><strong>filter by pattern: </strong>We can input a pattern such as *_ to exclude files/directories from deletion. For eg: “*.py” will exclude mentioned file extension from deletion.</li><li><strong>select number: </strong>This command allot a number to untracked files/directories to be deleted. We can also make multiple selection. For Example:</li></ul><p>. . . “3–5” deletes file number “3, 4, 5”.</p><p>. . . “3–5, 8, 9” deletes “3, 4, 5, 8, 9”.</p><p>. . . “3-” deletes file numbers starting from 3 to the last file number.</p><p>. . . “*” deletes everything.</p><p><strong>4. ask each: </strong>This will ask one by one to delete the particular file or not.</p><p><strong>5. quit: </strong>This option lets you to exit without deleting.</p><h3>git blame</h3><p>The git blame command annotates the lines of any file with which commit was the last one to introduce a change to each line of the file and what person authored that commit. This is helpful in order to find the person to ask for more information about a specific section of your code.</p><p>You can choose if you want to find out who made what changes in a file on what date. You now know that there is a git command that quickly brings you this information.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43f14faaf639d3ca24b2708075de4be5/href">https://medium.com/media/43f14faaf639d3ca24b2708075de4be5/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xhDzUbwRTIxnR0znPKsKfA.png" /></figure><p>It is covered in <a href="https://git-scm.com/book/en/v2/ch00/_file_annotation">File Annotation</a> and is only mentioned in that section.</p><p><strong><em>I have compiled some blame options for you.</em></strong></p><ul><li><strong>-b </strong>Show blank SHA-1 for boundary commits. This can also be controlled via the blame.blankBoundary config option.</li><li><strong>— root </strong>Do not treat root commits as boundaries. This can also be controlled via the blame.showRoot config option.</li><li><strong>— show-stats</strong> Include additional statistics at the end of blame output. Annotate only the line range given by <strong>&lt;start&gt;,&lt;end&gt;</strong>, or by the function name regex <strong>&lt;funcname&gt;</strong>. May be specified multiple times. Overlapping ranges are allowed.</li><li><strong>-t</strong> Show raw timestamp (Default: off).</li><li><strong>-S</strong> <strong>&lt;revs-file&gt;</strong>Use revisions from revs-file instead of calling <a href="https://git-scm.com/docs/git-rev-list">git-rev-list[1]</a>.</li><li><strong>— reverse</strong> &lt;rev&gt;..&lt;rev&gt;Walk history forward instead of backward. Instead of showing the revision in which a line appeared, this shows the last revision in which a line has existed. This requires a range of revision like START..END where the path to blame exists in START. git blame --reverse START is taken as git blame --reverse START..HEAD for convenience.</li><li><strong>— first-parent </strong>Follow only the first parent commit upon seeing a merge commit. This option can be used to determine when a line was introduced to a particular integration branch, rather than when it was introduced to the history overall.</li><li><strong>-p</strong> Show in a format designed for machine consumption.</li><li><strong>— line-porcelain </strong>Show the porcelain format, but output commit information for each line, not just the first time a commit is referenced. Implies — porcelain.</li><li><strong>— incremental</strong> Show the result incrementally in a format designed for machine consumption.</li><li><strong>-w</strong> Ignore whitespace when comparing the parent’s version and the child’s to find where the lines came from.</li><li><strong>— abbrev=&lt;n&gt; </strong>Instead of using the default 7+1 hexadecimal digits as the abbreviated object name, use &lt;m&gt;+1 digits, where &lt;m&gt; is at least &lt;n&gt; but ensures the commit object names are unique. Note that 1 column is used for a caret to mark the boundary commit.</li></ul><p>You can visit <a href="https://git-scm.com/docs/git-blame/2.31.0">GIT’s</a> site for more information.</p><h3>git grep</h3><p>The git grep command can help you find any string or regular expression in any of the files in your source code, even older versions of your project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ffc7791a3cdb76f903e83d90d4b2683/href">https://medium.com/media/2ffc7791a3cdb76f903e83d90d4b2683/href</a></iframe><p><strong><em>I have compiled some blame options for you.</em></strong></p><ul><li><strong>— cached </strong>Instead of searching tracked files in the working tree, search blobs registered in the index file.</li><li><strong>— no-index </strong>Search files in the current directory that is not managed by Git.</li><li><strong>— untracked </strong>In addition to searching in the tracked files in the working tree, search also in untracked files.</li><li><strong>— no-exclude-standard </strong>Also search in ignored files by not honoring the .gitignore mechanism. Only useful with --untracked.</li><li><strong>— exclude-standard </strong>Do not pay attention to ignored files specified via the .gitignore mechanism. Only useful when searching files in the current directory with --no-index.</li><li><strong>— recurse-submodules </strong>Recursively search in each submodule that is active and checked out in the repository. When used in combination with the &lt;tree&gt; option the prefix of all submodule output will be the name of the parent project’s &lt;tree&gt; object. This option has no effect if --no-index is given.</li><li><strong>— basic-regexp </strong>Use POSIX extended/basic regexp for patterns. Default is to use basic regexp.</li></ul><p>You can visit <a href="https://git-scm.com/docs/git-grep">GIT’s</a> site for more information.</p><p><strong>References</strong></p><ul><li><a href="https://git-scm.com/book/en/v2/Appendix-C%3A-Git-Commands-Debugging">Git - Debugging</a></li><li><a href="https://www.geeksforgeeks.org/git-debugging/">Git- Debugging - GeeksforGeeks</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=902837f4c984" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/git-debugging-902837f4c984">Git-Debugging</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GIT —İşlemleri Geri Alma]]></title>
            <link>https://medium.com/huawei-developers-tr/git-i%CC%87%C5%9Flemleri-geri-alma-e67597e1abaf?source=rss-75db1e9102fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/e67597e1abaf</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Damla Ulutas]]></dc:creator>
            <pubDate>Thu, 20 May 2021 06:28:16 GMT</pubDate>
            <atom:updated>2021-05-24T12:20:31.085Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*xMtL6owMcI6h7MKsP5qc7A.jpeg" /></figure><p>Git kullanırken bazen istemediğimiz durumlar olur ve kodlarımızı geri almak ya da geçmiş commitlerimizi düzeltmek isteriz. Genelde bu geri alma ve düzeltme işlemleri başımıza bela olur. Ya kodlarımızı kaybederiz ya conflict’e düşer ya da takım arkadaşımızın kodunu ezeriz. Bu makalede hangi tip sorunlarda hangi yöntemleri kullanmamız gerektiğini açıklamaya çalışacağım. Umarım yararlı olur.</p><p>Haydi başlayalım. :)</p><p><strong>1.Amend</strong></p><p>Diyelim ki bir commit yaptınız ve bir şeyleri eklemeyi unuttunuz ve hemen düzeltmek istiyorsunuz. Bunun için amend komutunu kullanabilirsiniz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7de7ede7c19bac438a2b077e0e35f08b/href">https://medium.com/media/7de7ede7c19bac438a2b077e0e35f08b/href</a></iframe><p><strong>Peki amend’i hangi durumda kullanabiliriz</strong>:</p><ul><li>Commitinizin <strong>pushlanmamış</strong> olması gerekir. Kodunuzu puslayıp central servera gönderdiyseniz amend komutunu kullanmanız tavsiye edilmez. Muhtemelen conflict oluşturursunuz ve localinizdeki kodlarınız, geri aldığınız kodunuz ve repodaki kodlarınızı karşılaştırıp merge etmeniz gerekebilir. Detaylı bilgi için The <a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing#_rebase_peril">Perils of Rebasing</a> bakabilirsiniz. Amend sadece pushlanmamış commit’ler için tercih edilmelidir. Pushlanmış kodlar için farklı komutlar kullanacağız.</li><li>Amend ile sadece<strong> son commit</strong>inizi geri alabilirsiniz. Mesela iki ya da üç commit öncesi için değil.</li><li>Önceki commit hiç gerçekleşmemiş gibi ve commit geçmişinizde görünmeyecek. <strong>Commit</strong> <strong>historyde iz bırakmaz</strong>.</li><li>Commit yaptınız commit mesajınızı yanlış yaptığınızı fark ettiniz. Değişiklik yapmadan amend’i kullanırsanız size <strong>son commit mesajınızı</strong> <strong>değiştirme</strong> fırsatı verir. Commitiniz üzerine yazılır.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31b2453b4de4494c1ea4a9ccfca7b85b/href">https://medium.com/media/31b2453b4de4494c1ea4a9ccfca7b85b/href</a></iframe><p><strong>2.Reset</strong></p><p>Yanlış bir commit attınız ya da yöneticiniz yaptığınız değişkliklerin geri alınmasını istiyor. Benzer seneryolar içi reset komutunu kullanabilirsiniz. Reset komutu kodunuzu belli bir <strong>commit numarasına</strong> ya da belli bir <strong>commit sayısı kadar geriye</strong> döndürmenizi sağlar.</p><blockquote>Reset kullanırken <strong>pushlamadan</strong> <strong>önce</strong> stage’deki kodları, stage’de değişiklik yoksa central server reposu ve local repo kodları arasındaki farkları kontrol etmeniz önerilir. Özellikle <strong>reset hard</strong> kullanıyorsanız mutlaka central serverdaki reponuzu başka bir yere yedeklemeniz önerilir. Pushlama yaptığınızda önceki kodlarınızı kaybetmek bazen tehlikeli olabilir. :/</blockquote><p><strong>Reset tiplerine bakalım</strong>:</p><p><strong>— Reset Soft</strong>: <strong>stage everything</strong>. Reset soft ile kodlarınızı istediğiniz şekilde geri aldınız. Ama repoyu değiştirmesini istemiyorsunuz. Alınan değişiklikleri stagede görmek ve kontrollü bir şekilde commitlemek istiyorsunuz. İşte reset soft değişiliklerinizi geri alıp, sizin için stagede commitlemeye hazır bekletir. İsterseniz <strong>discard changes</strong> deyip geri alırsınız. Hiçbir dosyanızda bir kayıp olmaz.</p><ul><li>Reset soft kodlarınızı istediğiniz şekilde geri alır. Değiştirilmiş ve düzenlenmiş kodları Git’e ekler ( add stash) ve sizin kontrolünüze sunar.</li><li>Localinizdeki<strong> dosyalarınız bozulmaz</strong>.</li></ul><p>Aşağıda reset soft komutunun iki ayrı kullanımını görüyorsunuz. İlki size kodlarınızı 2 commit geriye , diğeri de belli bir commit numarasına döndürmenize yardımcı olur.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d8473dec8602529a1bd93adff987a24/href">https://medium.com/media/5d8473dec8602529a1bd93adff987a24/href</a></iframe><p>— <strong>Reset Mixed: unstage everything. </strong>Aynı geri alma işlemini yaptınız, repoyu da değiştirmek istemiyorsunuz ama değişen kodları stagede de istemiyorsunuz. İşte reset mixed tam size göre.</p><ul><li>Localinizdeki<strong> dosyalarınız bozulmaz</strong>.</li><li>Reset mixed kodlarınızı istediğiniz şekilde geri alır. Değiştirilmiş ve düzenlenmiş kodlar Git’e eklenmez <strong>untracked</strong> olur. Siz <strong>istediğiniz değişiklikleri seçer</strong> stage’e alırsınız.</li></ul><p>Reset mixed komut örneklerini aşağıda görüyorsunuz. İlki size kodlarınızı 2 commit geriye , diğeri de belli bir commit numarasına döndürmenize yardımcı olur.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f74a1ed4b73cd6c7ee54e1ff4a1822b/href">https://medium.com/media/7f74a1ed4b73cd6c7ee54e1ff4a1822b/href</a></iframe><p>— <strong>Reset Hard: ignore everything. </strong>Geri alma işlemini hard ile yapıyorsanız dikkatli olmalısınız. Çünkü local reponuz iz bırakmadan değiştirilir. Pushlamadağınız central server reponuzu geri alınacak ve commit history kaybolacaktır. İstenmeyen sonuçlar için <strong>yedekleme</strong> yapılmalıdır.</p><ul><li>Dosyalarda yaptığınız değişiklikleri belirtilen noktaya kadar siler.</li><li><strong>Dosyalarınız değiştirilir</strong>. <strong>Working tree</strong>de ve <strong>stage</strong>de değişiklik göremezsiniz.</li></ul><p>Reset hard komut örneklerini aşağıda görüyorsunuz. İlki size kodlarınızı 2 commit geriye , diğeri de belli bir commit numarasına döndürmenize yardımcı olur.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/063b2a8243f3ba172f09a03e8ec4bb0b/href">https://medium.com/media/063b2a8243f3ba172f09a03e8ec4bb0b/href</a></iframe><p><strong>3. Revert</strong></p><p>Commitlerinizi geri almak istiyorsunuz ama takım halinde de çalıştığınız için commit history bozulmasın istiyorsunuz. Çünkü bazen <strong>geri aldığınız commiti de geri almak isteyebilirsiniz</strong>. :D</p><p>Revert bunu yeni bir commit atarak yapıyor. Aslında geri almak istediğiniz commitiniz aynı yerinde commit historyde duruyor. Peki yeni bir commit atmaktan farkı yok neden kullanayım ki dediğinizi duyar gibiyim. Bir kere değişiklerinizi sizin için geri getiriyor. Bakıp tek tek yapmanızdan daha kolay. İkincisi merge commitinizi de geri almanızı sağlıyor. Birden fazla commit içinde kullanabiliyorsunuz, örneğin iki commit aralığındaki tüm commitleri tek tek taramanıza gerek yok.</p><p>Revert bir çok farklı şekilde kullanılabilir. Ben kullanışlı olanlarını sizin için filtreledim.</p><p>— <strong>Revert edit: </strong>Belli bir commite revert etmeden önce size <strong>commit mesajınızı da düzenleme</strong> imkanı verir. İsterseniz<strong> — no-edit </strong>seçeneğini de tam tersi mesajı düzenlemeden geçmek için kullanabilirsiniz<strong>.</strong></p><p>Aşağıda komutu son commit işleminizi geri almak ve commit mesajını da editlemek için kullanabilirsiniz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3db34b35a1624f0f7f438b768e91057f/href">https://medium.com/media/3db34b35a1624f0f7f438b768e91057f/href</a></iframe><p>— <strong>Revert commit_no: </strong>Bir commiti revert ettiğiniz de yeni commit oluşturulur. İstersenizbu commit numarasını da tekrar revert edebilirsiniz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e96dadc62ad82b6a93963a1f76f8f7b/href">https://medium.com/media/1e96dadc62ad82b6a93963a1f76f8f7b/href</a></iframe><p>—<strong> Revert gpg sign: </strong>GPG nedir ilk burdan başlayalım.GPG, GPL lisansına sahip, açık kaynak kodlu bir OpenPGP şifreleme standartıdır. OpenPGP ise, izni olmayan kişilerin görmesini istemediğiniz her türlü verinin bütünlüğünü ve güvenliğini sağlayan bir protokoldür. Git kullanırken buna neden ihtiyaç duyayım diyebilirsiniz. Şöyle ki GPG ile imzalanan commit’ler, sizin kimliğinizi doğrulamaktadır. GPG key’ler kişiye özel olduğu için, gelen commit’lerin gerçekten o şahıstan geldiğini doğrulamış olursunuz. GitHub ve GitLab üzerinden GPG Key ekleyebilirsiniz. Bu işlemler bu makalenin konusu olmadığı için geçebiliriz. Biz sadece bir commiti revert ederken oluşan commitin otomatik olarak GPG ile gönderilmesine bakalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b16688f141729d8e517f4a3a9e504009/href">https://medium.com/media/b16688f141729d8e517f4a3a9e504009/href</a></iframe><p>— <strong>Revert -n: </strong>Revert ile <strong>birden fazla commiti tek seferde geri almanız</strong> mümkün. Bir başlangıç commit_no ve bir de bitiş commit_no verirseniz. Aradaki tüm commitleriniz tek bir komutla geri alınır. Aşağıda örneğini görebilirsiniz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac119d02ead08e9972693f662f88a575/href">https://medium.com/media/ac119d02ead08e9972693f662f88a575/href</a></iframe><p><strong>— Revert -m:</strong> Merge işlemi yaptınız. Bunu geri almanın güzel bir yoludur. <strong>Merge işleminizi</strong> sorunsuz bir şekilde <strong>geri alabilirsiniz</strong>. (<strong>Fast-forward için geçerli değil</strong>. Revert commiti geri almaya yarıyor ve Fast-forward işleminde merge-commit oluşmadığı için revert işlemine uygun değil.)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/45d04341f6ee6b3ee934489de0dbfd3a/href">https://medium.com/media/45d04341f6ee6b3ee934489de0dbfd3a/href</a></iframe><p>Daha fazla bilgi için <a href="https://git-scm.com/doc">Git-Documantation</a>’a bakabilirsiniz.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e67597e1abaf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/git-i%CC%87%C5%9Flemleri-geri-alma-e67597e1abaf">GIT —İşlemleri Geri Alma</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HMS DTM React Native Android Plugin — FuctionCall tipindeki CustomVariable için Workaround]]></title>
            <link>https://medium.com/huawei-developers-tr/hms-dtm-react-native-android-plugin-fuctioncall-tipindeki-customvariable-i%C3%A7in-workaround-9a824cfe3358?source=rss-75db1e9102fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a824cfe3358</guid>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[dtm]]></category>
            <category><![CDATA[huawei-mobile-service]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[dynamic-tag-management]]></category>
            <dc:creator><![CDATA[Damla Ulutas]]></dc:creator>
            <pubDate>Tue, 11 May 2021 07:22:02 GMT</pubDate>
            <atom:updated>2021-05-11T07:40:37.393Z</atom:updated>
            <content:encoded><![CDATA[<h3>HMS DTM React Native Android Plugin — FuctionCall tipindeki CustomVariable için Workaround</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zeqqkIk7Rbg8Pzdk.jpeg" /></figure><p>Herkese merhaba, bugün bazı açıklamalarla birlikte React Native ve CustomVariable Workaround kullanan cross platformlar için DTM projemden bahsedeceğim.</p><p>Daha fazla açıklama için Huawei’in resmi internet sitesine bakabilirsiniz. <a href="https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/about-the-service-0000001055654101-V1">HMS React Native DTM Plugin</a> dökümanı takip ederek örnek uygulama yapabilirsiniz.</p><blockquote>! Başlamadan önce gerekli paketleri yüklediğinizden ve uygulamayı yapılandırdığınızdan emin olun.</blockquote><h3>Dynamic Tag Manager Nedir (DTM) ?</h3><p>Belirli olayları izlemek ve bu raporları üçüncü taraf analiz platformlarına rapor etmek için dinamik bir etiket yöneticisi olan HUAWEI Dynamic Tag Manager&#39;ı kullanıyoruz.</p><p>DTM aslında kendine ait bir apisi var diyemeyiz. Analytics kitin bir apisi olan onEvent apisini kullanır. Variable’ları kullanarak özel Tag’ler aracılığıyla bu api üzerinden raporlarma yapar. Hem Huawei Analytics platformuna hemde desteklenen 3. parti platformlarına raporlama yapmanızı sağlar.<br>HMS React Native DTM Plugin’ini kullanarak raporlama yaparken, bir çok farklı seneryo türüyle karşılaşabilirsiniz. Bu seneryolarda belli özel değişkenler oluşturmanız ve Tag’lerinizi de bu değişkenlerin durumuna göre tetiklemeniz gerekebilir. Bu yazıda CustomVariable kullanımından bahsedeceğiz.</p><p><strong>Seneryomuz aşağıdaki gibi olsun:</strong></p><blockquote>Ürünlerinizi sattığınız bir siteye sahip olun. Ürün çeşitlerinizden biri olan pantolonlarınız için bir satış rapor hazırlamak isteyin. Her pantolon satıldığında bir tag tetiklenmesini isteyin. Satılan ürünün fiyatı belli bir değerde olduğunda ekstra rapor oluşturun. Dolayısıyla, mevcut Tag&#39;iniz ile başka bir Tag tetikleyin. Bu senaryo için, AGC&#39;ye aşağıda gösterildiği gibi DTM console öğelerini eklemelisiniz.</blockquote><p><strong>Bir CustomTag Oluştur</strong></p><p><strong>1.</strong>Öncelikle bir <strong>Tag</strong> ve ona ait bir <strong>Condition</strong> oluşturmalısınız. “<strong>Extension</strong>” kısmı, “<strong>Custom function</strong>” olmalıdır. Bu, Tag class path ile tetiklendikten sonra Tag’a ait olan elemanları <strong>call</strong> metodu ile bize geri döndürecektir.</p><blockquote>Not: Ve bu <strong>returnMap</strong>, bir CustomVariable — FunctionCall tipini çağırmadan önce dönüş değerini istediğimiz gibi ayarlamamıza izin verecektir. Aslında bu workaround, CustomTag ve CustomVariable’ın kullanıcı etkinliğini artırmak için oluşturulmuştur.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/0*G5ZW-AmhWF6xKwgY.png" /><figcaption>Condition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/0*fy_8S9_Rqf95Xtae.png" /><figcaption>CustomTag</figcaption></figure><p><strong>2. </strong>Her satılan ürün için, onEvent API’si aracılığıyla bir <strong>Tag</strong> tetiklenecek HUAWEI Analytics’e <strong>eventId</strong>’sini gönderecektir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e304b0782082fd98a90e56e0710f6522/href">https://medium.com/media/e304b0782082fd98a90e56e0710f6522/href</a></iframe><p>Oluşturduğumuz <strong>Tag</strong> için yukarıdaki işlevi çağırdığımızda sunucu, <strong>CustomTag</strong> sınıfı üzerinden bir “<strong>map</strong>” objesi döndürür. Bu map&#39;i<strong> Function call </strong>için kullanacağız.<br><br>Server tarafından gönderilen dönüş değerini aldıktan sonra, bu değerleri <strong>Function call </strong>çağrılmadan önce <strong>returnValue</strong> değerine karar vermek ve önceden ayarlamak için kullanacağız.<br>3. <strong>CustomTag</strong>, workaround dışında da çağrılabilir, bu nedenle if-check kontrolü yapmamız gerekir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/460732a46164fef1fc4bf7dc4a6a47f1/href">https://medium.com/media/460732a46164fef1fc4bf7dc4a6a47f1/href</a></iframe><p><strong>setCustomVariable API’sini Çağır</strong></p><p>Bu fonksiyon, <strong>map</strong> objesindeki değerlerle istediğiniz ayarlamaları ve kontrolleri yaptıktan sonra <strong>returnValue</strong> değerini set etmenize olanak tanır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9fc3b0b105af9b27a9462f269803ece1/href">https://medium.com/media/9fc3b0b105af9b27a9462f269803ece1/href</a></iframe><p><strong>CustomVariable</strong> class&#39;ı, bir String değer döndürmenizi ister ve bu değer, <strong>CustomVariable — Function call</strong> değeri ile eşleşmezse Tag&#39;iniz tetiklenmez. Ve kullanıcı, <strong>Fuction call</strong> türünde <strong>CustomVariable</strong>&#39;ı çağırdıktan sonra <strong>returnValue</strong> değerini değiştiremez. Bu nedenle, öncelikle <strong>console</strong>’da <strong>returnValue</strong>&#39;ya karar vermemize yardımcı olacak parametrelerle bir <strong>CustomTag</strong> oluşturmalısınız. Bu <strong>CustomTag’</strong>in<strong> </strong>dönüş değeri ile, <strong>CustomVariable</strong> sınıfında <strong>returnValue</strong> değerini belirlemelisiniz. Ardından <strong>CustomVariable</strong>’ı tetiklemelisiniz.<br>1. Bir <strong>CustomVariable</strong> oluşturmanız gerekir. İstenilen değere ulaştığında bir <strong>Tag’</strong>in tetiklenmesi gerektiğinden, type’ı <strong>Function call</strong> olmalıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E_6xXhVKj2APIqZC.png" /><figcaption>CustomVariable</figcaption></figure><p><strong>2. </strong>Bir <strong>Condition</strong> oluşturmalısınız. <strong>onEvent</strong> api’sinin <strong>eventId</strong> değişkeninin değeri, tanımladığınız koşuldaki değerle eşleşmelidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/0*r6sGcmAHWqpHokry.png" /><figcaption>Condition</figcaption></figure><p><strong>3. </strong>Şimdi de bir <strong>Tag</strong> oluşturmanız gerekir. Bu Tag CustomVariable’ınızı dinler ve AppDebugging’de “<strong>Price100PantsSold</strong>” eventId’sini görürsünüz.(AppDebugging Huawei App Gallery Console’da Huawei Analytics’in altında bir bölümdür.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/0*Ldsyh05GehuLG0hc.png" /><figcaption>Tag</figcaption></figure><p><strong>CustomVariable için onEvent API’sini Çağırın</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b097823e6409bc2648af95864f479d92/href">https://medium.com/media/b097823e6409bc2648af95864f479d92/href</a></iframe><p>AGC-HUAWEI Analytics altında tüm <strong>eventId</strong>’leri görebileceğiniz bir AppDebugging bölümü bulunmaktadır. Aşağıda ki tetiklenmiş eventId’lerinizi görmelisiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xGE2icergNDc4JTX.png" /><figcaption>App.js</figcaption></figure><p>Her satış için “<strong>PantsSold</strong>” eventId’sini ve istenilen satış koşulu için de “<strong>Price100PantsSold”</strong> eventId’sini tetiklemiş oldunuz.<strong> </strong>Serneryoyu başarıyla gerçekleştirmiş oldunuz.</p><p>Daha fazla seneryo ve bilgi için lütfen <a href="https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/about-the-service-0000001055654101-V1">Huawei’s Developers </a>web sitesini inceleyebilirsiniz.</p><p>Tesekkürler :)</p><h4><strong>Kaynaklar</strong></h4><p><a href="https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/about-the-service-0000001055654101-V1">Document</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a824cfe3358" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/hms-dtm-react-native-android-plugin-fuctioncall-tipindeki-customvariable-i%C3%A7in-workaround-9a824cfe3358">HMS DTM React Native Android Plugin — FuctionCall tipindeki CustomVariable için Workaround</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Workaround for a CustomVariable of FunctionCall type with HMS DTM React Native Android Plugin]]></title>
            <link>https://medium.com/huawei-developers/workaround-for-a-customvariable-of-functioncall-type-with-hms-dtm-react-native-android-plugin-b34eb76f5009?source=rss-75db1e9102fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b34eb76f5009</guid>
            <dc:creator><![CDATA[Damla Ulutas]]></dc:creator>
            <pubDate>Thu, 14 Jan 2021 08:39:33 GMT</pubDate>
            <atom:updated>2021-03-24T20:22:20.865Z</atom:updated>
            <content:encoded><![CDATA[<h3>Workaround for a Custom Variable of Function Call type with HMS DTM React Native Android Plugin</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9LIa2SZrKLJYJeUKl26gtg.jpeg" /></figure><p>Hello everyone, today we will talk about my DTM kit project for cross platforms using React Native and Custom Variable workaround with some explanations.</p><p>Here is Huawei official documentation. You can make<a href="https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/about-the-service-0000001055654101-V1"> HMS React Native DTM Plugin</a> by following this document.</p><p>Before we start make sure you’ve installed the packages and configure the app.</p><h4>What is the Dynamic Tag Manager (DTM)?</h4><p>We use HUAWEI Dynamic Tag Manager, a dynamic tag manager, to track specific events and report these reports to third-party analytics platforms.<br>Reports via onEvent an HMS analytics API. The only API we need is onEvent.</p><p>When using DTM Plugin, we can come across different types of scenarios. In this article we will talk about using Custom Variable.</p><p>Let’s try to understand this with an example. Have a site where you sell your products. Make a report when you sell pants of your product types. So trigger a Tag. When the price of the product sold is at a certain value, create an extra report. So trigger another Tag with your current Tag. For this scenario, you should add DTM console elements in AGC as shown below.</p><p><strong>Create a Custom Tag</strong></p><p><strong>1.</strong>First, you should create a Tag and a condition belonging to it. The “Extension ” should be “Custom function”. This will return the elements belonging to Tag to us with the call method after the Tag is triggered via the classpath.</p><blockquote>Note: And this return map will allow us to set the return value as we want before calling a CustomVariable of FunctionCall type. Actually this workaround is create to increase the user activity of CustomTag and CustomVariable.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*qu07o1G8QZJHdD6acLt_vg.png" /><figcaption>Condition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*UOwOZSzIM71HWKUf7lO7UA.png" /><figcaption>CustomTag</figcaption></figure><p><strong>2. </strong>When each product is sold, we have sent a Tag to HUAWEI Analytics by triggering the onEvent API.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e304b0782082fd98a90e56e0710f6522/href">https://medium.com/media/e304b0782082fd98a90e56e0710f6522/href</a></iframe><p>When we call the above function for the tag we created, the server returns a map over the <strong>CustomTag</strong> class. We will use this map for <strong>Function call</strong>.<br><br>After getting the return value as shown by React Native, we will use these values ​​to decide and pre-set the <strong>returnValue </strong>value before <strong>Function call</strong> is called.</p><p><strong>3.</strong>CustomTag can also be called outside of the workaround so we have to if-check.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/460732a46164fef1fc4bf7dc4a6a47f1/href">https://medium.com/media/460732a46164fef1fc4bf7dc4a6a47f1/href</a></iframe><p><strong>Call setCustom Variable API</strong></p><p>This function allows you to set the returnValue value after making the adjustments and controls you want with the values ​​in the map.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9fc3b0b105af9b27a9462f269803ece1/href">https://medium.com/media/9fc3b0b105af9b27a9462f269803ece1/href</a></iframe><p><strong>Custom Variable </strong>class asks you to return a String value and if this value doesn’t match the value of your <strong>Custom Variable </strong>of <strong>Function call</strong> type, your Tag will not be triggered. And the user can’t change the <strong>returnValue </strong>value after calling <strong>Custom Variable </strong>in <strong>Function call </strong>type. Therefore, we first create a <strong>Custom Tag </strong>in the console with parameters that will help us decide the <strong>returnValue</strong>. With this <strong>Custom Tag&#39;s </strong>return map, we set the <strong>returnValue </strong>value in the <strong>Custom Variable </strong>class. Then we trigger <strong>Custom Variable</strong>.</p><p><strong>1. </strong>You have to create a <strong>Custom Variable</strong>. Its type should be <strong>Function call</strong> because when it reaches the desired value, a tag should be triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1Qv0TJkQl8EsixvV1nDuw.png" /><figcaption>CustomVariable</figcaption></figure><p><strong>2. </strong>You should create a <strong>Condition</strong>. The value of the <strong>eventId</strong> variable of the <strong>onEvent</strong> API must match the value in the condition you defined.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*dTWXBTzXS3HPRsNDM2psqA.png" /><figcaption>Condition</figcaption></figure><p><strong>3.</strong> Finally, you have to create a <strong>Tag</strong>. This tag listens to your Custom Variable and you display the “Price100PantsSold” event on <strong>AppDebugging</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*kwSIKgNvyJXJvEiT8pSBwQ.png" /><figcaption>Tag</figcaption></figure><h4>Call onEvent API for <strong>Custom Variable</strong>.</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b097823e6409bc2648af95864f479d92/href">https://medium.com/media/b097823e6409bc2648af95864f479d92/href</a></iframe><p>In the AGC-HUAWEI Analytics section, there is an <strong>AppDebugging</strong> section where you can see all your eventIds in section. We see that our eventIds are triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8DrSHqojr8jdL9FVCmgxVw.png" /><figcaption>AGC-HUAWEI Analytics - App Debugging</figcaption></figure><p>For detailed information, you can visit <a href="https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/about-the-service-0000001055654101-V1">Huawei&#39;s Developers website</a>. Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b34eb76f5009" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/workaround-for-a-customvariable-of-functioncall-type-with-hms-dtm-react-native-android-plugin-b34eb76f5009">Workaround for a CustomVariable of FunctionCall type with HMS DTM React Native Android Plugin</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>