<?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 A-Rohim Sama on Medium]]></title>
        <description><![CDATA[Stories by A-Rohim Sama on Medium]]></description>
        <link>https://medium.com/@arohimsama?source=rss-5e3a3371df77------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8f2Nb5Y7g8cSj7FWoeeegw.jpeg</url>
            <title>Stories by A-Rohim Sama on Medium</title>
            <link>https://medium.com/@arohimsama?source=rss-5e3a3371df77------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 00:20:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arohimsama/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 Android developer mocking response data from Server using Postman?]]></title>
            <link>https://medium.com/@arohimsama/how-android-developer-mocking-response-data-from-server-using-postman-3c1752157461?source=rss-5e3a3371df77------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c1752157461</guid>
            <category><![CDATA[postman]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[testing-tools]]></category>
            <dc:creator><![CDATA[A-Rohim Sama]]></dc:creator>
            <pubDate>Tue, 23 Jun 2020 16:13:37 GMT</pubDate>
            <atom:updated>2020-06-24T11:47:51.594Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*HvqOnuar12MJ3YPvgFwEjw.png" /></figure><p>As a mobile developer, we have to handle every response from the server to make sure our lovely application works properly.</p><p>To test every response from the Server we have to make mocking data in our project locally this might be consumed your time a lot and we have to change our mocking data when the server changing the response <strong>if</strong> we have Android, iOS and Web this task will be <strong>tripled.</strong></p><p>For testers you can test the application super easy, you don’t have to ask Back end team to change the response every test cases and wait a few hours for testing (T_T), Therefore once your application is easy to test <strong>the quality surely higher! \0/</strong></p><blockquote><em>Once you have your Mock server you can make UI testing for you regression testing easily.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*WUeuA9ZrXihfrEdM.gif" /><figcaption><strong>Perfect!!!</strong></figcaption></figure><p>This article I will show you how to use <strong>Postman </strong>as a Mock server where you can easily change the response and you also can make UI testing consistently</p><p>We will fetch <a href="https://developer.github.com/v3/repos/#list-public-repositories">some Public GitHub repositories</a> from GitHub and use the only <strong>name </strong>and <strong>description </strong>keys to be easy in this sample project.</p><h4>What is Postman?</h4><p>Postman is a collaboration platform for API development. Postman’s features simplify each step of building an API and streamline collaboration so you can create better APIs — faster. <a href="https://www.postman.com/">www.postman.com</a></p><h4>How to create a Mocking server using Postman?</h4><p>I assumed you already download and signed in, you can download <a href="https://www.postman.com/">Postman here</a></p><ol><li>Create a new Mock server by clicking on New at the left top and choose Mock Server</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r_A0jJRkYgwrKhmjUGGx3A.png" /></figure><p>2. Add <strong>/repositories</strong> path and Response Body <strong>“Mock body sample”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/0*sl7UwRmFETMsOeb2" /></figure><p>3. <strong>Name </strong>your lovely mock server!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/0*zr1CJ-b1Xh1hqh4S" /></figure><p>4. And create the mock server you will see your mock URL like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/0*gTg8qiv_1M7UpWjD" /></figure><p>5. Expand the <strong>“Github Mock Server” </strong>collection to see your API request and don’t forget to change you Environment to <strong>“Github Mock Server”</strong> at the top right and try to call your mock server by clicking send <strong>Boom!!!!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8H8knrNklHTUYnlSyR8a-w.png" /></figure><blockquote><strong>Congratulation!</strong> you have your own Mock server!!!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*9tkhs0FVapTK7UZp.gif" /></figure><h4>Time to put your magic on your mock server!</h4><p>From here you can update the response in this sample project we will add this response</p><ol><li>You can update the default response by click on Examples and choose Default.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*k7PipBaemDCbWgP_LDgGeA.png" /></figure><p>2. From here you can change your response, status code and don’t forget to add <strong>“Content-Type: application/json”</strong> into your response headers to tell the response format to the someone who calls this API</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XuFBtvskhvonaijP" /></figure><p>3. Save your config and try to call API again you will see your response data like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*AmB3Hwbci8wKRQQepJEitQ.png" /></figure><blockquote><strong>Yes!, </strong>all done for the mock server!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*EwWzQlM1xcpi62WO.gif" /></figure><blockquote><strong>Let’s</strong> try the mock server on our Android Project.</blockquote><h4>You need mock build type to get your mock server URL separately from the Production!</h4><p>There are many ways to do this, one way that it works well with both android library module and android application module.</p><ol><li>Create a <strong>common-properties.gradle</strong> and save it to the root of the project this way you can reuse the config across modules</li></ol><p>2. Import <strong>common-properties.gradle</strong> into your <strong>app/build.gradle</strong></p><pre>apply from &#39;../<strong>common-properties</strong>.gradle&#39;<br>...<br>android {<br>...</pre><p>3. Re-sync and switch your Build variant to mock and rebuild your project, after you re-build your project successfully you will see BASE_API_URL in your auto-generated BuildConfig file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*VOe-ZgX4_zm-LHLKIg6rGw.png" /></figure><p>4. Now you can access your base API URL everywhere in your app.</p><pre>BuildConfig.BASE_API_URL</pre><h4>Run Android App on Production!</h4><p>With this way, you can test only when API Server response success and no internet connection!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/0*4Oz91omSPQYGBdrc.jpg" /><figcaption><strong>Production server!</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/0*5B637vJd2HwHswtL.jpg" /><figcaption><strong>No internet connection</strong></figcaption></figure><h4>But!!!, with the mock server!</h4><p>with the mock server, you can test a lot more cases</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/0*Cg3KLRlXrtEaoG1S.jpg" /><figcaption><strong>You can mock some items</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/0*rIT0PRhPbJ3F6vXd.jpg" /><figcaption><strong>You can mock an empty list</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/0*DhfjLtkq1IQtByVu.jpg" /><figcaption><strong>You can mock 500 Internal server error</strong></figcaption></figure><p>You can explore code sample here <a href="https://github.com/arohim/SampleMockServerWithPostman">https://github.com/arohim/SampleMockServerWithPostman</a></p><h4>Conclusions</h4><ol><li>You don’t have to make some mocking data inside the front-end projects, you <strong>can use the mock server many places.</strong></li><li>One place changing.</li><li>Easy to communicate between Back-end and Front-end with an amazing tool from Postman to make API documents.</li><li>Testers can test all the expected test cases.</li><li>And the most important is this can speed<strong> up the development time</strong> because you don’t have to wait for Back-end team mock the data for testing any more.</li></ol><p>Thank you for reading my article if you guys have other ways please share me I love to learn new ways (^_^)</p><h4>Resources</h4><ul><li><a href="https://learning.postman.com/docs/postman/mock-servers/setting-up-mock/">https://learning.postman.com/docs/postman/mock-servers/setting-up-mock/</a></li><li><a href="https://www.youtube.com/watch?v=tXjoya11RAg">POST/CON 2018 workshop in review: Mock servers</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c1752157461" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kaidee App ลดขนาด APK 41% ยังไง!]]></title>
            <link>https://medium.com/@arohimsama/kaidee-app-%E0%B8%A5%E0%B8%94%E0%B8%82%E0%B8%99%E0%B8%B2%E0%B8%94-apk-41-%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-6ef0c8ececef?source=rss-5e3a3371df77------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ef0c8ececef</guid>
            <category><![CDATA[app-bundle]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kaidee]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[A-Rohim Sama]]></dc:creator>
            <pubDate>Sun, 16 Jun 2019 15:12:45 GMT</pubDate>
            <atom:updated>2019-06-17T09:57:03.986Z</atom:updated>
            <content:encoded><![CDATA[<h3>ทำไมถึงต้องลด ??</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Chs5_KxVMnEyVhQlhC7HQ.png" /><figcaption><a href="https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2">https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2</a></figcaption></figure><p>ตั้งแต่ Google play เปิดในปี 2012 Avg Apk ใหญ่ขึ้นเรื่อยๆ แม้ว่า มือถือปัจจุบันจะมีพื้นที่ให้ใช้มากขึ้นแต่ก็ยังไม่พอสำหรับคนที่ชอบถ่ายรูปหรือเล่นเกมที่ภาพสวยๆ ไฟล์ ใหญ่ๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CQqCwXjXEpgYoVQf" /><figcaption><a href="https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2">https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*LclZTtzEQnGSBLza" /><figcaption><a href="https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2">https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2</a></figcaption></figure><p>ในงาน Google I/O 18 ปีทีแล้ว เขามี Research มาแชร์ว่าเมื่อ APK ใหญ่ขึ้นทุกๆ 6MB ส่งผลให้ Conversion rate Install ลดลง 1% (<a href="https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2">อ่านเพิ่มเติม</a>)</p><p>App size ใหญ่มีข้อเสียอะไรบ้าง (<a href="https://www.youtube.com/watch?v=QdoEcfibG-s">ดูเพิ่มเติมในงาน Android Dev Summit 18</a>)</p><ul><li>Conversion rate ในการโหลดและอัพเดทลดลงเรื่อยๆ ตามขนาดของแอปที่ใหญ่ขึ้น</li><li>Download ช้า แล้วยิ่งเน็ตมือถือต่างจังหวัดบ้านเรานี้ไม่ต้องห่วง</li><li>เปอร์เซ็นต์การ Uninstall สูง เพราะผู้ใช้จำนวนมากมีพื้นที่สำหรับลงแอปใหม่ๆ ไม่พอเลยต้องลบแอปฯที่ใหญ่ๆ ออก</li><li>คนอัพเดทน้อย เพราะขนาดของแอปใหญ่ขึ้น</li></ul><p>ส่วนที่ทำให้แอปใหญ่ใน APK ใหญ่ประกอบไปด้วย โค้ดของเราเองส่วนนึง และก็ใน apk ของเรายังมี CPU Architectures, Screen Densities และก็ภาษาที่แอปเรา support และอื่นๆ ถ้าใครที่ไม่เคยใช้ Multiple APKs มาก่อน ก็จะ Build APK ที่มี ทุกๆ CPU Architecture, ทุกๆ Screen Densities และทุกๆภาษาจึงทำให้แอปใหญ่มาก…ซึ่งมือถือแต่ละเครื่องแต่ละรุ่นก็มี CPU Architecture, Screen Densities และภาษาอันเดียวเท่านั้นที่ใช้จริงๆ นี้คือสาเหตุที่ทำให้ APK ใหญ่…..</p><p>ส่วนที่ใหญ่ที่สุดของแอป Kaidee คือ Library CPU Architecture ใหญ่มาก!!! 10.3MB</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xrnPMkY6pnpAXZoQxjDGGQ.png" /><figcaption>Android Kaidee App</figcaption></figure><p>ในงาน Google I/O 2018 Google ได้แนะนำ <strong>App Bundle</strong> เป็นวิธีการ Build App แบบใหม่แทนที่เรา Build Apk เองก็ให้ Google Build APK ให้เราแทน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*EpcGZcCxmFsEya9gQLd2jQ.gif" /><figcaption>Source : <a href="https://android-developers.googleblog.com/2018/05/io-2018-everything-new-in-google-play.html">https://android-developers.googleblog.com/2018/05/io-2018-everything-new-in-google-play.html</a></figcaption></figure><p>Google Play จะ Build APK ให้ตามที่เรา CPU Architecture, Screen Densities และภาษา แต่เรา config เองได้ใน Gradle น่ะจ๊ะ <a href="https://developer.android.com/platform/technology/app-bundle">https://developer.android.com/platform/technology/app-bundle</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Zk3JzugBbGu5g1FmPRfcA.png" /></figure><p>หลังจาก Upload File App bundle Google play ก็จะ Build APKs ให้เรียบร้อย!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIghNQfOLuBbH-H2DYveRA.png" /></figure><p>และนี้คือหลังจากที่แอป Kaideeใช้ App Bundle แอปเล็กลงจาก 24.5MB ลดเหลือ 14.7MB ลดได้เกือบครึ่ง แหนะ!!! ที่เหลือก็อย่าลืมแก้ให้น้อง CI/CD System ให้ build เป็น App bundle ด้วยน่ะจ๊ะ</p><h3><strong>Bonus!!!</strong></h3><p>App bundle ไม่ได้แค่ ลด App size เท่านั้นนะ เออ O_o เราสามารถลด App size มหาศาลกว่านี้ โดยการ!!! ใช้ประโยชน์จาก <a href="https://developer.android.com/studio/projects/dynamic-delivery#modularize">Dynamic Feature</a> ง่ายๆคือ ให้ User โหลดเฉพาะ Feature ที่จำเป็นเท่านั้นตอนติดตั้ง!! ค่อยโหลด Feature อื่นก็ต่อเมื่อจำเป็น ต้องใช้เท่านั้น……..ซึ่งทีม Android @Kaidee กำลัง Refactor ให้โค้ดแยกเป็น Module เพื่อที่จะทำ Dynamic Feature ได้น่ะฮ่ะ รออ่าน บทความต่อไปน่ะฮ่ะ…</p><p>ส่วนใครสนใจอยากจะเริ่มทำ App bundle แต่ไม่รู้ต้องเริ่มยังไง Google มี <a href="https://codelabs.developers.google.com/codelabs/your-first-dynamic-app/index.html#0">Code lab</a> ให้ครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ef0c8ececef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ทำ Android Studio Plugin ช่วย Migrate Legacy Code]]></title>
            <link>https://medium.com/@arohimsama/%E0%B8%97%E0%B8%B3-android-studio-plugin-%E0%B8%8A%E0%B9%88%E0%B8%A7%E0%B8%A2-migrate-legacy-code-11d5b4aa51ae?source=rss-5e3a3371df77------2</link>
            <guid isPermaLink="false">https://medium.com/p/11d5b4aa51ae</guid>
            <category><![CDATA[android-studio-plugins]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[A-Rohim Sama]]></dc:creator>
            <pubDate>Sun, 19 May 2019 06:43:46 GMT</pubDate>
            <atom:updated>2019-05-19T07:20:02.394Z</atom:updated>
            <content:encoded><![CDATA[<p>ที่ Kaidee ช่วงนี้ทีม Android กำลัง Refactor Code ชุดใหญ่ให้เป็น Clean Architecture แบบ Modular pattern เรามี 48 ฟีเจอร์ที่ต้องย้ายให้หมด เนื่องจากโค้ดมันใหญ่มว๊ากกก เราจึงต้องเขียนใหม่ทีละส่วนโดยเริ่มจาก Data Layer, Cache และ Remote ออกเป็น Module ทีละฟีเจอร์ รวมถึง Unit testing ใช้เวลา 2–3 วันต่อ 1 ฟีเจอร์ กว่าจะย้ายหมดใช้เวลา ประมาณ 6 เดือน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Gyq-yvacONGrcsRu.gif" /></figure><p>เพื่อความประหยัดเวลาในการ Migrate Legacy Code จึงยอมลงทุนเวลาในการทำ Android studio Plugin เพื่อ Migrate ให้กับแอป Kaidee ขึ้นมา 2 อาทิตย์ เพื่อทำ Plugin นี้<a href="https://github.com/arohim/eddga"> </a><a href="https://plugins.jetbrains.com/plugin/12213-android-clean-architecture-generator">https://plugins.jetbrains.com/plugin/12213-android-clean-architecture-generator</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_1Tf78Ss7NG0zXDQzxkdbg.png" /></figure><p>ในที่สุดเราก็มี Plugin ในการทำ Migrate Legacy Code แล้ว ไชโย!!!!!! Plugin ตัวนี้สร้างโค้ดให้หมดทุก Layer โดยอิงจาก JSON ที่เรากรอกเข้าไปในฟอร์ม เชื่อไม! ใช้เวลาแค่ 30 นาที ในการทำ Data Layer, Cache และ Remote + Mappers มี Unit testing ให้ด้วยนะ เออ!!! Code reivew ก็แทบจะไม่มีอะไรเลยเพราะใช้ Plugin สร้างหมด แล้วก็บวกอีก 1 ชม. ในการ Integrate กับโค้ดเดิมแล้วก็แก้ Unit test เดิมที่มีอยู่แล้วให้ใช้กับโค้ดชุดใหม่เป็นอัน เสร็จสิ้นพิธีกรรม</p><p>ต่อยอด……ผมคิดว่าเราสามารถต่อยอดไปทำอย่างอื่นต่อ เช่น</p><ul><li>plugin ที่สามารถสร้างหน้าใหม่ขึ้นมาแล้วเซตอัพตาม template, style ของ Kaidee เอง state ของแต่ละหน้าเมื่อต่อ network ไม่ได้ มีหน้า default ให้ สร้าง activity และ fragment, xml ให้พร้อมใช้งาน ช่วยประหยัดเวลาได้เยอะ!!!</li><li>หรือจินตนาการไว้ไกลกว่านั้นคือทำ plugin ที่เป็น template เช่นหน้า Ad listing ของ kaidee สร้างทีเดียวได้ทั้งฟีเจอร์พร้อม api ครบ เตรียมตัว ว่างงานกันละทีนี้…+_O</li></ul><p>สำหรับใครที่เริ่มสนใจอยากสร้าง Plugin เป็นของตัวเอง เอาไว้ให้แอพสร้างแอพขึ้นมาเอง ลองเข้าไปดู <a href="https://www.jetbrains.org/intellij/sdk/docs/basics.html">official document</a> ได้ที่ นี้น่ะครับ ไม่ยาก อย่างที่คิด แค่เขียน Kotin หรือ Java เป็น และทำความเข้าใจว่าเขามี API อะไรให้ใช้บ้าง แค่นี้ก็ทำได้แล้ว หรือจะต่อยอดจาก plugin ที่คนอื่น open source เอาไว้ก็ได้</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11d5b4aa51ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android ทำ Modular, instant และ Dynamic Feature คุ้มไม!!]]></title>
            <link>https://medium.com/@arohimsama/android-%E0%B8%97%E0%B8%B3-modular-instant-%E0%B9%81%E0%B8%A5%E0%B8%B0-dynamic-feature-%E0%B8%84%E0%B8%B8%E0%B9%89%E0%B8%A1%E0%B9%84%E0%B8%A1-39ba8d6b4d77?source=rss-5e3a3371df77------2</link>
            <guid isPermaLink="false">https://medium.com/p/39ba8d6b4d77</guid>
            <category><![CDATA[instant-apps]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[A-Rohim Sama]]></dc:creator>
            <pubDate>Sun, 17 Mar 2019 09:54:58 GMT</pubDate>
            <atom:updated>2019-04-10T12:09:38.067Z</atom:updated>
            <content:encoded><![CDATA[<h3>Android ทำ Instant App คุ้มไม!!</h3><p>ผมสนใจและติดตามเรื่อง Instant App และ Android Bundle มาอยู่พักใหญ่ๆ ก็ได้หาข้อมูลเรื่อยๆ ก็ไม่ได้รู้สึกตื่นเต้นอะไรมาก จนวันนึงผมมารื้อ Codebase ครั้งใหญ่เลยศึกษาข้อมูล Code Architecture ของ Clean Architecture ซึ่งก็ใช้อยู่แล้ว แต่รูปแบบการวาง Module การวาง Folder แต่ละเจ้าก็ไม่เหมือนกัน จนมาดู Video ของงาน Google I/O 2018 อีกรอบเลยอยากมาแชร์ความตื่นเต้น คุ้มไหมที่จะทำ Instant App</p><p>จากงาน Google I/O 2017 ที่ Google ได้ประกาศว่าสามารถใช้ Instant App ได้และเมื่อปี 2018 ในงาน Google I/O Google ก็ประกาศว่าปัจจุบันใช้ Instant App บนเกมได้แล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*6_iFhg09EYxEDMiaZLaFyA.gif" /><figcaption>จากงาน Google I/O 2018 <a href="https://www.youtube.com/watch?v=0raqVydJmNE&amp;t=27m28s">https://www.youtube.com/watch?v=0raqVydJmNE&amp;t=27m28s</a></figcaption></figure><p>Instant App ทำให้ user มีทางเลือกมากกว่าแค่ Install กับไม่สนใจเลย Instant App มีปุ่ม “Try Now” ให้เขาลองทำใช้แอปก่อนที่จะลงเครื่องจริงๆ ลองนึกว่า Conversion rate แล้ว ว๊าววววว o-o O-O!!</p><h4>มาดูในมุมของ Banner บ้าง</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*LccIczALHj2ugWzQHM2YtQ.png" /><figcaption>ภาพจากงาน Google I/O 2018</figcaption></figure><p>Banner ในหน้า Google play App มี Collections สำหรับ Instant App โดยเฉพาะด้วยดูน่าลองมาก โดยที่เราไม่ทำอะไรเพิ่มเติมเลย</p><h4>ถ้าเป็น Ad ละ</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*__p-qDPEhYKa-kdYLY9VPA.png" /><figcaption>ภาพจากงาน Google I/O 2018</figcaption></figure><p>แทนที่จะให้ user ดาวน์โหลดเกมขนาด 1GB สมมติ! ก็กด Try Now ก่อนแล้วโหลดทีหลังได้ ลองนึกถึง Convertion rate เป็นอะไรที่น่าสนใจมาก ตาลุกวาววว!!!!</p><h4>Deeplink ละ</h4><p>สมมติ! เพื่อนส่ง ลิ้งวีดีโอ……(สนุกๆ o_O) มาให้ แต่เราไม่มีแอปละ!!! ต้องใช้เวลากี่นาทีกว่าจะดู วีดี..โอ..นั้น..ได้….(o_OOOO ฮืมมมม) (ดูก่อนค่อยลงแอป ทีหลังได้ไม +-+ o–O -)))</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*1GGtfVJ7IGeZlwTLuN0Pmg.png" /><figcaption>ภาพจากงาน Google I/O 2018</figcaption></figure><h4>แล้วถ้า search จาก Google เจอ content ของเราก็เปิดแอปได้เลยโดยที่ไม่ต้องติดตั้ง!!!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*X7UIY0W9syLXvGYB7BfEQg.png" /><figcaption>ภาพจากงาน Google I/O 2018</figcaption></figure><h4>— ถือว่าเป็นช่องทางใหม่ในการเพิ่ม User ใหม่ๆ ให้กับแอปของเราอีกทั้งยัง UX ที่ดีให้กับ User ใหม่ๆที่แสนจะ sensitive ของเรา</h4><p>มาดูตัวอย่างกัน — ข้อมูลจากงาน Google I/O 2018</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B-0tECroHP7TAGC_Zlcj4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TQYmni4Iy5Vk1VVLiaVfZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDvn37k4sKaD-WO6XocliQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tHuUvRFZIvc_TYVpWRiiuQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMrN2htEdQHPBHK2-_Nh1Q.png" /></figure><p>นี้และครับ สำหรับความตื่นเต้นที่ผมอยากแชร์ แต่ในมุมของ Developer แล้วงานหนักหน่อย ต้องรื้อโค้ดชุดใหญ่!!!! T_T T_T</p><p>Reference <a href="https://www.youtube.com/watch?v=0raqVydJmNE&amp;t=27m28s">https://www.youtube.com/watch?v=0raqVydJmNE&amp;t=27m28s</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39ba8d6b4d77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เมื่อต้อง Debug android activities back Stack.]]></title>
            <link>https://medium.com/@arohimsama/%E0%B9%80%E0%B8%A1%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87-debug-android-activities-back-stack-fde3865d0e41?source=rss-5e3a3371df77------2</link>
            <guid isPermaLink="false">https://medium.com/p/fde3865d0e41</guid>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[androiddebugging]]></category>
            <dc:creator><![CDATA[A-Rohim Sama]]></dc:creator>
            <pubDate>Tue, 17 Jan 2017 14:14:27 GMT</pubDate>
            <atom:updated>2017-01-17T14:16:19.508Z</atom:updated>
            <content:encoded><![CDATA[<p>เมื่อต้อง Debug android activities back Stack.</p><p>โดยปกติกด Back จาก Activity มันจะย้อนกลับไป Activity ก่อนหน้าทีนี้ Pain point ลองนึกภาพว่าแอพใหญ่มี Activity เยอะมากโดดไปโดดมาเต็มไปหมด แอพนั้นเราไม่ได้เป็นคนเขียนตั้งแต่แรก หรืออาจจะเขียนไว้นานแล้ว หรือไม่ได้เขียนคนเดียว ดังนั้นการ Debug ยากมาก…..!!!!!</p><p>ทีนี้ Android Studio มี<a href="https://developer.android.com/studio/profile/android-monitor.html">Android Monitor</a> สามารถดู <a href="https://developer.android.com/studio/profile/am-sysinfo.html#sysinfo"><strong>System Information</strong></a><strong> </strong>ต้องเสียบมือถือเปิด Debug mode หรือไม่ก็ Emulator ก็ได้…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*YdHAQ575I8F-ODovVkEPSg.png" /><figcaption>View -&gt; Tool Window -&gt; Android Monitor</figcaption></figure><p>ทุกครั้งที่กด Activity Manager State Android Studio มันจะเก็บ log file ให้อัตโนมัติเพื่อที่จะได้ Debug ทีละ state ได้นั้นเอง เมนูอยู่ที่แถบซ้ายมือ แต่ถ้าใครหาไม่เจอก็ลองไปที่ View -&gt; Tool Window -&gt; Captures</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*UuOrraLpSYhYTHzQTRdlRw.png" /><figcaption>View -&gt; Tool Window -&gt; Captures</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*K2tI1aveec2HwZBMC5UNrg.png" /></figure><p>เมื่อเปิดไฟล์ออกมาจะเห็น System information เยอะมาก วิธีดูคือไล่จากบนลงล่าง Activity ที่กำลังเปิดล่าสุดจะอยู่อันบนสุดและเรียงต่อลงตามลำดับ</p><pre><strong>ACTIVITY package.name.app.SearchResultActivity </strong></pre><pre>อันนี้เป็น Activity ที่กำลังที่ Active อยู่จะเห็นว่ามีข้อมูลเยอะพอสมควร</pre><p>เจ้าตัว Android Monitor มีของเล่นอีกเยอะ…ลองเล่นกันดูครับ!!!</p><p>หรือถ้าใครชอบ Command line</p><pre>$ adb shell dumpsys activity activities | grep &quot;package.name.app&quot;</pre><p>แล้ว grep เฉพาะชื่อ package name ของแอพเราเข้าไป บรรทัดท้ายสุด เรียบจากบนลงล่างเหมือนกัน อันนี้ดูง่ายกว่าไม่ต้อง scroll ยาวกว่าจะเจอ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yB5sup0kSpm6-s_uBuKx6g.png" /></figure><p>Reference:</p><p><a href="https://developer.android.com/studio/profile/android-monitor.html">https://developer.android.com/studio/profile/android-monitor.html</a> <a href="https://developer.android.com/studio/profile/am-sysinfo.html#sysinfo">https://developer.android.com/studio/profile/am-sysinfo.html#sysinfo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fde3865d0e41" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>