<?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 Omkar S Sawant on Medium]]></title>
        <description><![CDATA[Stories by Omkar S Sawant on Medium]]></description>
        <link>https://medium.com/@omkar18sawant?source=rss-beea267fe7e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CLPSJCmwc2QQYPSwYIxUaw.png</url>
            <title>Stories by Omkar S Sawant on Medium</title>
            <link>https://medium.com/@omkar18sawant?source=rss-beea267fe7e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:51:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omkar18sawant/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[Microservices: A Brief Overview]]></title>
            <link>https://medium.com/@omkar18sawant/microservices-a-brief-overview-0ad87d5825c2?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ad87d5825c2</guid>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 10:13:29 GMT</pubDate>
            <atom:updated>2026-07-07T10:13:29.152Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is about knowing why microservices exist and components of microservices. Why we may need to transition from monolith to microservices at some point. what things do we consider during design? How do we design? Then finally implementing what we have designed explaining the code.</p><figure><img alt="Backend System Design" src="https://cdn-images-1.medium.com/max/1024/1*sOL-NsTwf-wsKSjnOKpCcw.png" /></figure><p>We stand among the species who got to witness the great internet transition Web 1.0 -&gt; Web 2.0. Long back ago in the time when internet was booming. We had 1.0, The first version was just read only for consumers think of it like read-only Wikipedia, where only the admin (who uploaded) had privilege to upload/update the content. But one-way communication soon ended, the world became smaller with rise of Web 2.0. Things totally flipped as the consumer got the privilege of uploading content on the web. Well if you can see now from thousands of data handlers, now turned into billions. Every person on the earth or may be other planet who has access to internet can now play with the internet.</p><h3>Scaling for Millions/Billions</h3><p>Thus, servers need to be capable of handling such a great load. A server is a single machine like the ones you and I use with dedicated resources for handling server requests. How on earth can a single computer handle such a massive load? Well we have a solution for that why not expand resources and make it stronger, this type of scaling is known as vertical scaling. Well there has to be some point you will be hitting the bar .You stumble upon another approach. Another way we can do it is using horizontal scaling increase the number of servers and make the system capable of handling the load by navigating the traffic to idle server. Ok… so we have now many servers to operate .But would it simply work replicating the same monolith to multiple servers. Yes, it would work but it may result in a bottleneck, wasting resources if a single service is heavily consumed. Thus, leading you toward draining your wallets. To mitigate this dilemma we have a solution : microservices, that enable scaling all the domains independently.</p><h3>Why Microservices?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*-7xiQX6nQONQgM18TtO9Gw.png" /><figcaption>Microservices</figcaption></figure><p>Microservices provide a way to write us modular code. It helps us in maintaining the large codebase. You are only responsible for single functionality; the rest you can just leave on API contract. Which brings a lot of benefits, you can modify or add a functionality to a service without touching other services at all. There will be times when your service would receive a lot of demand and it may fail to handle that demand. But in microservices if one service fails then other services remain unaffected and that’s quite reasonable.</p><p>As services are separated based on domain, each team can work productively by focusing on its core functionality. Teams can work on bringing best results for their domain without worrying about the repercussions of their new features or changes. Example: Finance domain could work on making sure their availability and their balance sheets are matching , gateway is working fine, instead of worrying if the advertisement of restaurant loading or not. This also enables independent scaling of services. The security of the payment gateway needs more focus than just the feed that points us way ahead securing the business.</p><h3>Microservice</h3><p>A Microservice comprises several components. This components working together in sync makes the microservice stand out its way. Carefully drafting these components for their right purpose and responsibility contribute in building highly scalable and robust systems. Here, system design plays major role in choosing the right tools for the right action.</p><p>Components that you would often hear about will be the following:</p><h4>Database</h4><p>Choosing the right database is one of the most crucial steps in developing your project. Based on the project requirements we decide upon which database we should choose. SQL or NoSQL which is the better fit for our use case.Mainly we dwell upon certain things such as</p><ul><li>Is the data Atomic?</li><li>Can we prioritize availability over consistency, Is eventual consistency acceptable?</li><li>What is the structure and volume of the data?</li><li>Is it scalable with a SQL database?</li><li>How mutable is the schema? How dynamic schema needs to be?</li></ul><p>Often times we would find ourselves in dilemma where none of single fits in right requirement there we can consider using mix of it covered above. Before that we should make sure we research databases such as cassandra, ElasticSearch and dynamoDB, which have their own pros and cons but may fit our use case. Cassandra itself is customizable over high write throughput and availability . Other databases work on master-slave node architecture whereas Cassandra works on peer-to-peer node architecture, making it fault tolerant.It has table structure but can have sparse columns. It provides tuneable consistency making sure for consistency every peer node is updated before read or allowing eventual consistency.So we need to choose our storage wisely as it would affect our system behaviour directly.</p><p>Database Types:</p><ul><li>Table (PostgreSQL)</li><li>Document Store (MongoDB)</li><li>Column variable Table (Cassandra)</li><li>key-value (DynamoDB)</li></ul><h4>Queue</h4><p>You would definitely need to consider this component when you have come across either of the following:</p><ul><li>An endpoint or group of endpoints is expected to bear heavy load.</li><li>The action is mandatory and needs guaranteed execution.</li><li>The task is long running and will consume more resources.</li><li>Inter-Communication between two or more services.</li><li>Implementing Complex retry logic with DLQ.</li></ul><p>Queues also present us various options. Two of the most used queues are RabbitMQ and Kafka. Both are queues and we should bring in action that fits right. Mainly RabbitMQ shines when we need inter-service communication its provided options. Similarly, Kafka shines in scaling over 1M+ and traceability and durability enabling us to traverse the events. Kafka works great for high scalability, analytics and high throughput tasks.</p><ul><li><strong>Exchanges </strong>are medium through which messages are sent and configured</li><li>— <em>Fanout : </em>all of exchange listeners/queues receive messages regardless of binding key.</li><li>— <em>Direct :</em> exchange listeners/queues receive the messages only if binding key is exact match.</li><li>— <em>Topic :</em> exchange listeners/queues receive the messages only if binding key matches the pattern.</li><li><strong>Message Queues </strong>are queues on which messages stay based on config. Queues listen to exchanges for messages</li><li><strong>Producers</strong> send message to exchange.</li><li><strong>Consumers </strong>receive message from Message Queue and respond as ack,nack,requeue</li><li><strong>Dead Letter Exchanges</strong> are configured for retries or store the dead messages</li><li><strong>Dead Letter Queues</strong> are queues on which dead(usually failed) messages reside.</li><li><strong>Binding</strong> is configured in exchange and queue ensuring right navigation</li><li><strong>Messages </strong>are payloads sent from exchanges</li></ul><h4>Cache</h4><p>Memory is 100x faster than disk. We must take full advantage of memory being faster. It helps improve latency by significantly reducing the read/write time. Using cache making things seem easier but there’s a catch for cache. Consistency might be compromised if using cache so it should be handled carefully implementing different methods each having their pros and cons:</p><ul><li>Cache aside ( app decides)</li><li>Write through ( cache -&gt; DB &amp; read cache )</li><li>Read through ( read from DB updating the cache )</li><li>Write back ( update cache &amp; lazy update DB )</li></ul><p>Now Memory comes with its cost . So we also need cache eviction strategies :</p><ul><li>TTL ( Time to Live)</li><li>LRU (Least Recently Used)</li><li>LFU (Least Frequently Used)</li><li>Custom</li></ul><p>Some of the well-known options include Memcache, Redis, ElastiCache.</p><h4>CDN</h4><p>Your product also matters how it reaches consumers. Let’s say your server is sitting in Iran and you are requesting from the US the latency of the request will consistently be high as they are too far and based on data payload, where request could take 30ms. With CDNs deployed on the right places will result in response time of 10ms. CDNs are essentially caches optimized for serving but in modern internet now they also support complex unstructured data caching like Media Files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*8y8f3OpzbNSmMcCR8l-zdw.png" /><figcaption>Global Map</figcaption></figure><p>Popular options include CloudFlare and CloudFront.</p><h4>Object Storage</h4><p>Often, we will have unstructured data like files and binary data to store. AWS S3, Google Cloud Storage, Azure Blob Storage enable storing the data on cloud.</p><p>AWS S3 has key-value like storage. It can also simulate folder structures using its AWS S3 API. Thus, it makes sense that every file path should be unique.</p><h4>Logging</h4><p>Microservices can be huge so can be their code bases. It’s the developer’s job to debug the issue and find out what’s going on actually under the hood. Even if the library is written by another developer/company logging enables us to trace the bugs and find out what’s going on wrong.</p><p>winston &amp; Grafana Loki , alloy are few of the tools used in combination to set up logging</p><h4>Monitoring</h4><p>You need some way to measure performance of your servers. Prometheus powers gauging metrics. These metrics are exposed on /metrics endpoint of services and scraped by Prometheus at intervals as per configured in prometheus.yml.</p><p><strong>Grafana</strong> provides way to visualize the metrics and logs.</p><h4>Containerization</h4><p>Resource utilization was the main goal behind microservices. As we distributed services, every server is running a process that the network listens on. As computing evolved computers and their processor became capable of handling concurrency and parallelism. A single host machine can run multiple processes at a time using its multi-core processors.</p><p>Hence Docker was introduced. These containers provide a full virtual environment,memory for services as a standalone OS. These containers like alpine can be ultra light weight as low as &lt; 7mb fully operable for a simple server. These are actually OS Processes with Resource allocation using C-Groups and namespaces . It communicates with your kernel to enable this great experience. Imagine you can enter into any environment no matter which OS you are on.</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lrfQ0VO05JWbPTY7tUDLnQ.png" /><figcaption>Docker run command</figcaption></figure><p>Hence, In a single host machine multiple containers can be spawned each acting like a whole server for that service. Tools like Docker Compose/Swarm , Kubernetes enable multiple container orchestration.</p><p><strong>Docker Images </strong>are the actual blueprints, like classes, based on which container instances are spawned</p><p><strong>Docker Network </strong>enables inter-container communication. Only containers on same network can communicate.</p><p><strong>Docker Volume: </strong>the state of containers can be saved using volumes. Bind Mount and Volume mount are two common techniques.</p><p><strong>Docker Secrets </strong>provide a way to secure the secrets and are only accessible to containers.</p><p><strong>Docker Registry </strong>is like Github for Docker images.</p><p><strong>Docker Host </strong>assigns its each child a unique ip in the network using which it can be uniquely distinguished. also configures DNS to resolve on container name specified.</p><h3>How will the platform work?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*UOYKuY9B2An28rNV6Mwdzw.png" /><figcaption>Working of Healthy Gut</figcaption></figure><p>Now that we know why microservices are needed. In this series we will be building a food ordering system from system design to deploying the microservice on AWS. This series showcases 3 months of work composed into series of articles. We will be building a food ordering platform , I’ll be calling it healthy-gut as shown in the flow above.</p><h3>Brief about Tech stack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*nfGSFxoT_WXLIVuwsyTzEw.png" /><figcaption>Tech Stack used</figcaption></figure><p>Above would be tools that we will be using also I will try to explain what they actually do if length permits . Thank you so much for reading, see you soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ad87d5825c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backend Development : Beginner to intermediate step by step guide (2022)]]></title>
            <link>https://medium.com/@omkar18sawant/backend-development-beginner-to-intermediate-step-by-step-guide-2022-3f97dddb3531?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f97dddb3531</guid>
            <category><![CDATA[cloud-deployment]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Wed, 23 Mar 2022 18:46:38 GMT</pubDate>
            <atom:updated>2022-04-30T07:54:50.088Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn Backend Development with nodejs and deploy it on internet</h4><h3>Backend Development : Beginner to intermediate step by step guide (2022)</h3><h4>Complete backend Development tutorial and trends in 2022</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LSu1XEOMllJDVmGc" /><figcaption>Photo by <a href="https://unsplash.com/@wocintechchat?utm_source=medium&amp;utm_medium=referral">Christina @ wocintechchat.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article is backend development beginner’ s guide of backend developer .You will learn backend development .backend development skills , backend meaning the server side development . You will know different backend languages and the backend technologies and tools used in 2022 development market to create scalable backends . You will download free nodejs and learn nodejs .Also you ,will be developing a web API application using nodejs , express and will know how to use mongodb . In this online tutorial blog . This article goes through complete backend development cycle that you need to follow to develop a backend including create a nodejs api project to cloud deployment.</p><h3>How web works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hCWwNKhQ2rhZludEIKcZlA.png" /></figure><p>When you visit a website/url a GET request is made to the server which in return sends the proper requested html file for the user . This server side code is responsible to send the response . There are two main components with which you always need to deal with the header and body of response from request from the server side .</p><h4>Backend Development vs Frontend Development</h4><p>Backend development is server side development . There is no UI work involved in backend development . The front development handles the UI/UX .A backend developer is responsible to do server side work like creating API or having a centralized Database with CRUD API . Most of logical working of the application stays inside the backend secure only required information for the user is made available with API to made a secure Application .</p><h4>Technologies and tools for backend development</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*GXPZrEEGTisOkaUX-kwqXg.png" /></figure><p>There are a lot of technologies for backend development like Golang , Nodejs with Express framework , Firebase Cloud Functions . Databases like MongoDB , MySQL , Firestore . For testing out your what you have build you can use postman to make requests without requiring the frontend .</p><h3>Node js</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*jROEWrKpBjHH8e5Cv3XHKQ.png" /></figure><p>Node.js is an open-source, cross-platform, back-end JavaScript runtime environment . By using node js you can build backend applications with javascript or to be type safe with typescript .</p><h4>Install Node js</h4><ul><li>Visit <a href="https://nodejs.org/en/">nodejs.org</a></li><li>Download the LTS version for stability</li><li>Go next , next … like normal software installation</li></ul><h4>Create Project</h4><p>Create a project directory and open terminal in it.</p><p>$ npm init -y</p><p>this will generate required files and package.json file that will contain all of your list of dependencies.</p><h4>Node js Express</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*l8TzGKbNWNREx-KzJr_Oiw.png" /></figure><p>Express js is framework build on nodejs to simplify the flow of creating a restful API . By providing routes it helps developers for architecting their code and introduce middleware&#39;s in API route.</p><h4>Install Express Library Module</h4><p>Open terminal</p><p>$ npm install --save express</p><p>or</p><p>$ yard add express</p><h4>Start A Server</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b35663a309145697262100534bdbb31e/href">https://medium.com/media/b35663a309145697262100534bdbb31e/href</a></iframe><p>we import the express and create an app and then listen to port 8080.</p><h3>Routes in node js API</h3><h4>GET</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9420d5aa06676f078c8c139e89b03968/href">https://medium.com/media/9420d5aa06676f078c8c139e89b03968/href</a></iframe><p>at line 4 we tell that server that on request to /welcome route “Welcome &lt;name&gt; to Android Innovators” as a response should be send to client who send the get request . To test it Open your favorite browser open this <a href="https://localhost:8080/welcome/omkar?friend=true">url </a>. you will see a string send by server on browser .</p><h4>POST</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/54adc3392489c98730607eb3c02ffd9d/href">https://medium.com/media/54adc3392489c98730607eb3c02ffd9d/href</a></iframe><p>Be sure you use app.use(express.json()) , Express uses the body-parser for decoding the request body send by client .</p><h4>PATCH/UPDATE</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0efaa01204066b66c34b2d357cbb68c8/href">https://medium.com/media/0efaa01204066b66c34b2d357cbb68c8/href</a></iframe><p>Remember that every time you receive the request.body you need a body-parser make sure you use in that route .</p><h4>DELETE</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7457b9e50f78fc09c57a64edf3153072/href">https://medium.com/media/7457b9e50f78fc09c57a64edf3153072/href</a></iframe><p>This is similar to the update one .</p><h3>Mongo DB</h3><p>Mongo DB is a centralized online database that you can use for persistent storage of your backend application . It is a NoSQL database base on collection and documents .</p><h4>Create Mongo DB</h4><ul><li>visit</li></ul><p><a href="https://www.mongodb.com/">MongoDB: The World&#39;s Leading Modern Data Platform</a></p><ul><li>Sign In</li><li>Create A organization as guided.</li><li>Click Next</li><li>Click Create Organization</li><li>click New Project</li><li>Name it ; lest say ‘todo_db’</li><li>click create project</li><li>click Build A Database</li><li>select the tier you want ; here free tier</li><li>click create</li><li>select your favorite cloud provider and desired place for database.</li><li>click create cluster</li><li>Create Username and password for DB</li><li>scroll down , click on Add my current IP address</li><li>click finish and close</li><li>click connect &gt; Connect your application</li><li>note-down the mongodb connection url</li><li>change the &lt;user-name&gt; and &lt;password&gt; with yours in url.</li></ul><p><em>Congratulations</em> Now you have your mongo db database ready for use</p><p>Now comeback to your node js application</p><h4>Use Mongo DB</h4><p>You need to install npm packages that help you interact with your remote mongodb database from your server . This packages are already made available by mongodb.</p><p>here is documentation of on how to use it.</p><p>run command</p><p>$ npm install mongodb</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/82ebc3694e2423618307634c4d762913/href">https://medium.com/media/82ebc3694e2423618307634c4d762913/href</a></iframe><p>In the connection url notice that you have to change the username and password . /product_db which is the name that we have given to database you can give any name you want .</p><h4>Insert in MongoDB</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74b9994a8358499e0e31e098677bc5ff/href">https://medium.com/media/74b9994a8358499e0e31e098677bc5ff/href</a></iframe><p>above code gets the product and returns the insertResult whether it was successfully inserted or not .</p><h4>Update in MongoDB</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/93fba69919693c50e27d24cf68a175ba/href">https://medium.com/media/93fba69919693c50e27d24cf68a175ba/href</a></iframe><p>Above code updates the product with that id and the modified object should be supplied in the another parameter , with object in $set attribute .</p><h4>Delete in MongoDB</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff35e873ce92bf4f7ee438730ecbe4e9/href">https://medium.com/media/ff35e873ce92bf4f7ee438730ecbe4e9/href</a></iframe><p>Above code deletes one document in the collection with the id send by the client in request.</p><h4>Get All Document in Collection of MongoDB</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb8efc1815624417f58e473143beab72/href">https://medium.com/media/bb8efc1815624417f58e473143beab72/href</a></iframe><p>Above code , in the first get handler a product with that id is fetched and in the second handler all the products are fetched .</p><p>Here’s how the full code looks like :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a2fbd691f1b6e0e2351e76d30e8751c/href">https://medium.com/media/7a2fbd691f1b6e0e2351e76d30e8751c/href</a></iframe><h3>Deploy Server Side Project on Cloud</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DeA-BD2EUWJ3aB-zXF5I8A.jpeg" /></figure><p>The traditional way of deploying a server was using physical PC’s . But now the computing using the VM’s have totally change how the industry works .Now Even Tech giants like Twitter have their server side code on the Google Cloud Platform . here we will be using heroku as it need very little <a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up">pre-setup</a> to be done , here are steps to install heroku .</p><ul><li>Create <a href="https://github.com/">Github</a> Account and Download <a href="https://git-scm.com/downloads">Git</a></li><li>Download heroku from <a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs?singlepage=true">here</a></li><li>Open terminal</li><li>Login heroku</li></ul><p>$ heroku login</p><ul><li>make sure you are in root directory of project</li></ul><p>$ heroku create</p><p>$ git push heroku main</p><p>And Now that your app is deployed</p><p>$ heroku open</p><h3><strong>Congratulations!</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0MYt5jPR6QX5pnqM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fparty-the-office-hard-l0MYt5jPR6QX5pnqM&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExbzN1dzA4bmRhNG8xeGc1NGt5OXlldmhlZWxwYjJuc3ZlYWp3eWo1bSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fl0MYt5jPR6QX5pnqM%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/5cadcb5bc1e8fadcea061956bdb7c28a/href">https://medium.com/media/5cadcb5bc1e8fadcea061956bdb7c28a/href</a></iframe><p>your app is upend running on cloud . share your first backend cloud app with your tech geeks .</p><h3>Conclusion</h3><p>In this way we develop a backend application by using nodejs , express and mongodb .</p><h4>🔗 Connect with me :</h4><p>I believe you are a great real developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f97dddb3531" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter : How to write flutter plugin]]></title>
            <link>https://medium.com/@omkar18sawant/flutter-how-to-write-flutter-plugin-517be32385a7?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/517be32385a7</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android-sensor]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[flutter-plugin]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Wed, 23 Mar 2022 18:45:41 GMT</pubDate>
            <atom:updated>2022-04-30T07:54:08.473Z</atom:updated>
            <content:encoded><![CDATA[<h4>flutter communication with native OS</h4><h3>Flutter : How to write flutter plugin</h3><h4>Create Your own android sensor flutter plugin</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FJE5A5Ik63HUc3vZYS4%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fhughbaird-hugh-baird-college-JE5A5Ik63HUc3vZYS4&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FJE5A5Ik63HUc3vZYS4%2Fgiphy.gif%3Fcid%3D790b7611002de98a8c0a055282e2c0a797447318f56cea72%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4dae05e5c3f9cf640d1bfd0f0458e3c/href">https://medium.com/media/f4dae05e5c3f9cf640d1bfd0f0458e3c/href</a></iframe><h3>Flutter Plugin</h3><p>When you are developing a flutter app . You are just dealing with app rendering and may be restful API . When you need to use device specific API’s you need a some way to interact with native OS or web browser in case of web development .flutter makes it possible by means of flutter channel ,<strong>Channel </strong>is like the bridge between flutter and native OS, to be more specific <strong>method channel and event channel</strong> . flutter plugins essentially is the <strong>way for you to connect and communicate flutter with native OS or web browser</strong> .</p><p>In this article we will know how to create a flutter plugin to communicate with Android Operating System . By the end of this you will be able to create an <strong>acceleration sensor </strong><em>( Accelerometer )</em> <strong>plugin </strong>by which you will be to get sensor values from android OS to flutter.</p><h4>Flutter Plugin vs Flutter Packages</h4><p>There is a very basic difference between a flutter plugin and flutter package . A flutter plugin is what when you want to communicate native side for using some native components or something at native side . For example in android create and start a custom service which is platform specific .Whereas in case of flutter package works on flutter side . like get_it which helps developers for architecture flutter project .which just deals with dart/flutter side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JagF1ZYTdHD-iVr9" /><figcaption>Photo by <a href="https://unsplash.com/@mvdheuvel?utm_source=medium&amp;utm_medium=referral">Maarten van den Heuvel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Method Channel</h4><p>Method channels are channels of method via which you can communicate from flutter to native OS . You create a method channel from flutter giving it a unique name . similarly create a method channel from native OS with the same unique name specified in flutter side. So that flutter can know to connect this method channels.</p><p>Now you can link a event name with a method by creating a MethodChannel.MethodCallHandler which has a method onMethodCall(MethodCall mc,MethodResult r){...}. on-method-call will give you two parameters <strong>MethodCall</strong>-&gt;mc and <strong>MethodResult</strong>-&gt;r . In mc.action has the string which specifies which method should be triggered and arguments can be fetched by calling mc.argument(&quot;&lt;argument-name&gt;&quot;) . respective argument will be returned by the function . r has two methods sucess(..result..) if work was successful and failure(..) if work was failed.</p><h4>Event Channel</h4><p>By using <strong>EventChannel </strong>you can stream data from flutter to native OS . You create a event channel from flutter giving it a unique name . similarly create a event channel from native OS with the same unique name specified in flutter side. So that flutter can know to connect this event channels.</p><p>Now that you have <strong>EventChannel </strong>setup on both side flutter and native OS . You can send data from one platform with EventChannel.EventSink and receive data from other platform with EventChannel.StreamHandler .</p><p>Lets see flutter plugin development in practice by creating a sensor plugin.</p><h3>Create Flutter Plugin</h3><p>$ flutter create --template=plugin --platforms=android sensor_plugin</p><p>After running this command flutter project for plugin will be generated .</p><p>Go to android&gt;src&gt;com.example.sensor_plugin &gt; SensorPlugin.kt</p><p>You will be given with a plugin attached to flutter engine already .</p><h3>Writing Accelerometer Plugin for Flutter</h3><h4>from Android Native Side</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8hDIRrdZIwN_tBT-" /><figcaption>Photo by <a href="https://unsplash.com/@redaquamedia?utm_source=medium&amp;utm_medium=referral">Denny Müller</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>How flutter communicates from flutter to native</h4><p><em>binary messenger</em> is the medium used by flutter . so when we create any channel either <strong>EventChannel</strong> or <strong>MethodChannel</strong> we need pass binary messenger as dependency for any channel .</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/28b76b81ef5110dbdee24f7b23f16358/href">https://medium.com/media/28b76b81ef5110dbdee24f7b23f16358/href</a></iframe><h4>Get Sensor data updates</h4><p>In Android we have <strong>SensorManager </strong>for getting the sensor updates . First we need to get the Accelerometer from sensor manager .</p><pre>sm = context.getSystemService(Context.SENSOR_SERVICE) as SensorManager</pre><p>Sensor Manager needs sensor event listener to receive updates . so you also need to implement <strong>SensorEventListener.</strong></p><p>class SensorPlugin : FlutterPlugin, ActivityAware , SensorEventListener</p><p><strong>SensorEventListener</strong> in android has two callbacks onAccuracyChanged is called when accuracy of a sensor is changed and onSensorChanged which is called when sensor data is changed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a8d62db4a483660a64a5afeced92e71/href">https://medium.com/media/3a8d62db4a483660a64a5afeced92e71/href</a></iframe><p>onSensorChanged has a parameter of event from which we can retrieve android accelerometer sensor value updates . event.values is a float array that has values respectively for accelerometer.</p><ul><li>event.values[0] is amount of acceleration on X axis .</li><li>event.values[1] is amount of acceleration on Yaxis .</li><li>event.values[2] is amount of acceleration on Zaxis .</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/87a1bef81c995af09008c40c4c25ff5a/href">https://medium.com/media/87a1bef81c995af09008c40c4c25ff5a/href</a></iframe><p>You must have also observed the eventSink to get that event channels event sink we need to implement <strong>EventChannel.StreamHandler </strong>and get and assign that to eventSink .</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed48e9f3d84590357c69ee94c3f8491a/href">https://medium.com/media/ed48e9f3d84590357c69ee94c3f8491a/href</a></iframe><p>In the method call handler as discussed above we check the action with when for “dynamic_sensor_discovery” and send the result with method result with mr.success(…) and sm.isDynamicSensorDiscoverySupported() gives the value that if isDynamicSensorDiscoverySupported or not . mChannel.setMethodCallHandler and mChannel.setMethodCallHandler(mch) makes it active with active . sm.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL) registers a listener in android for updates.</p><h4>Here is full plugin code from native side</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c07f3eb08fe9da7d3e537c2b9d16ff96/href">https://medium.com/media/c07f3eb08fe9da7d3e537c2b9d16ff96/href</a></iframe><h4>2 . from flutter Side</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eV9A06RXEl3y7TSd" /><figcaption>Photo by <a href="https://unsplash.com/@f12r?utm_source=medium&amp;utm_medium=referral">Fahim Muntashir</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89b782e921a657e4790dfde6c057c4a1/href">https://medium.com/media/89b782e921a657e4790dfde6c057c4a1/href</a></iframe><p>from the flutter plugin side we should just create <strong>MethodChannel</strong> and <strong>EventChannel </strong>with their appropriate matching name as specified at native side .</p><p>recieveBroadcastStream() gets the stream from native side which is attached to eventChannel and as we have passed map from native side . for conveniency we convert the map to data class AccelerometerValue which holds values of Accelerometer .</p><p>isDynamicSensorDiscoverySupported() invokes the native method and the boolean returned from native side is received here .</p><h3>Conclusion</h3><p>Flutter is UI toolkit developed by google for cross-platform development with a single code base . We use flutter plugin to communicate native side or to do device/platform specific work.</p><h4>🔗 Connect with me :</h4><p>I believe you are a great real developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=517be32385a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter : Widget and its lifecycle]]></title>
            <link>https://medium.com/@omkar18sawant/flutter-widget-and-its-lifecycle-34d4d533e4b5?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/34d4d533e4b5</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Wed, 23 Mar 2022 18:44:00 GMT</pubDate>
            <atom:updated>2022-04-30T07:53:37.940Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter : Statefull and Stateless Widget and their lifecycle</h3><h4>know lifecycle of flutter widget</h4><h3>Widget</h3><p><em>“flutter is all about widgets”</em> you may have heard this term a lot times . Every thing you build to show UI/UX is using the flutter widgets . You construct Widgets Combination in a manner to create a beautiful UI.</p><h4>Configuration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bjSI537aJGJ0wp59" /><figcaption>Photo by <a href="https://unsplash.com/@sigmund?utm_source=medium&amp;utm_medium=referral">Sigmund</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The flutter separates the rendering in three different stages :</p><ul><li>Widgets</li><li>Elements</li><li>Render Objects</li></ul><p>in this article we will knowing about the widgets to know more about <em>how flutter renders</em> .</p><p>Widgets are just like a blueprint . just the configuration for how to want you widgets is responsible for that . so it is immutable.</p><h4>Immutable</h4><p>Flutter Widgets are immutable by nature .so immutable is when you change any object , you cannot change that object directly . A new copy needs to be created for that change to happen the existing object cannot be changed.</p><figure><img alt="Lifecycle of flutter widget" src="https://cdn-images-1.medium.com/max/1024/0*zrrEaIzZgCiZNzEo" /><figcaption>Photo by <a href="https://unsplash.com/@coopery?utm_source=medium&amp;utm_medium=referral">Mohamed Nohassi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So each time you hot reload or make any change to code . A whole tree of widgets is re-generated . the previous widgets are not used again what is reused a separated in another trees of Elements and RenderObjects.</p><h3>Stateless Widget</h3><p>In flutter stateless widget can be made by a combination of widgets or be a custom widget . here the flutter invokes the stateless widget build method only once . When you know that this data will not change dynamically you should use stateless widget .</p><h4>create Flutter StatelessWidget</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffc33b8fce595687b00bf332d6f3dc26/href">https://medium.com/media/ffc33b8fce595687b00bf332d6f3dc26/href</a></iframe><h3>Flutter Statefull Widget</h3><p>A statefull widget is type of widget in flutter that has state or can change dynamically with response to the data . A Statefull Widget has its Widget and also it holds its state which is actually handled by widgets corresponding element .</p><p>State is data on which the UI is dependent or reactive to . So , Whenever the data is updated with setState(...) the build method is re-invoked and whole widget tree in it is invalidated .</p><h4>Create Statlefull Widget</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a06b182e86e20c8ec0ff7c70a4bf50f9/href">https://medium.com/media/a06b182e86e20c8ec0ff7c70a4bf50f9/href</a></iframe><p>here in the above gist code you can observe that MyApp Statefull Widget has along with its a State . That _MyAppState holds the state value that the UI is reactive on . so whenever setState is called the whole Widget tree under build method is rebuild . Old widget with that value is removed from the widget tree and the newly created widget with updated value is swapped . As the type of Widget remains the same the element is reused by flutter .</p><h4>State Widget vs Helper method widget</h4><p>This widget is not new . the one you create a widget by returning a widget from a function is known as helper method widget . you should avoid to use this method as this could cause you app to be in-efficient as the whole widget tree is re-created and there’s no chance of reuse by flutter . Imagine of deeper trees and on top of it animations running on it .</p><p>So to tackle this leave it to flutter . flutter smartly handles it by smartly evaluating required re-renders. To be more specific use <strong>const constructor </strong>whenever possible . So that flutter can know in advance and save user cpu time whenever it can.</p><blockquote><strong><em>Tip :</em></strong> When you pass a lambda to a widget . If possible supply direct handler function , if the lambda has no work to do there .</blockquote><h3>Conclusion</h3><p>So Widget doesn’t have its life it is just a configuration for a piece of UI to be rendered .</p><h4>🔗 Connect with me :</h4><p>I believe you are a great real developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34d4d533e4b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter : how does flutter work]]></title>
            <link>https://medium.com/@omkar18sawant/flutter-how-does-flutter-work-7c2e87907f4f?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c2e87907f4f</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[rendering]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Tue, 15 Mar 2022 13:08:14 GMT</pubDate>
            <atom:updated>2022-04-30T07:53:08.495Z</atom:updated>
            <content:encoded><![CDATA[<h4>Flutter under the hood</h4><h3>Flutter : how does flutter work</h3><h4>Know how flutter renders its widgets</h4><p>Flutter is google front-end frame work for developing cross platform applications with a single codebase . It uses programming language dart for flutter app development. by using this single flutter framework you can now develop android , ios , web , desktop applications . Many trusted companies use these flutter framework for app development. Like : Google Pay, Alibaba, Dream11 BMW and many more.</p><h3>How does Flutter Work</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HwtBoiSAsROJSlfTibZCgg.png" /></figure><p>When there is user input or animation/change the build method is re-triggered and the widgets are rendered .</p><h4>Layout</h4><p>In the rendering layer first the widgets are layout , means widgets are positioned at appropriate places on the screen .Considering their constrains and then size.</p><h4>Paint</h4><p>The flutter widgets are painted by calling the paint method of each widget . First the parent is painted and then the child is painted . Unlike other frameworks like react , ionic there is no javascript bridge in between . The Flutter directly uses the Canvas API for rendering . It has its own UI this widgets are not converted to native UI elements . which intern saves lot of CPU time and make flutter application efficient.</p><h4>Composite</h4><p>So to make this efficient flutter does not paint on a single canvas . It can have multiple canvas . Like a scrolling text , the text which appears is not re-created again and again it is just repositioned . For this flutter has an additional Layer Tree . If the render objects are similar flutter tries to group and reuse them.</p><p>Then Rasterization takes place, they are actually converted to pixels and drawn on screen.</p><h3>Flutter Rendering Trees</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Wld_QrKVq_8T0kV3MYdIA.png" /></figure><p>Flutter keeps track of its UI elements by creating 3 trees for efficient rendering of UI . The Widget Tree, Element Tree and Render Tree . In the previous article I have explained about flutter widget and its lifecycle .Flutter maintains 3 tress for reuse of elements and renderObjects just the widgets are swapped with the new state data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RfUCdjxaxa4D2KaCKhCnYg.png" /></figure><p>So the Widget tree just a blueprint or has the configuration of UI elements .</p><p>Each Widget has its corresponding Element and Render-Object . Here in the above image the MyWidget is a widget defined , the flutter will create its Element MyElement and RenderMy automatically under the hood. So here you would have noticed 2 new components Element and RenderObject(Render).</p><h4>Flutter Element</h4><p>From this Widget a respective element is instantiated . As element is mutable , a element can be reused but a widget cannot be reused as it is just a configuration .Like you can assume it for understanding as Widget is class definition and Element is its instantiated object . Flutter Element keeps the information about what type of flutter widget is ? and child references to it.</p><h4>Flutter RenderObject</h4><p>The RenderObject is reponsible for Layout , Paint , Composite and accessibility . Each RenderObject has RenderBox with it . RenderBox is dimension of RenderObject . i.e , width ,height ,etc .This renderbox is reused by flutter whenever possible . The RenderObject is only thing that is used by flutter for drawing UI .</p><p>Now you must be pretty clear with this 3 trees of flutter for UI rendering .</p><h3>Flutter Widget Render Traversal</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g3OL7lLf8IKytCw8scI4vA.png" /></figure><p>Starting from root (initial) widget the constrains are passed from parents to its children . As per about image of widget tree . W1 constrains are passed to W2 and W3 , W2 constrains are passed to W4 and W5 and W3 constrains are passed to W6 . After knowing the constrains the widget respective child should return their size to their parent widget . So here as per image mentioned widget tree . W4 and W5 passes Size to W2 , W6 passes to W3 and W2 and W3 passes their size to the root widget . Then the other phases like layout and paint are continued.</p><h4>Keys</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4LLP3RBLJ-QDguVR" /><figcaption>Photo by <a href="https://unsplash.com/@jaye_haych?utm_source=medium&amp;utm_medium=referral">Jaye Haych</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Flutter needs to identify the relationship between a widget and a corresponding right element . So that it can invalidate the UI when needed . Lets take an example you swap to widgets then flutter must also swap its element . But Flutter needs to know/recognize it. For this purpose keys are used . So Unique keys can ensure that UI is properly updated. You only need this incase you have a statefull flutter widget.</p><h4>Flutter Custom Widget / UI</h4><p>At sometime you may feel that none of the widget can satisfy your need . Then you must Consider using Flutter Custom Widget with Custom painter . In this paint method needs to overridden and the canvas passed in the parameter must be used to draw your custom desired UI . If you need more freedom you can dive deep into creating your own render objects only if need .</p><h3>Conclusion</h3><p>Flutter has its own architecture for power-full performance you need for you app .Combining of Widget , Element and Render Object flutter renders.</p><h4>🔗 Connect with me :</h4><p>I believe you are a great real developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c2e87907f4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter : A Beginners guide to Flutter]]></title>
            <link>https://medium.com/@omkar18sawant/flutter-a-beginners-guide-to-flutter-a6d375c7d313?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6d375c7d313</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[flutter-vs-react]]></category>
            <category><![CDATA[why-flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Tue, 01 Mar 2022 16:42:12 GMT</pubDate>
            <atom:updated>2022-04-30T07:52:43.537Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter : A Beginners guide to Flutter</h3><h4>Know what is Flutter and how it is used</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*10RECXGTH5NyaeBg5yD1pw.png" /></figure><h3>Flutter</h3><p><strong>“Flutter</strong> is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.<strong>”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KVIg6nrEuzDWPQq0" /><figcaption>Photo by <a href="https://unsplash.com/@evan__bray?utm_source=medium&amp;utm_medium=referral">Evan Dennis</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Why Flutter</h3><p>Before diving into flutter we need to understand why you should use flutter whenever possible . Let us say , you wanted to create a software and needed to target multiple platforms . Then you would need to develop application for each specific platform with its codebase and maintenance team .</p><p>So would have observed that its the same application on each platform doing the same work . There’s where hybrid development platforms seen the bridge and came into flash. There are many other frameworks out dare in market for this hybrid development like React and React Native , Ionic , etc.</p><h3>React vs Flutter</h3><p>React Native and React applications are developed in js . They use a bridge made by this frameworks to run the same app in every platforms . That where the pain of react technologies come in it uses a bridge in communication with the platforms .</p><p>On the other side , The Flutter totally saves us from the bridge the flutter apps are have there own rendering engine for displaying the UI . So , there is no bridge in between . Hence , Flutter is lot faster than react. Another big thing about flutter is , it is created by google (The Tech Giant) .</p><h3>Get Started with Flutter</h3><p>In flutter you need to take care of two main things that is Widgets and Plugins <em>(if Needed).</em> There are two types of widgets <strong><em>Statefull Widget</em></strong> and <strong><em>Stateless Widget</em></strong> in Flutter.Before that you need to understand what is state.</p><h3>State</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C85vazmJ08ZIRdKE" /><figcaption>Photo by <a href="https://unsplash.com/@sickle?utm_source=medium&amp;utm_medium=referral">Sergey Pesterev</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you application or screen UI in flutter is dependent on data that can be updated then you need to say that you widget is dependent on data . This data is nothing but the state of the widget .</p><p>So, there is simple principle between choosing whether you want to use <em>Statefull Widget</em> or <em>Stateless Widget</em> the term themselves define their meaning . When you have a state in widget use <strong>Statefull Widget</strong> else if not state is their for the widget use the <strong>Stateless Widget</strong>.</p><h4>Build Context</h4><p>A <strong>build context</strong> is just a <em>meta data object</em> that has information about its ancestors . by which the descendants have information about them . Like take a example of widget that has property to fit in its parent widget so it can access the data via the context object in flutter.</p><h4>Create Your first flutter App</h4><p>Make sure you have installed flutter , if not install reading <a href="https://docs.flutter.dev/get-started/install">this</a> official flutter documentation.</p><p>&gt; create project directory with any name . lets say “first app”</p><p>&gt; run command flutter create first_app in terminal/cmd</p><p>&gt; run command cd first_app</p><p><strong>for web</strong></p><p>&gt; run command flutter run -d chrome</p><p><strong>for mobile</strong></p><p>make sure you have a emulator or real device connected to it.</p><p>&gt; run command flutter run</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FkyLYXonQYYfwYDIeZl%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fsesamestreet-sesame-street-50th-anniversary-kyLYXonQYYfwYDIeZl&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExYWJnbjlkd290aWozYjdicGJiZ2FtYndzOTF0dzJlZm5kYTAxZHhyZyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FkyLYXonQYYfwYDIeZl%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/110f025b7377267a8a8372494560ad9e/href">https://medium.com/media/110f025b7377267a8a8372494560ad9e/href</a></iframe><p><em>you will be seeing you first flutter app upend running.</em></p><h3>Conclusion</h3><p>Flutter is a google cross-platform development toolkit to develop fast scalable applications having just a single codebase.</p><h4>🔗 Connect with me :</h4><p>I believe you are a great real developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6d375c7d313" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter : Dart Fundamentals | Flutter Beginner Guide]]></title>
            <link>https://medium.com/@omkar18sawant/flutter-dart-fundamentals-flutter-beginner-guide-3e337c153138?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e337c153138</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Tue, 01 Mar 2022 09:31:13 GMT</pubDate>
            <atom:updated>2022-04-30T07:52:19.791Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter : Dart Programming Language | Flutter Beginner Guide</h3><h4>Know the basics of dart which is used to develop flutter application</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCajckOeBhRaLzi0RoFqig.png" /></figure><p>Dart is a programming language that is used in server side as well as client side and is backed up by google as its main framework uses this as primary language. So Its worth learning .</p><p>In Any Programming Language there are four main topics you need to know that is variables, functions, classes and concurrency .In this article you will be knowing the basics of dart programming language including dart classes , functions variables and concurrency so that you can get started to developing flutter apps.</p><h3>Variables</h3><p>In dart programming variables are the ones that store a value .you can create one primary or secondary data and then operate on it or update it according to your need . In dart you can define a explicit data type or an implicit data type as you need .</p><h4>Explicit Data Type</h4><p><a href="https://gist.github.com/OmkarSsawant/b40f23e37ed3df803957f72aa2543830">https://gist.github.com/OmkarSsawant/b40f23e37ed3df803957f72aa2543830</a></p><p>Here you define the type of data you want to assign .</p><h4>Implicit Data Type</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/17921e4481d63c20d09674e209025f10/href">https://medium.com/media/17921e4481d63c20d09674e209025f10/href</a></iframe><p>Here you need not define the type of data you want to assign .</p><h3>Functions</h3><p>In dart programming language the functions are created to make the code reusable .You can have a return type as output of function and n number of parameters in function as input.</p><p><strong>Syntax :</strong></p><p>&lt;return-data-type&gt; function_name ( &lt;data-type&gt; var1 ,....){}</p><p>Example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5630e48a7d24b0e7ee4b550ab7e5e84a/href">https://medium.com/media/5630e48a7d24b0e7ee4b550ab7e5e84a/href</a></iframe><h3>Object Oriented Programming in Dart</h3><p>Dart is also an object oriented programming language . Which is just a concept of dividing a larger problem in smaller groups with a help as objects. Each object solves a particular task and in the whole the big problem is solved.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ae25741385dc507a580efa22f9987f9/href">https://medium.com/media/3ae25741385dc507a580efa22f9987f9/href</a></iframe><p>Here is how you define a class in dart . Developers is also a human so all the behaviors of human are in developer . So , Developer extends Human .</p><p>In dart if you want a field or method to be private or there is no need that a method should be exposed out of the class then , then in dart field or method is started or prefixed with<strong> _ </strong>and then method name .</p><p><strong>Syntax :</strong></p><p>&lt;return-data-type&gt; _function_name ( &lt;data-type&gt; var1 ,....){}</p><h3>Asynchronous Dart</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-mNaOkwv4uXmwzNH" /><figcaption>Photo by <a href="https://unsplash.com/@sunlifter?utm_source=medium&amp;utm_medium=referral">Tomasz Frankowski</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Sometimes just performing on a main thread can cause your app an ANR . So for long running work you should prefer using async and await mechanism in dart.by which you will be able to intensive tasks seamlessly.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1140d50cf04c53ef9f07c5f18cb3a5d2/href">https://medium.com/media/1140d50cf04c53ef9f07c5f18cb3a5d2/href</a></iframe><p>So , After parameters definition you add sync keyword in function definition so that you can call an asynchronous function like fetch . await keyword gives the result from the future by waiting for it to complete.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b96b1692e9ff26eabffc1eb775a7d68/href">https://medium.com/media/6b96b1692e9ff26eabffc1eb775a7d68/href</a></iframe><p>You can execute the many futures concurrently with Future.all method that will execute all methods at same time.</p><h3>Conclusion</h3><p>Dart is very flexible programming language that can be used to create Flutter applications or server side applications .</p><h4>🔗 Connect with me :</h4><p>I believe you are a great real developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e337c153138" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Asynchronous Android : Kotlin Coroutines]]></title>
            <link>https://medium.com/@omkar18sawant/asynchronous-android-kotlin-coroutines-c6c0f8b65388?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6c0f8b65388</guid>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[android-threading]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Sun, 27 Feb 2022 12:07:19 GMT</pubDate>
            <atom:updated>2022-04-30T07:51:59.037Z</atom:updated>
            <content:encoded><![CDATA[<h3>Asynchronous Android : Kotlin Coroutines</h3><h4>Know what kotlin coroutines are and how they run and how you use it</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-MlB7zcb3Op40iDd" /><figcaption>Photo by <a href="https://unsplash.com/@luchox23?utm_source=medium&amp;utm_medium=referral">Luis Gonzalez</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong><em>Kotlin Coroutines are easiest way to do asynchronous programming.</em></strong></p><h3>Need Of Asynchronous</h3><p>For Simplicity lets assume that your CPU is single core single threaded .ie, there cannot be parallel execution .How CPU operates is when you run a program , a little program of one task is executed then it stops one , then second task is executed likewise it is executed .Now lets say you have a multicore and multithreaded having it is not enough , you should properly use it .Thats where kotlin coroutines come in to rescue.</p><p>In android if you need to do as task that may take a long time or a heavy computational task like blurring an image . You should use multithreading for it or else your app will run into problem of ANR.</p><h3>What is Kotlin Coroutine ?</h3><p>A kotlin coroutine is a feature provided by kotlin in an easiest way. So , The Basic Idea is to have 4 threads alive and execute the task on specified thread that saves a lot of time of booting/creating a thread and managing it . You just have to Use it .</p><h4>Dispatchers</h4><p>To fire up a coroutine you have to select a dispatcher . A dispatcher is responsible for delivering the work to the relative thread. There are 4 types of Dispatchers each corresponds to a different thread</p><p><strong>MAIN :- </strong><em>The work is done on main-thread asynchronously. generally is used for updating the UI elements.</em></p><p><strong>IO :- </strong><em>The work is done on io-worker-thread asynchronously. generally is used for performing input/output operations like network, disk, file, etc.</em></p><p><strong>DEFAULT :- </strong><em>The work is done on default-worker-thread asynchronously. generally is used for performing computational tasks.</em></p><p><strong>UNCONFINED :- </strong><em>The work is done on last thread used by dispatcher asynchronously. so the thread is not fixed it can be any last thread.</em></p><h4>Use Kotlin Coroutine</h4><p>It is very simple to use a coroutine you just have to define a function in which asynchronous work to performed should be defined. To make it run on coroutine it should be marked with a suspend keyword.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc9bfa1cfaffb180fdc7e9ef4bc45250/href">https://medium.com/media/cc9bfa1cfaffb180fdc7e9ef4bc45250/href</a></iframe><blockquote><strong>Note :</strong> Kotlin Coroutines can only be launched in Coroutine Context</blockquote><p>lifeCyleScope.launch is a function in which a coroutine context can be accessed and lauch a coroutine</p><h4>Switching Dispatcher Contexts</h4><p>As Recommended you should perform relevant task in relevant dispatcher and you already know that we cannot update the UI elements from another worker thread .</p><p>withContext is function by which we can switch the Dispatcher or thread .</p><h3>Asynchronous VS Services in Android</h3><p>Services is just an android component and has its own lifecycle, like activity . It does not have its own thread , it runs as any other component runs on the main thread. To create a non blocking experience you need to use coroutines or ExcecutorService in java. So, Service is a component and asynchronous is way to perform non blocking tasks.</p><h3>Conclusion</h3><p>This is all about kotlin coroutines . this just makes developers life easier that writing again and again the same boilerplate code and managing the threads manually .</p><h4>🔗 Connect with me :</h4><p>I believe you are a great real developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6c0f8b65388" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Storage: File System and File Provider]]></title>
            <link>https://medium.com/@omkar18sawant/android-storage-file-system-and-file-provider-911741693bb4?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/911741693bb4</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-file-transfer]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-file-manager]]></category>
            <category><![CDATA[android-developers]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Thu, 03 Feb 2022 10:52:01 GMT</pubDate>
            <atom:updated>2022-04-30T07:48:11.833Z</atom:updated>
            <content:encoded><![CDATA[<h4>Know how to deal with files in android , save and retrieve images and make you files public securely.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XLqiXB9NbWadNuMD" /><figcaption>Photo by <a href="https://unsplash.com/@viktortalashuk?utm_source=medium&amp;utm_medium=referral">Viktor Talashuk</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The Android provides you to create app specific storage by default , but to also allow you to save files in external storage such as SD Card you need to define Manifest permission of <em>android.permission.READ_EXTERNAL_STORAGE</em> for reading and <em>android.permission.WRITE_EXTERNAL_STORAGE </em>for writing files on device.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49c8dbd562d268e277ffa5d730a70d6f/href">https://medium.com/media/49c8dbd562d268e277ffa5d730a70d6f/href</a></iframe><h4>Stream</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FTnDoEoXfT7YoE%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Friver-mountain-earth-porn-TnDoEoXfT7YoE&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FTnDoEoXfT7YoE%2Fgiphy-downsized-large.gif%3Fcid%3D790b76112b70d4428b6429aeeeaf599d525c8c432c77b4d2%26rid%3Dgiphy-downsized-large.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/bca14a8189d83a305632dab6e79f37e1/href">https://medium.com/media/bca14a8189d83a305632dab6e79f37e1/href</a></iframe><p>Large files cannot be transferred at once from one place to other like while operations like copy/paste , creation , updating ,etc. to comply with memory and cpu limitations. So , The data is transferred part by part or chunks to destination.This chucks are transferred one by one serially . so it is a <strong>stream</strong> of data.</p><h4>Saving File</h4><p>Here we will be creating a app specific directory name movies</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e57a613d58a789d96aef26b04382a69/href">https://medium.com/media/7e57a613d58a789d96aef26b04382a69/href</a></iframe><p>Now lets save a movie to movies directory</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cae2dd058f2f47b926c5e57e015d3095/href">https://medium.com/media/cae2dd058f2f47b926c5e57e015d3095/href</a></iframe><h4>Reading File</h4><p>Here we will be reading the movie</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d28e44bebb4813c86a6b1099ffeca873/href">https://medium.com/media/d28e44bebb4813c86a6b1099ffeca873/href</a></iframe><h4>Saving Image</h4><p>Now the movie needs a thumbnail so we will be saving the thumbnail too.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/642c50b2431fb570a005909361548d2d/href">https://medium.com/media/642c50b2431fb570a005909361548d2d/href</a></iframe><h4>Reading Image</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8427cf5f20605bd4fe6bf6151881849d/href">https://medium.com/media/8427cf5f20605bd4fe6bf6151881849d/href</a></iframe><h3>File Provider</h3><p>By default your files you create in app specific directory are too private . so explicitly need to tell android that you want files to be public too like Content Provider shared the data . This File Provider extends Content Provider.File provider gives a temporary access to file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/570f0faee3863e80cca2edd41cd6bd46/href">https://medium.com/media/570f0faee3863e80cca2edd41cd6bd46/href</a></iframe><p>notice that exported=&quot;false&quot; because we do not want our files to be shared out outside of our scope of app. if you want your files to be global you can set it to true.</p><h4>File Paths</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4626e5605982b3274485e125c794a5cc/href">https://medium.com/media/4626e5605982b3274485e125c794a5cc/href</a></iframe><p>the nameis what will be used in content uri and path tells the directory path from the app’s files directory.</p><h3>Conclusion</h3><p>So You can store files in device either internal or external and use File Provider to share files in between app by using uri by setting exported to false and out of scope by setting true.Granting a temporary access to file .</p><h4>🔗 Connect with me :</h4><p>I believe you are a great developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=911741693bb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Content Provider : SQLite and sharing your app data.]]></title>
            <link>https://medium.com/@omkar18sawant/android-content-provider-sqlite-and-sharing-your-app-data-45b22d2b8a15?source=rss-beea267fe7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/45b22d2b8a15</guid>
            <category><![CDATA[android-sqlite]]></category>
            <category><![CDATA[sqlite]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[contentprovider]]></category>
            <dc:creator><![CDATA[Omkar S Sawant]]></dc:creator>
            <pubDate>Wed, 02 Feb 2022 15:39:43 GMT</pubDate>
            <atom:updated>2022-04-30T07:47:20.284Z</atom:updated>
            <content:encoded><![CDATA[<h3>Android Content Provider : SQLite and sharing your app data.</h3><h4>Know SQLite which is used by room under the hood and create your own content provider.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0LZb_-9VbOaqz_Si" /><figcaption>Photo by <a href="https://unsplash.com/@frankiefoto?utm_source=medium&amp;utm_medium=referral">frank mckenna</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>SQLite</h3><p>SQLite is a lighter version of SQL optimised for mobile devices .You can create your own secure database and perform CRUD operations on it ,in android for persistent storage.</p><h4>Create SQLite Database</h4><p>To create a database you should extend SQLiteOpenHelper class which is a helper class provided by android .</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d083d69fe54f8efa08a704e0d5ba4221/href">https://medium.com/media/d083d69fe54f8efa08a704e0d5ba4221/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aec5a717ebaf4270f4d4b2e6fe6809e3/href">https://medium.com/media/aec5a717ebaf4270f4d4b2e6fe6809e3/href</a></iframe><h4>Writing Data</h4><p>For writing data android uses ContentValues class . It is like map data structure having key value pairs . one content value representing values of one entity . key is the column name and value is value for that column</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26a822e42761325415f586d834b50744/href">https://medium.com/media/26a822e42761325415f586d834b50744/href</a></iframe><h4>Reading Data</h4><p>Reading data is same as content resolver as we have seen reading videos from android.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7712a46742ba60735cfe529f04472222/href">https://medium.com/media/7712a46742ba60735cfe529f04472222/href</a></iframe><h4>Content Provider</h4><p>Content provider is one of android component . so android OS needs to know about it . so it should be registered in AndroidManifest.xml.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/880712f9b2520f5dd55574fa1d82fc86/href">https://medium.com/media/880712f9b2520f5dd55574fa1d82fc86/href</a></iframe><p>here the registered <em>authority</em> plays a vital role this authority needs to be same as the host app defined authority. <em>permission </em>is optional attribute but you want to limit access to your data via user you can use permission so, the client app needs this permission for accessing the provided data securely.</p><p>Now extend MyAppProvider class with ContentProvider class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7d07b1fef13a655f0998d411a979709/href">https://medium.com/media/b7d07b1fef13a655f0998d411a979709/href</a></iframe><h3>Conclusion</h3><p>Now your app data can be accessed from outside of app . Using the provided content uri and permission.</p><h4>🔗 Connect with me :</h4><p>I believe you are a great developer, because you read a detailed blog fully, and I will be too happy to have you. click on the below link to connect with me . <a href="https://www.linkedin.com/in/omkar-sawant-dev/"><em>https://www.linkedin.com/in/omkar-sawant-dev/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45b22d2b8a15" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>