<?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 Brijesh Gupta on Medium]]></title>
        <description><![CDATA[Stories by Brijesh Gupta on Medium]]></description>
        <link>https://medium.com/@brijesh.vicky?source=rss-eab85b268681------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DJZqPPw2Esek8xhR.</url>
            <title>Stories by Brijesh Gupta on Medium</title>
            <link>https://medium.com/@brijesh.vicky?source=rss-eab85b268681------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:28:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brijesh.vicky/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[Improve Accuracy of OCR using Image Preprocessing]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/cashify-engineering/improve-accuracy-of-ocr-using-image-preprocessing-8df29ec3a033?source=rss-eab85b268681------2"><img src="https://cdn-images-1.medium.com/max/700/1*pSUZFdoaiWrJaxQU31ATHg.jpeg" width="700"></a></p><p class="medium-feed-snippet">OCR stands for Optical Character Recognition, the conversion of a document photo or scene photo into machine-encoded text. There are many&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/cashify-engineering/improve-accuracy-of-ocr-using-image-preprocessing-8df29ec3a033?source=rss-eab85b268681------2">Continue reading on Cashify Engineering »</a></p></div>]]></description>
            <link>https://medium.com/cashify-engineering/improve-accuracy-of-ocr-using-image-preprocessing-8df29ec3a033?source=rss-eab85b268681------2</link>
            <guid isPermaLink="false">https://medium.com/p/8df29ec3a033</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Brijesh Gupta]]></dc:creator>
            <pubDate>Tue, 11 Sep 2018 04:50:06 GMT</pubDate>
            <atom:updated>2018-09-11T05:08:55.652Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Android App Bundle : New way to reduce APK size]]></title>
            <link>https://medium.com/cashify-engineering/android-app-bundle-new-way-to-reduce-apk-size-d5a5982f04ac?source=rss-eab85b268681------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5a5982f04ac</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[instant-apps]]></category>
            <category><![CDATA[apk-size]]></category>
            <category><![CDATA[publishing]]></category>
            <category><![CDATA[optimization]]></category>
            <dc:creator><![CDATA[Brijesh Gupta]]></dc:creator>
            <pubDate>Sat, 12 May 2018 08:35:26 GMT</pubDate>
            <atom:updated>2018-05-14T15:49:02.840Z</atom:updated>
            <content:encoded><![CDATA[<p>Android App Bundle is a new upload format of application on play store. It includes DEX bytecode, resources and manifest which are required to generate different and optimise APK according to a user. User has different CPU architectures and language preferences so it supports dynamic delivery. Google play generate APK according to user preferences from app bundle so developer no need to maintain multiple APK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8si3tvr4FK1ecvCGJ8uUA.png" /></figure><h3><strong>Benefits of App Bundle</strong></h3><p>App Bundle supports Dynamic delivery in which it follows split APKs mechanism. Split APKs mechanism came into play with Instant App available on Android 5.0 (API Level 21) or higher. As the name suggests it splits APK into three major APKs which can dynamically serve according to their type.</p><p><strong>Base APK</strong> as the name suggests it is base which includes code and resources which other Split APKs can access. It provides the basic functionality of your app when the user installs Apk for the first time from play store.</p><p><strong>Configuration APKs</strong> consists of native libraries, CPU architecture, resources and language preference . So, there are many configuration APKs depending on CPU architecture, resources for different screen density and language preferences of the user. When the user downloads the application from play store, user specific configuration APK is installed along with the Base APK.</p><p><strong>Dynamic Feature APKs</strong> contains code and resources corresponding to different screen density. It gets downloaded and installed only when it is required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HmVV3Eo5SdFtHT_WujWH_g.png" /><figcaption>Showing Simple and Split APKs Mechanism</figcaption></figure><p>The first diagram shows the Base APK and specific Configuration APK which gets installed at the time of download from play store. Following it, dynamic APK and specific Configuration APK are installed on demand. It is also called Flexible serving mechanism.</p><p>Split APK supports Android 5.0 and higher, so it reduces Apk size on Android API Level above 20.</p><p>Developer doesn’t need to manage multiple APKs for different screen densities and cpu architectures . Consequently, this reduces APK size.</p><p>Split APK mechanism came into play for the first time with the launch of Instant App feature which supported Split APK and dynamic delivery of content for the first time . So Android App bundle also supports instant app and the split mechanism to achieve it.</p><h4>Steps to generate App Bundle</h4><p>First go to Build &gt; Generate Signed Bundle / APK and select Android App Bundle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WlojZQKYi3DI11e9WhUUog.png" /><figcaption>Option to select App Bundle</figcaption></figure><p>Next step is to select deploy key and enter the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h9DkMEyz3MmONqdP4r3yMg.png" /></figure><p>Finally, put all the detail and select flavour to generate App Bundle. Which will be uploaded on play store.</p><h4>Test you App Bundle</h4><p>After having successfully generated App Bundle, you can test its behaviour on the user device and also generate APK according to a user with the help of bundletool. While it is generating APK file for a device it also includes set of all APKs which are required for user.</p><pre>bundletool build-apks --bundle=&quot;app bundle path&quot; --output=&quot;output path&quot;<br><strong>--ks=/path/keystore.jks<br>--ks-pass=pass:password<br>--key-pass=pass:password</strong></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5a5982f04ac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cashify-engineering/android-app-bundle-new-way-to-reduce-apk-size-d5a5982f04ac">Android App Bundle : New way to reduce APK size</a> was originally published in <a href="https://medium.com/cashify-engineering">Cashify Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Steps to use Flatbuffers]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@brijesh.vicky/steps-to-use-flatbuffers-abbd7addeeb9?source=rss-eab85b268681------2"><img src="https://cdn-images-1.medium.com/max/1080/1*zg_7H6V_lBUL5hppUPTX4g.png" width="1080"></a></p><p class="medium-feed-snippet">FlatBuffers is a project from Google that allows you to encode and decode data at great speed. Here&#x2019;s a quick tutorial on how to install&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@brijesh.vicky/steps-to-use-flatbuffers-abbd7addeeb9?source=rss-eab85b268681------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@brijesh.vicky/steps-to-use-flatbuffers-abbd7addeeb9?source=rss-eab85b268681------2</link>
            <guid isPermaLink="false">https://medium.com/p/abbd7addeeb9</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[flatbuffers]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[Brijesh Gupta]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 19:30:23 GMT</pubDate>
            <atom:updated>2018-01-28T19:30:23.919Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Android Optimization — Flatbuffers Vs JSON]]></title>
            <link>https://medium.com/@brijesh.vicky/android-optimization-flatbuffers-vs-json-3c9f101dc44e?source=rss-eab85b268681------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c9f101dc44e</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[parsing]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[flatbuffers]]></category>
            <dc:creator><![CDATA[Brijesh Gupta]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 18:41:44 GMT</pubDate>
            <atom:updated>2018-01-28T19:34:21.347Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://google.github.io/flatbuffers/index.html#flatbuffers_overview">FlatBuffers</a> is an efficient cross platform serialization library for C++, C#, C, Go, Java, JavaScript, PHP, and Python. It was originally created at Google for game development and other performance-critical applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*NppNoQ4wMtVAbXSwzPszng.png" /><figcaption>FlatBuffers Stats</figcaption></figure><h4><strong>Why use FlatBuffers?</strong></h4><ul><li><strong>Access to serialized data without parsing/unpacking</strong> — What sets FlatBuffers apart is that it represents hierarchical data in a flat binary buffer in such a way that it can still be accessed directly without parsing/unpacking, while also still supporting data structure evolution (forwards/backwards compatibility).</li><li><strong>Memory efficiency and speed</strong> — The only memory needed to access your data is that of the buffer. It requires 0 additional allocations (in C++, other languages may vary). FlatBuffers is also very suitable for use with mmap (or streaming), requiring only part of the buffer to be in memory. Access is close to the speed of raw struct access with only one extra indirection (a kind of vtable) to allow for format evolution and optional fields. It is aimed at projects where spending time and space (many memory allocations) to be able to access or construct serialized data is undesirable, such as in games or any other performance sensitive applications. See the <a href="https://google.github.io/flatbuffers/flatbuffers_benchmarks.html">benchmarks</a> for details.</li><li><strong>Flexible</strong> — Optional fields means not only do you get great forwards and backwards compatibility (increasingly important for long-lived games: don’t have to update all data with each new version!). It also means you have a lot of choice in what data you write and what data you don’t, and how you design data structures.</li><li><strong>Tiny code footprint</strong> — Small amounts of generated code, and just a single small header as the minimum dependency, which is very easy to integrate. Again, see the benchmark section for details.</li><li><strong>Strongly typed</strong> — Errors happen at compile time rather than manually having to write repetitive and error prone run-time checks. Useful code can be generated for you.</li><li><strong>Convenient to use</strong> — Generated C++ code allows for terse access &amp; construction code. Then there’s optional functionality for parsing schemas and JSON-like text representations at runtime efficiently if needed (faster and more memory efficient than other JSON parsers).</li><li>Java and Go code supports object-reuse. C# has efficient struct based accessors.</li><li><strong>Cross platform code with no dependencies</strong> — C++ code will work with any recent gcc/clang and VS2010. Comes with build files for the tests &amp; samples (Android .mk files, and cmake for all other platforms).</li></ul><p><strong>FlatBuffers Vs JSON</strong></p><p>JSON — probably everyone knows this lightweight data format used in almost all modern servers. It weights less, is more human-readable and in general is more dev-friendly than old-fashined, horrible xml. JSON is language-independend data format but parsing data and transforming it to e.g. Java objects costs us time and memory resources.<br>Several days ago Facebook announced big performance improvement in data handling in its Android app. It was connected with dropping JSON format and replacing it with FlatBuffers in almost entire app. <a href="http://facebook.com/">Facebook</a> uses it for client-server communication in their Android app. They have a nice <a href="https://code.facebook.com/posts/872547912839369/improving-facebook-s-performance-on-android-with-flatbuffers/">article</a> explaining how it speeds up loading their posts.</p><p>If you want to use Flatbuffers read my next article.</p><h4><a href="https://medium.com/@brijesh.vicky/steps-to-use-flatbuffers-abbd7addeeb9">Steps to use Flatbuffers</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c9f101dc44e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to get Storage Stats In Android O (API 26)]]></title>
            <link>https://medium.com/cashify-engineering/how-to-get-storage-stats-in-android-o-api-26-4b92eca6805b?source=rss-eab85b268681------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b92eca6805b</guid>
            <category><![CDATA[android-o]]></category>
            <category><![CDATA[android-storage-stats]]></category>
            <category><![CDATA[android-oreo]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Brijesh Gupta]]></dc:creator>
            <pubDate>Sun, 21 Jan 2018 16:34:19 GMT</pubDate>
            <atom:updated>2018-10-03T05:56:48.965Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*e-gfKJncHcpbfJ4KNNB4tg.png" /><figcaption>Android Storage Statistics</figcaption></figure><h3><strong>Android Stats Manager</strong></h3><p>From Android O (API 26) StorageStatsManager class is available to Access detailed storage statistics. It provides a summary of how apps, users, and external/shared storage is utilizing disk space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*IeJjFZGKdrnHAKlfc_yacw.png" /><figcaption>Android Storage</figcaption></figure><p><strong>Permission</strong></p><p>No permissions are required when calling these APIs for your own package or UID. However, requesting details for any other package requires the android.Manifest.permission#PACKAGE_USAGE_STATS Permission, which is a system-level permission that will not be granted to normal apps. Declaring that permission expresses your intention to use this API and the end user can then choose to grant this permission through the Settings application.</p><p>You can easily get Storage Volume Statistics using the following piece of code. It gives you free space on the requested storage volume and the total size of the underlying physical media that is hosting this storage volume.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1735e3355034280365dc0aa7940ace6/href">https://medium.com/media/e1735e3355034280365dc0aa7940ace6/href</a></iframe><p><strong>Query Stats For Package</strong></p><p>You can get storage statistics for a specific package on the requested storage volume. To get storage stats for a particular package, you will need UserHandler, UUID and package name.</p><p>UUID represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.</p><p>The following piece of code will fetch the required data:</p><p><strong>getAppBytes</strong> Return the size of app. This includes APK files, optimized compiler output, and unpacked native libraries.</p><p><strong>getDataBytes</strong> Return the size of all data. This includes files stored under getDataDir(), getCacheDir(), getCodeCacheDir().</p><p><strong>getCacheBytes</strong> Return the size of all cached data. This includes files stored under getCacheDir() and getCodeCacheDir().</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ac6b8c600a932351d8c64a1553b7e6d/href">https://medium.com/media/4ac6b8c600a932351d8c64a1553b7e6d/href</a></iframe><p>If you want a demo project or source code on GitHub, check out the following:</p><p><a href="https://github.com/gup007/storage_stats_manager">AndroidStorageStasManager</a></p><p>Reach Me!</p><p><a href="https://www.linkedin.com/in/brijesh-gupta-a3146146/">LinkedIn</a>, <a href="https://github.com/gup007">GitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b92eca6805b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cashify-engineering/how-to-get-storage-stats-in-android-o-api-26-4b92eca6805b">How to get Storage Stats In Android O (API 26)</a> was originally published in <a href="https://medium.com/cashify-engineering">Cashify Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>