<?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 Everyday Programmer on Medium]]></title>
        <description><![CDATA[Stories by Everyday Programmer on Medium]]></description>
        <link>https://medium.com/@everydayprogrammer?source=rss-22e7184f2e9d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_8FpGoJqrGFko9oWIfJH4Q.png</url>
            <title>Stories by Everyday Programmer on Medium</title>
            <link>https://medium.com/@everydayprogrammer?source=rss-22e7184f2e9d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 14:25:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@everydayprogrammer/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[A Beginner’s Guide to GeoServer: Understanding and Harnessing the Power of Spatial Data]]></title>
            <link>https://medium.com/@everydayprogrammer/a-beginners-guide-to-geoserver-understanding-and-harnessing-the-power-of-spatial-data-87fda4371f44?source=rss-22e7184f2e9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/87fda4371f44</guid>
            <category><![CDATA[mapping]]></category>
            <category><![CDATA[spatialdata]]></category>
            <category><![CDATA[geoserver]]></category>
            <category><![CDATA[gis]]></category>
            <dc:creator><![CDATA[Everyday Programmer]]></dc:creator>
            <pubDate>Tue, 10 Dec 2024 07:30:34 GMT</pubDate>
            <atom:updated>2024-12-10T07:30:34.326Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8gUW8--uO-zX4pjRQsr6Gg.png" /><figcaption>Header image</figcaption></figure><p><strong>What is GeoServer?</strong></p><p>Before getting into the practicalities, it’s crucial to understand what <a href="https://geoserver.org/">GeoServer </a>does and why it’s useful. Geospatial data can be shared, edited, and served using the open-source <a href="https://geoserver.org/">GeoServer</a> platform. Numerous geospatial formats, including Shapefiles, PostGIS, and GeoTIFFs, are supported. The <a href="https://en.wikipedia.org/wiki/Web_Map_Service">Web Map Service</a> (WMS), <a href="https://en.wikipedia.org/wiki/Web_Feature_Service">Web Feature Service</a> (WFS), and <a href="https://en.wikipedia.org/wiki/Web_Coverage_Service">Web Coverage Service</a> (WCS) standards developed by the Open Geospatial Consortium (OGC) serve as the foundation for <a href="https://geoserver.org/">GeoServer</a>. This blog’s primary goal is to give readers a comprehensive understanding of <a href="https://geoserver.org/">GeoServer</a>, its features, and the ways in which it may be incorporated into different applications to efficiently manage spatial data.</p><p><strong>Who Should Use GeoServer?</strong></p><p>The audience for GeoServer includes:</p><ol><li><strong>GIS professionals</strong>: Those who work with spatial data and need to publish it to the web.</li><li><strong>Developers</strong>: Looking for an open-source alternative to commercial mapping services to integrate into their applications.</li><li><strong>Environmental scientists and city planners</strong>: Individuals who need to analyze and visualize spatial datasets.</li><li><strong>Open data advocates</strong>: Groups interested in serving large, open geospatial datasets to the public.</li></ol><p>In this blog, we’ll focus on developers and GIS professionals who want to understand GeoServer’s core functionality and how to get started with it.</p><h3><strong>Key Features of GeoServer:</strong></h3><p>Let’s dive deeper into some of the standout features that make GeoServer a powerful tool for managing geospatial data:</p><ol><li><strong>Support for OGC Standards: </strong>GeoServer is compliant with the <a href="https://en.wikipedia.org/wiki/Open_Geospatial_Consortium">Open Geospatial Consortium</a> (OGC) standards such as WMS, WFS, and WCS. This allows the sharing of geospatial data over the web in a standardized, interoperable way. You can use it to display maps, retrieve feature data, and offer grid coverage to end users.</li><li><strong>Data Format Flexibility: </strong>GeoServer supports a wide array of geospatial formats, allowing users to upload and work with data in multiple formats, such as: <a href="https://en.wikipedia.org/wiki/Shapefile">Shapefiles</a>, <a href="https://en.wikipedia.org/wiki/GeoTIFF">GeoTIFF</a>, <a href="https://en.wikipedia.org/wiki/PostGIS">PostGIS </a>(PostgreSQL with spatial extension), <a href="https://en.wikipedia.org/wiki/GeoJSON">GeoJSON</a>. This flexibility makes it suitable for a variety of geospatial data sources, from vector data to raster layers.</li><li><strong>Powerful Map Styling: </strong>GeoServer uses <a href="https://en.wikipedia.org/wiki/Styled_Layer_Descriptor">Styled Layer Descriptors</a> (SLD), which provide powerful control over how maps are rendered. This allows users to customize the style of their layers, offering flexibility in how the data is visualized. From colors and line styles to complex rule-based styling, SLD gives you full control.</li><li><strong>Tile Caching with GeoWebCache: </strong>To enhance performance, GeoServer integrates seamlessly with <a href="https://www.osgeo.org/projects/geowebcache/">GeoWebCache</a>, allowing the server to cache map tiles. This dramatically improves load times for web maps, especially when serving large datasets. Cached tiles can be reused, reducing server load and speeding up map delivery.</li><li><strong>Security and Role-Based Access: </strong>GeoServer includes robust security features, including role-based access controls. You can define access levels for different users and groups, ensuring sensitive data is only available to those who need it. GeoServer can also integrate with external authentication systems like <a href="https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol">LDAP </a>or <a href="https://en.wikipedia.org/wiki/Central_Authentication_Service">CAS </a>for enhanced security.</li><li><strong>Scalability for Enterprise Use: </strong>GeoServer is designed to handle large datasets and high levels of traffic. With features like clustering, you can deploy GeoServer in an enterprise environment to handle larger loads. It can also be optimized for high performance through techniques like tile caching, database tuning, and distributed computing.</li><li><strong>Interoperability with Web Mapping Tools: </strong>GeoServer works seamlessly with web mapping libraries like <strong>OpenLayers</strong>, <strong>Leaflet</strong>, and <strong>Mapbox</strong>. These libraries allow you to consume GeoServer’s WMS and WFS services to create interactive maps on the web, making it easier to integrate spatial data into modern applications.</li></ol><h3><strong>Installing GeoServer:</strong></h3><ol><li>Visit the GeoServer Download Page.</li><li>Choose the <strong>stable</strong> release that matches your operating system:</li></ol><ul><li><strong>Windows</strong>: Download the <strong>GeoServer Windows Installer</strong>.</li><li><strong>macOS/Linux</strong>: Download the <strong>platform-independent binary</strong>.</li></ul><h4>Installing GeoServer on Windows</h4><ol><li>Run the <strong>GeoServer installer</strong> (geoserver-[version]-installer.exe).</li><li>During the installation:</li></ol><ul><li>Choose the installation directory (default is fine).</li><li>Select a port (default is 8080).</li><li>Once installed, run the GeoServer <strong>Start Script</strong> to launch the server.</li></ul><h4>Installing GeoServer on macOS/Linux</h4><ol><li>Extract the downloaded zip file into a directory (geoserver-[version].zip).</li><li>In your terminal, navigate to the GeoServer folder:<br>cd /path/to/geoserver/bin</li><li>Start the server by running the startup script:<br>./startup.sh</li></ol><h4>Access GeoServer</h4><p>Once the server is running, open your web browser and go to: <a href="http://localhost:8080/geoserver">http://localhost:8080/geoserver</a></p><p>The default login credentials are:</p><ul><li><strong>Username</strong>: admin</li><li><strong>Password</strong>: geoserver</li></ul><p>Now, GeoServer is up and running, and you’re ready to connect it to your database.</p><h3><strong>Example: Connecting GeoServer to PostGIS</strong></h3><p><strong>Step 1: Setting Up PostGIS:</strong></p><p>If you don’t already have PostGIS installed, follow these steps to set it up:</p><h4>Install PostgreSQL and PostGIS</h4><ol><li><strong>For Windows/macOS/Linux</strong>: Download PostgreSQL from the<a href="https://www.postgresql.org/download/"> official PostgreSQL website</a> and follow the installation instructions for your platform.</li><li>Once installed, use the PostgreSQL package manager (<strong>pgAdmin</strong>) or terminal to create a new database.</li><li>Enable PostGIS in your PostgreSQL database by running the following SQL command:<br><strong>CREATE EXTENSION postgis;</strong></li></ol><p>Now, your database can store and manage geospatial data.</p><h4><strong>Step 2: Load Spatial Data into PostGIS:</strong></h4><p>We need to add some spatial data (e.g., Shapefiles) to PostGIS to serve through GeoServer. To load a Shapefile into PostGIS, we can use a tool called <strong>shp2pgsql</strong>, which comes with PostGIS.</p><p><strong>Convert the Shapefile to SQL</strong>: Suppose you have a Shapefile of world boundaries (e.g., <strong>world_borders.shp</strong>). Use the following command in the terminal to convert it to SQL:</p><p><strong>shp2pgsql -I -s 4326 world_borders.shp public.world_borders &gt; world_borders.sql</strong></p><p><strong>Explanation:</strong></p><ol><li><strong>-I</strong>: Adds a spatial index to the table.</li><li><strong>-s 4326</strong>: Specifies the SRID (Spatial Reference System Identifier) as WGS84 (EPSG:4326).</li><li><strong>public.world_borders</strong>: Loads the Shapefile into the <strong>world_borders</strong> table in the <strong>public </strong>schema.</li></ol><p><strong>Load the SQL file into PostgreSQL</strong>:After generating the SQL file, load it into your PostgreSQL/PostGIS database:</p><p><strong>psql -d your_database -f world_borders.sql</strong></p><h3>Step 3: Connect GeoServer to PostGIS</h3><p>Now that we have geospatial data in PostGIS, we need to connect GeoServer to this database and publish the data.</p><h4>1. Log into GeoServer</h4><ol><li>Open your browser and go to<strong> </strong><a href="http://localhost:8080/geoserver."><strong>http://localhost:8080/geoserver.</strong></a></li><li>Log in with the default credentials:</li></ol><ul><li>Username<strong>: admin</strong></li><li>Password<strong>: geoserver</strong></li></ul><h4><strong>2. Add a New PostGIS Store</strong></h4><ol><li>Go to Stores under the Data section in GeoServer.</li><li>Click Add new Store, then select PostGIS as the data source.</li></ol><p>Enter the required information:</p><ol><li><strong>Workspace</strong>: Choose or create a new workspace.</li><li><strong>Data Source Name</strong>: Give it a name (e.g., world_borders_store).</li><li><strong>Database</strong>: Enter your PostgreSQL database name.</li><li><strong>Host</strong>: Typically localhost if the database is on the same machine.</li><li><strong>Port</strong>: The default PostgreSQL port is 5432.</li><li><strong>Schema</strong>: Enter public (or the schema where your table is located).</li><li><strong>User and Password</strong>: Provide the database username and password.</li><li>Click Save to create the connection.</li></ol><h4>3. Publish the Layer:</h4><ol><li>After saving the connection, you’ll be redirected to the New Layer page. Click Publish next to the world_borders table you just imported.</li><li>On the Edit Layer page:</li></ol><ul><li>Title: Name the layer (e.g., World Borders).</li><li>Coordinate Reference Systems (CRS): Ensure it’s set to EPSG:4326 (or another CRS matching your data).</li><li>Bounding Boxes: Click on the Compute from data and Compute from native bounds buttons to automatically set the bounds.</li></ul><p>Click Save to publish the layer.</p><h4>4. Preview the Layer:</h4><p>To verify the connection and preview the map:</p><ol><li>Go to Layer Preview under the Data section.</li><li>Find your published layer (World Borders) and click on the OpenLayers link next to it.</li></ol><p>Your spatial data from PostGIS should now be displayed as an interactive map!</p><h4><strong>Conclusion:</strong></h4><p>For anyone working with geospatial data, GeoServer is an essential tool. It provides a reliable, adaptable way to serve spatial data, from publishing datasets to making dynamic online maps. For developers and GIS experts wishing to serve spatial data effectively, GeoServer is a great option because of its capabilities, which include support for different data formats, open standards, and tile caching. You’ll have a strong basis to work with GeoServer and realize its full potential in your applications if you follow this instruction. Have fun with your mapping!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87fda4371f44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own Video Call App using ZEGOCLOUD’s UIKit with Java in Android Studio]]></title>
            <link>https://medium.com/@everydayprogrammer/build-your-own-video-call-app-using-zegoclouds-uikit-with-java-in-android-studio-7b7438aceef1?source=rss-22e7184f2e9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b7438aceef1</guid>
            <category><![CDATA[zegocloud]]></category>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[video-call]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Everyday Programmer]]></dc:creator>
            <pubDate>Fri, 12 Apr 2024 14:16:00 GMT</pubDate>
            <atom:updated>2024-04-16T07:41:16.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7sKrRkLoOstxxQ6kfr0dxA.png" /><figcaption>Build Your Own Video Call App using ZEGOCLOUD’s UIKit with Java in Android Studio</figcaption></figure><p>In today’s digital age, where connectivity is paramount, <a href="https://www.zegocloud.com/product/video-call">video calling</a> has emerged as a ubiquitous means of communication. Whether it’s connecting with loved ones, conducting virtual meetings, or collaborating with colleagues remotely, the demand for video call applications continues to soar. Fortunately, with the advent of robust development frameworks and SDKs, creating your own video call app has become more feasible than ever before. In this comprehensive guide, we’ll explore the process of building a feature-rich video call application using Java and <a href="https://www.zegocloud.com/uikits">ZEGOCLOUD UIKit</a> in Android Studio.</p><p><strong>What is ZEGOCLOUD UIKit ?</strong></p><p><strong>ZEGOCLOUD UIKit</strong> is a development toolkit offered by <a href="https://www.zegocloud.com/">ZEGOCLOUD </a>that simplifies the process of integrating real-time audio and video calling features into your mobile and web applications. It provides pre-built UI components and functionalities specifically designed for video communication scenarios. Since all the components are pre-built with ZEGOCLOUD’s UIKit, it makes integrating video and <a href="https://www.zegocloud.com/product/voice-call">audio call</a> features inside your application easier, less time consuming and economical.</p><p><strong>ZEGOCLOUD UIKit’s features:</strong></p><ol><li>Pre-built UI Components</li><li>Cross Platform</li><li>Easy Customization</li><li>Ready to Use</li><li>Modular Design</li><li>Simplified Development</li><li>Reduced Development Costs</li><li>In-built AI Effects such as 3D stickers, filters, face beautification and more…</li></ol><p><strong>What all does communications modes does ZEGOCLOUD UIKit’s offer ?</strong></p><ol><li>1-on-1 calls</li><li>Group calls</li><li>Video conference</li><li>Live streaming</li><li>Live audio room</li><li>In-app chat</li></ol><p><strong>What all can ZEGOCLOUD UIKit’s be used for?</strong></p><ol><li>Live Audio Room</li><li>Online Karaoke</li><li>Watch Together</li><li>Game Streaming</li><li>Fitness Class</li><li>Live Shopping</li><li>1-on-1 Tutoring</li><li>And more…</li></ol><p><strong>Steps to implement Video Call in Android Studio project:</strong></p><ol><li>Create a new Android Studio project or open an existing one on which you want to integrate.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*rEMIZPQ2xwfIP1sTdryaLg.png" /><figcaption>Creating new project in Android Studio</figcaption></figure><p>2. <a href="https://console.zegocloud.com/account/signup">Login/Sign up to ZEGOCLOUD</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHpihSIN65_E7C2hjEtDKQ.png" /><figcaption>ZEGOCLOUD landing page</figcaption></figure><p>3. Setting up ZEGOCLOUD project:</p><p>After logging into ZEGOCLOUD, you’ll be directed to this dashboard page. Here create your project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yl3TWr74EAuBqBHMBVW-UQ.png" /><figcaption>ZEGOCLOUD Dashboard</figcaption></figure><p>Then select the use case for your project. In my case I’ve chosen Voice &amp; Video Call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rduVmMUyzCddnnBGF_Flug.png" /></figure><p>Then give a name to your project. And select which way of integration you’re going to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2pQML4VYgH46KeQYKwfg0g.png" /><figcaption>ZEGOCLOUD Project Creation</figcaption></figure><p>Since we’re seeing about ZEGOCLOUD’s UIKit in this article, we’ll choose Start with UIKits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rJ7URHn8KmWwM31Xb1cdg.png" /><figcaption>ZEGOCLOUD Project Creation</figcaption></figure><p>Then select the platform you’re going to integrate. In this case we’re using Android.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJsc3vC-Z4BHuVLO8St0zw.png" /><figcaption>ZEGOCLOUD Framework Selection</figcaption></figure><p>Then select your UI Configuration. I’m leaving it as default you can customize it as you wish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JGh0vAjgKgp06m6TbWVftg.png" /><figcaption>ZEGOCLOUD UI Configuration</figcaption></figure><p>Then click next and you’ll be landing on you project’s configuration page. Here you’ll find your app’s ID and app Sign. I’ve blurred out my App ID and App Sign. Make note of your app ID and app Sign.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CtjCBvYSnH0_KnOErqJsfw.png" /><figcaption>ZEGOGLOUD Project Configuration Page</figcaption></figure><p>4. Adding ZEGOCLOUD Dependency in Android Studio:</p><p>Go to app level build.gradle file and paste the two dependencies below:</p><pre>implementation &#39;com.github.ZEGOCLOUD:zego_uikit_prebuilt_call_android:+&#39;<br>implementation &#39;com.github.ZEGOCLOUD:zego_uikit_signaling_plugin_android:+&#39;</pre><p>5. Activity file coding:</p><p>In the onCreate() method of the MainActivity add the below code to receive calls from others.</p><pre>ZegoUIKitPrebuiltCallInvitationConfig callInvitationConfig = new ZegoUIKitPrebuiltCallInvitationConfig();<br>ZegoUIKitPrebuiltCallInvitationService.init(getApplication(), appID, appSign, &quot;User ID, &quot;User Name&quot;, callInvitationConfig);</pre><p>Place your app ID and app Sign in the init() method parameter and give a unique user ID and a Name for the current user and then parse the callInvitationConfig. The user ID should be unique and can be used by other users to make call to the particular recipient. You can also use authentication services like Firebase Auth to generate user ID.</p><p>6. Permission:</p><p>We don’t have to declare permissions in AndroidManifest.xml file and we don’t have to ask for permission in run-time in our code. Instead, we can use ZEGOCLOUD’s PermissionX class to get permissions. For that just paste the following code in your MainActivity.java file’s onCreate() method.</p><pre>PermissionX.init(MainActivity.this).permissions(Manifest.permission.SYSTEM_ALERT_WINDOW)<br>      .onExplainRequestReason(new ExplainReasonCallback() {<br>      @Override<br>      public void onExplainReason(@NonNull ExplainScope scope, @NonNull List&lt;String&gt; deniedList) {<br>      String message = &quot;We need your consent for the following permissions in order to use the offline call function properly&quot;;<br>      scope.showRequestReasonDialog(deniedList, message, &quot;Allow&quot;, &quot;Deny&quot;);<br>    }<br>   }).request(new RequestCallback() {<br>   @Override<br>   public void onResult(boolean allGranted, @NonNull List&lt;String&gt; grantedList, @NonNull List&lt;String&gt; deniedList) {<br>   }<br>});</pre><p>7. Making call using ZEGOCLOUD:</p><p>We can make a call using ZegoSendCallInvitationButton. We have to place this element in our xml file on the page we want to make a call. If you want both video and voice call you have to add two this element twice and have different ID for each. You don’t have to worry about the icon of the button icon will be automatically added based on the type of the button set in the java code.</p><pre>&lt;com.zegocloud.uikit.prebuilt.call.invite.widget.ZegoSendCallInvitationButton<br>            android:layout_width=&quot;40sp&quot;<br>            android:layout_height=&quot;40sp&quot;<br>            android:id=&quot;@+id/voiceCallBtn&quot;/&gt;<br><br>&lt;com.zegocloud.uikit.prebuilt.call.invite.widget.ZegoSendCallInvitationButton<br>            android:layout_width=&quot;40sp&quot;<br>            android:layout_height=&quot;40sp&quot;<br>            android:id=&quot;@+id/videoCallBtn&quot;/&gt;</pre><p>And on the Activity java file add the following code:</p><pre>ZegoSendCallInvitationButton voiceCallBtn = view.findViewById(R.id.voiceCallBtn);<br>ZegoSendCallInvitationButton videoCallBtn = view.findViewById(R.id.videoCallBtn);<br><br>voiceCallBtn.setIsVideoCall(false);<br>voiceCallBtn.setType(ZegoInvitationType.VOICE_CALL);<br>voiceCallBtn.setResourceID(&quot;zego_uikit_call&quot;);<br>voiceCallBtn.setInvitees(Collections.singletonList(new ZegoUIKitUser(&quot;Recipient User ID&quot;, &quot;Recipient Name&quot;)));<br><br>videoCallBtn.setIsVideoCall(true);<br>videoCallBtn.setType(ZegoInvitationType.VIDEO_CALL);<br>videoCallBtn.setResourceID(&quot;zego_uikit_call&quot;);<br>videoCallBtn.setInvitees(Collections.singletonList(new ZegoUIKitUser(&quot;Recipient User ID&quot;, &quot;Recipient Name&quot;)));</pre><p>By the above code, when the voice or video call button is clicked, the call will be placed automatically. We don’t have to set OnClickListener for this button. If you want to make call to multiple Recipients add the users in an array list and parse it to the setInvitees() method.</p><p>That’s it! Just run the app.</p><p><strong>Conclusion:</strong></p><p>In conclusion, building a video call app with Java and ZEGOCLOUD UIKit in Android Studio offers a rewarding opportunity to create a cutting-edge communication platform. By following the steps outlined in this guide and leveraging the capabilities of ZEGOCLOUD’s SDK, you can develop a feature-rich and scalable app that meets the evolving needs of users in today’s digital landscape. <a href="https://bit.ly/4aYjs94">Get ZEGOCLOUD SDK for 10,000 free mins by clicking here!</a> Happy coding!</p><p>Also check out my full YouTube video tutorial on how to build a video calling app in Android Studio using java using ZEGOCLOUD. In that tutorial I’ll be using firebase auth for user ID generation and firebase real-time database to save and list all the user ID’s in the Android Application. You might find it useful. Also consider subscribing me on Medium and on YouTube.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FuzD_AYxDQy8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuzD_AYxDQy8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FuzD_AYxDQy8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ee926d0d2541112c5d56703b208e8d7/href">https://medium.com/media/3ee926d0d2541112c5d56703b208e8d7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b7438aceef1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating typewriter text effect in Android Studio]]></title>
            <link>https://medium.com/@everydayprogrammer/creating-typewriter-text-effect-in-android-studio-098e33b94e01?source=rss-22e7184f2e9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/098e33b94e01</guid>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Everyday Programmer]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 16:33:22 GMT</pubDate>
            <atom:updated>2024-01-07T16:34:08.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GfxUpHiJLALVBVcqBT-VOQ.png" /><figcaption>How to create Typewriter text effect in Android Studio.</figcaption></figure><h3>Introduction:</h3><p>Adding unique and engaging UI effects can enhance the user experience of your Android applications. One such interesting effect is the typewriter text effect, which simulates the appearance of text being typed on a typewriter. In this article, we’ll explore how to implement this effect in Android Studio using both Java and Kotlin.</p><h4>Step 1:</h4><p>Create a project in Android Studio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*cUPXpXW0qfeiB442Qsy7uQ.png" /><figcaption>Creating new project in Android Studio</figcaption></figure><h4>Step 2:</h4><p>You can create typewriter effect by using Handler but implementing it for large text is hard so instead we’ll use <a href="https://github.com/NitishGadangi/TypeWriter-TextView">TypeWriter-TextView</a> library made by Nitish Gadangi. To use this library obviously we’ll have to add it’s dependency into our project. To do that first we’ll have to add JitPack repository to our project level build.gradle file as shown below:</p><pre>allprojects {<br>		repositories {<br>			...<br>			maven { url &#39;https://jitpack.io&#39; }<br>		}<br>	}</pre><p>Then we have to add TypeWriter TextView dependency to app level build.gradle file as shown below:</p><pre>dependencies {<br>	        implementation &#39;com.github.NitishGadangi:TypeWriter-TextView:v1.3&#39;<br>	}</pre><h4>Step 3:</h4><p>Now we’ll have to add TypeWriterView to our xml layout file. Like shown below:</p><pre>&lt;com.nitish.typewriterview.TypeWriterView  <br>  android:id=&quot;@+id/typeWriterView&quot;  <br>  android:layout_width=&quot;match_parent&quot;  <br>  android:layout_height=&quot;wrap_content&quot;  <br> /&gt;</pre><p>You can set your own size and gravity to it.</p><h4><strong>Step 4:</strong></h4><p>Here’s where we get the cool typewriter effect. After adding TypeWriterView to our layout file we have to create TypeWriterView in our java file and assign the element to it. Like shown below:</p><p>In Java:</p><pre>TypeWriterView typeWriterView = findViewById(R.id.typeWriterView);</pre><p>In Kotlin:</p><pre>val typeWriterView: TypeWriterView = findViewById(R.id.typeWriterView)</pre><p>After that we have to call <strong>typeWriterView.animateText()</strong> function to start typewriter effect like shown below:</p><pre>typeWriterView.animateText(&quot;Insert your text here&quot;);</pre><p>And you’ll get something like this shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CT4709uw05RC92NloYVqjQ.gif" /><figcaption>Typwriter text effect in Android Studio</figcaption></figure><h3>Conclusion:</h3><p>By following this tutorial, you’ve successfully implemented a typewriter text effect in your Android application. I hope this helps. If you find this interesting make sure to subscribe to me in Medium and on YouTube for more tutorials like this. Also don’t forget to check out my YouTube tutorial on how to implement Typewriter effect and you can find the source code of this project available on Github. Happy Coding!</p><p>Link to TypeWriter library Github repo: <a href="https://github.com/NitishGadangi/TypeWriter-TextView">https://github.com/NitishGadangi/TypeWriter-TextView</a></p><p>Link to Project Github repo: <a href="https://github.com/Everyday-Programmer/Typewriter-Text-Effect-Android">https://github.com/Everyday-Programmer/Typewriter-Text-Effect-Android</a></p><p>YouTube tutorial: <a href="https://youtu.be/YyXHFjb_xwU">https://youtu.be/YyXHFjb_xwU</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FYyXHFjb_xwU&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DYyXHFjb_xwU&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fafabb89a95702b0588479da06c16d07/href">https://medium.com/media/fafabb89a95702b0588479da06c16d07/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=098e33b94e01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Material 3 Carousel in Android Studio]]></title>
            <link>https://medium.com/@everydayprogrammer/implementing-material-3-carousel-in-android-studio-245435a5cdc5?source=rss-22e7184f2e9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/245435a5cdc5</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[material-design]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Everyday Programmer]]></dc:creator>
            <pubDate>Wed, 30 Aug 2023 08:37:00 GMT</pubDate>
            <atom:updated>2023-08-30T08:37:00.620Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Implement M3 Carousel in Android Studio" src="https://cdn-images-1.medium.com/max/1024/1*V_hj7MQ0XxAiwCkJuATFGg.png" /></figure><p>Carousels are a popular UI element used to showcase a collection of images or content in an interactive and engaging manner. With the release of Material Design 3, Google introduced a new design system that focuses on providing a more customizable and expressive user interface. One of the exciting components introduced in Material Design 3 is the Carousel, which allows developers to create visually appealing and dynamic image carousels. In this tutorial, we will explore how to implement the Material 3 Carousel in Android Studio.</p><h3>Step 1:</h3><p>Open Android Studio and create a new Android project or open an existing one. Ensure that you have the necessary dependencies for Material Design components and Glide library by adding the following line to your app-level build.gradle file:</p><pre>implementation &#39;com.google.android.material:material:1.9.0&#39;<br>implementation &#39;com.github.bumptech.glide:glide:4.16.0&#39;</pre><p>After adding the dependency, sync your project to ensure that the necessary files are downloaded.</p><h3>Step 2:</h3><p>Create list item xml file and add this below code into it:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;com.google.android.material.carousel.MaskableFrameLayout android:id=&quot;@+id/carousel_item_container&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    android:layout_marginStart=&quot;4dp&quot;<br>    android:layout_marginEnd=&quot;4dp&quot;<br>    android:foreground=&quot;?attr/selectableItemBackground&quot;<br>    app:shapeAppearance=&quot;?attr/shapeAppearanceCornerExtraLarge&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;<br><br>    &lt;ImageView<br>        android:id=&quot;@+id/list_item_image&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:transitionName=&quot;image&quot;<br>        android:scaleType=&quot;centerCrop&quot;/&gt;<br><br>&lt;/com.google.android.material.carousel.MaskableFrameLayout&gt;</pre><h3>Step 3:</h3><p>Create a image adapter for recycler view and type the following code:</p><pre>public class ImageAdapter extends RecyclerView.Adapter&lt;ImageAdapter.ViewHolder&gt; {<br>    Context context;<br>    ArrayList&lt;String&gt; arrayList;<br>    OnItemClickListener onItemClickListener;<br><br>    public ImageAdapter(Context context, ArrayList&lt;String&gt; arrayList) {<br>        this.context = context;<br>        this.arrayList = arrayList;<br>    }<br><br>    @NonNull<br>    @Override<br>    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {<br>        View view = LayoutInflater.from(context).inflate(R.layout.image_list_item, parent, false);<br>        return new ViewHolder(view);<br>    }<br><br>    @Override<br>    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {<br>        Glide.with(context).load(arrayList.get(position)).into(holder.imageView);<br>        holder.itemView.setOnClickListener(view -&gt; onItemClickListener.onClick(holder.imageView, arrayList.get(position)));<br>    }<br><br>    @Override<br>    public int getItemCount() {<br>        return arrayList.size();<br>    }<br><br>    public static class ViewHolder extends RecyclerView.ViewHolder {<br>        ImageView imageView;<br>        public ViewHolder(@NonNull View itemView) {<br>            super(itemView);<br>            imageView = itemView.findViewById(R.id.list_item_image);<br>        }<br>    }<br><br>    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {<br>        this.onItemClickListener = onItemClickListener;<br>    }<br><br>    public interface OnItemClickListener {<br>        void onClick(ImageView imageView, String path);<br>    }<br>}</pre><h3>Step 4:</h3><p>Now add a recycler view in the activity_main.xml file:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    tools:context=&quot;.MainActivity&quot;&gt;<br><br>    &lt;androidx.recyclerview.widget.RecyclerView<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;200sp&quot;<br>        android:layout_marginTop=&quot;10sp&quot;<br>        android:id=&quot;@+id/recycler&quot;<br>        app:layoutManager=&quot;com.google.android.material.carousel.CarouselLayoutManager&quot;/&gt;<br><br>&lt;/RelativeLayout&gt;</pre><p>Since we are using this recycler view for carousel we have to set layout manager as “com.google.android.material.carousel.CarouselLayoutManager”.</p><h3>Step 5:</h3><p>Now finally let’s code MainActivity.java file, initialize recycler view and create an arraylist which we’ll be using to parse into our image adapter. Then add image urls to the arraylist and then set the adapter to recycler view.</p><p>Complete MainActivity.java:</p><pre>public class MainActivity extends AppCompatActivity {<br><br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        setContentView(R.layout.activity_main);<br><br>        RecyclerView recyclerView = findViewById(R.id.recycler);<br>        ArrayList&lt;String&gt; arrayList = new ArrayList&lt;&gt;();<br><br>        //Add multiple images to arraylist.<br>        arrayList.add(&quot;&quot;);<br><br>        ImageAdapter adapter = new ImageAdapter(MainActivity.this, arrayList);<br>        recyclerView.setAdapter(adapter);<br><br>        adapter.setOnItemClickListener(new ImageAdapter.OnItemClickListener() {<br>            @Override<br>            public void onClick(ImageView imageView, String path) {<br>                //Do something like opening the image in new activity or showing it in full screen or something else.<br>            }<br>        });<br>    }<br>}</pre><h3><strong>Conclusion:</strong></h3><p>Implementing the Material 3 Carousel in Android Studio allows you to create visually appealing and interactive image carousels that enhance the user experience in your app. With the power of Material Design 3, you can customize the carousel to match your app’s design language and provide an engaging way for users to explore content. By following the steps in this tutorial, you’ve learned how to integrate the Material 3 Carousel into your Android app and set the foundation for creating captivating user interfaces. Happy coding!</p><p>The code for the project is available on GitHub at <a href="https://github.com/Everyday-Programmer/Material-3-Carousel-Android">https://github.com/Everyday-Programmer/Material-3-Carousel-Android</a>.</p><p>And a YouTube tutorial is available at: <a href="https://youtu.be/Nld8bmj2BQE">https://youtu.be/Nld8bmj2BQE</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FNld8bmj2BQE&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DNld8bmj2BQE&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0dbd15785eca950715d2cb8e1331f0df/href">https://medium.com/media/0dbd15785eca950715d2cb8e1331f0df/href</a></iframe><p>I hope this helps!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=245435a5cdc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implement Android Photo Picker in Android Studio]]></title>
            <link>https://medium.com/@everydayprogrammer/implement-android-photo-picker-in-android-studio-3562a85c85f1?source=rss-22e7184f2e9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3562a85c85f1</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[programmer]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Everyday Programmer]]></dc:creator>
            <pubDate>Tue, 15 Aug 2023 14:24:06 GMT</pubDate>
            <atom:updated>2023-08-15T14:24:06.036Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Implement Android Photo Picker in Android Studio" src="https://cdn-images-1.medium.com/max/1024/1*rKiGHraBw0_Q8IncgqT5MA.png" /></figure><p>Adding a photo picker to your Android app can greatly enhance the user experience, allowing users to easily select images from their device’s gallery or camera. In this tutorial, we will walk you through the process of implementing an Android photo picker in Android Studio using Java.</p><h3>About Photo picker:</h3><p>The photo picker provides a browsable, searchable interface that presents the user with their media library, sorted by date from newest to oldest. he photo picker provides a safe, built-in way for users to grant your app access to only selected images and videos, instead of their entire media library. The tool updates automatically, offering expanded functionality to your app’s users over time without requiring any code changes.</p><h3>Implementation:</h3><p><strong>Step 1: Create a New Android Project</strong></p><ol><li>Launch Android Studio and create a new Android project with an appropriate name and package.</li><li>Choose an Empty Activity template or a template that suits your app’s needs.</li></ol><p><strong>Step 2: Add dependency:</strong></p><p>Add the following dependency to build.gradle file:</p><pre>implementation &#39;androidx.activity:activity:1.7.0&#39;</pre><p><strong>Step 3: Design the Layout</strong></p><p>Design your layout with appropriate UI elements like buttons and image views. For example:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    tools:context=&quot;.MainActivity&quot;&gt;<br><br>    &lt;ImageView<br>        android:layout_width=&quot;300sp&quot;<br>        android:layout_height=&quot;300sp&quot;<br>        android:layout_centerHorizontal=&quot;true&quot;<br>        android:id=&quot;@+id/imageView&quot;<br>        android:layout_marginTop=&quot;20sp&quot;/&gt;<br><br>    &lt;com.google.android.material.button.MaterialButton<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>        android:text=&quot;Pick Image&quot;<br>        android:layout_centerHorizontal=&quot;true&quot;<br>        android:layout_below=&quot;@id/imageView&quot;<br>        android:id=&quot;@+id/pickImage&quot;<br>        android:layout_marginTop=&quot;20sp&quot;/&gt;<br><br>&lt;/RelativeLayout&gt;</pre><p><strong>Step 4: Implement Photo Picker</strong></p><p><strong>Select a single media item:</strong></p><p>To select a single media item, use the PickVisualMedia activity result contract, as shown in the following code snippet:</p><pre>ActivityResultLauncher&lt;PickVisualMediaRequest&gt; pickMedia =<br>        registerForActivityResult(new PickVisualMedia(), uri -&gt; {<br>    // Callback is invoked after the user selects a media item or closes the<br>    // photo picker.<br>    if (uri != null) {<br>        Log.d(&quot;PhotoPicker&quot;, &quot;Selected URI: &quot; + uri);<br>    } else {<br>        Log.d(&quot;PhotoPicker&quot;, &quot;No media selected&quot;);<br>    }<br>});<br><br>// Include only one of the following calls to launch(), depending on the types<br>// of media that you want to let the user choose from.<br><br>// Launch the photo picker and let the user choose images and videos.<br>pickMedia.launch(new PickVisualMediaRequest.Builder()<br>        .setMediaType(PickVisualMedia.ImageAndVideo.INSTANCE)<br>        .build());<br><br>// Launch the photo picker and let the user choose only images.<br>pickMedia.launch(new PickVisualMediaRequest.Builder()<br>        .setMediaType(PickVisualMedia.ImageOnly.INSTANCE)<br>        .build());<br><br>// Launch the photo picker and let the user choose only videos.<br>pickMedia.launch(new PickVisualMediaRequest.Builder()<br>        .setMediaType(PickVisualMedia.VideoOnly.INSTANCE)<br>        .build());<br><br>// Launch the photo picker and let the user choose only images/videos of a<br>// specific MIME type, such as GIFs.<br>String mimeType = &quot;image/gif&quot;;<br>pickMedia.launch(new PickVisualMediaRequest.Builder()<br>        .setMediaType(new PickVisualMedia.SingleMimeType(mimeType))<br>        .build());</pre><p><strong>Select multiple media items:</strong></p><p>To select multiple media items, set a maximum number of selectable media files, as shown in the following code snippet.</p><pre>// Registers a photo picker activity launcher in multi-select mode.<br>// In this example, the app lets the user select up to 5 media files.<br>ActivityResultLauncher&lt;PickVisualMediaRequest&gt; pickMultipleMedia =<br>        registerForActivityResult(new PickMultipleVisualMedia(5), uris -&gt; {<br>    // Callback is invoked after the user selects media items or closes the<br>    // photo picker.<br>    if (!uris.isEmpty()) {<br>        Log.d(&quot;PhotoPicker&quot;, &quot;Number of items selected: &quot; + uris.size());<br>    } else {<br>        Log.d(&quot;PhotoPicker&quot;, &quot;No media selected&quot;);<br>    }<br>});<br><br>// For this example, launch the photo picker and let the user choose images<br>// and videos. If you want the user to select a specific type of media file,<br>// use the overloaded versions of launch(), as shown in the section about how<br>// to select a single media item.<br>pickMultipleMedia.launch(new PickVisualMediaRequest.Builder()<br>        .setMediaType(PickVisualMedia.ImageAndVideo.INSTANCE)<br>        .build());</pre><p>The platform limits the maximum number of files that you can ask the user to select in the photo picker. To access this limit, call <a href="https://developer.android.com/reference/android/provider/MediaStore#getPickImagesMaxLimit()">getPickImagesMaxLimit()</a>. On devices where the photo picker isn&#39;t supported, this limit is ignored.</p><p>Note: If the photo picker isn’t available and the support library invokes the <strong>ACTION_OPEN_DOCUMENT</strong> intent action, the system ignores the specified maximum number of selectable media files.</p><p><strong>Example MainActivity.java:</strong></p><pre>public class MainActivity extends AppCompatActivity {<br>    ImageView imageView;<br>    ActivityResultLauncher&lt;PickVisualMediaRequest&gt; launcher = registerForActivityResult(new ActivityResultContracts.PickVisualMedia(), new ActivityResultCallback&lt;Uri&gt;() {<br>        @Override<br>        public void onActivityResult(Uri o) {<br>            if (o == null) {<br>                Toast.makeText(MainActivity.this, &quot;No image Selected&quot;, Toast.LENGTH_SHORT).show();<br>            } else {<br>                Glide.with(getApplicationContext()).load(o).into(imageView);<br>            }<br>        }<br>    });<br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        setContentView(R.layout.activity_main);<br><br>        imageView = findViewById(R.id.imageView);<br>        MaterialButton pickImage = findViewById(R.id.pickImage);<br><br>        pickImage.setOnClickListener(new View.OnClickListener() {<br>            @Override<br>            public void onClick(View view) {<br>                launcher.launch(new PickVisualMediaRequest.Builder()<br>                        .setMediaType(ActivityResultContracts.PickVisualMedia.ImageOnly.INSTANCE)<br>                        .build());<br>            }<br>        });<br>    }<br>}</pre><p>In the above example when the <strong>pickImage </strong>is clicked activity result launcher is launched with the <strong>PickVisalMediaRequest</strong>.<strong> </strong>In this example the media type is set to image only so the photo picker will display only the images. After the user selects an image if the result is not null then the image is displayed in an image view using Glide. This is just a simple example you can change the media type and handle the result however you need.</p><h3>Conclusion:</h3><p>Congratulations! You have successfully implemented Android photo picker in your app using Android Studio and Java. Users can now easily select images from their device’s gallery, enhancing the overall user experience of your app.</p><p>You can find the source code on Github from here: <a href="https://github.com/Everyday-Programmer/Android-Image-Picker">https://github.com/Everyday-Programmer/Android-Image-Picker</a></p><p>Watch the YouTube tutorial here: <a href="https://youtu.be/pUrPw0Q8Inc">https://youtu.be/pUrPw0Q8Inc</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpUrPw0Q8Inc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpUrPw0Q8Inc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpUrPw0Q8Inc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c329d7bc0e5e245a48cdcaafcbdd589/href">https://medium.com/media/7c329d7bc0e5e245a48cdcaafcbdd589/href</a></iframe><p>Watch YouTube tutorial on how to implement photo picker to pick videos from here: <a href="https://youtu.be/pwdJZ7lWGOs">https://youtu.be/pwdJZ7lWGOs</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpwdJZ7lWGOs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpwdJZ7lWGOs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpwdJZ7lWGOs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/158d23662fc7c6420cd51d7cdfb09cb2/href">https://medium.com/media/158d23662fc7c6420cd51d7cdfb09cb2/href</a></iframe><p>Video Picker Source Code: <a href="https://github.com/Everyday-Programmer/Android-Video-Picker">https://github.com/Everyday-Programmer/Android-Video-Picker</a></p><p>Happy Coding :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3562a85c85f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure Text Encryption and Decryption using PHP]]></title>
            <link>https://medium.com/@everydayprogrammer/secure-text-encryption-and-decryption-using-php-ddc85c116aa2?source=rss-22e7184f2e9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddc85c116aa2</guid>
            <category><![CDATA[databse]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Everyday Programmer]]></dc:creator>
            <pubDate>Thu, 10 Aug 2023 16:47:01 GMT</pubDate>
            <atom:updated>2023-08-10T16:47:01.006Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Secure Text with Encryption and decryption" src="https://cdn-images-1.medium.com/max/1024/1*cpGrZUeMjCuUjVGLpTw5BQ.png" /><figcaption><strong>Secure Text with Encryption and decryption</strong></figcaption></figure><p>In today’s digital age, data security and privacy have become paramount concerns. Whether you’re handling sensitive user information or confidential messages, encryption is a crucial technique to ensure that your data remains secure and unreadable by unauthorized parties. In this blog post, we’ll explore how to encrypt and decrypt text using PHP, and we’ll provide a step-by-step guide along with code examples.</p><h3>Understanding Encryption and Decryption:</h3><p>Encryption is the process of converting plaintext data into ciphertext, making it unreadable without the appropriate decryption key. Decryption, on the other hand, is the process of converting the ciphertext back into its original plaintext form using the decryption key. The use of encryption ensures that even if an attacker gains access to the encrypted data, they won’t be able to understand it without the decryption key.</p><h3>Prerequisites:</h3><p>Before we dive into the code, make sure you have a basic understanding of PHP and web development. Also, ensure that you have a web server with PHP installed to execute the code.</p><h3>The Code:</h3><p><strong>HTML Structure: </strong>The HTML portion of the code provides a user-friendly interface with two forms: one for encryption and one for decryption. Users can enter the text they want to encrypt or decrypt, along with the appropriate encryption or decryption key. Upon submission, the PHP code checks for the form that was submitted and calls the corresponding function to perform the encryption or decryption. The results are then displayed on the page. The HTML structure defines two forms: one for encrypting text and another for decrypting text. Each form contains input fields for the necessary data.</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>    &lt;head&gt;<br>        &lt;title&gt;Encryption &amp; Decryption&lt;/title&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>        &lt;h2&gt;Encryption &amp; Decryption Example&lt;/h2&gt;<br>        &lt;!--Encrypt Form--&gt;<br>        &lt;form method=&quot;post&quot; action=&quot;action.php&quot;&gt;<br>            &lt;label for=&quot;plaintext&quot;&gt;Enter text to encrypt:&lt;/label&gt;&lt;br&gt;<br>            &lt;textarea name=&quot;plaintext&quot; id=&quot;plaintext&quot; rows=&quot;4&quot; cols=&quot;40&quot;&gt;&lt;/textarea&gt;<br>            &lt;br&gt;<br>            &lt;br&gt;<br>            &lt;label for=&quot;encryptionkey&quot;&gt;Enter the encryption key:&lt;/label&gt;<br>            &lt;br&gt;<br>            &lt;input type=&quot;password&quot; name=&quot;encryptionkey&quot; id=&quot;encryptionkey&quot;&gt;<br>            &lt;br&gt;<br>            &lt;br&gt;<br>            &lt;input type=&quot;submit&quot; name=&quot;encrypt&quot; value=&quot;Encrypt&quot;&gt;<br>        &lt;/form&gt;<br><br>        &lt;!--Decrypt Form--&gt;<br>        &lt;form method=&quot;post&quot; action=&quot;action.php&quot;&gt;<br>            &lt;label for=&quot;encryptedText&quot;&gt;Enter text to decrypt:&lt;/label&gt;<br>            &lt;br&gt;<br>            &lt;textarea name=&quot;encryptedText&quot; id=&quot;encryptedText&quot; rows=&quot;4&quot; cols=&quot;40&quot;&gt;&lt;/textarea&gt;<br>            &lt;br&gt;<br>            &lt;br&gt;<br>            &lt;label for=&quot;decryptionKey&quot;&gt;Enter the decryption key:&lt;/label&gt;<br>            &lt;br&gt;<br>            &lt;input type=&quot;password&quot; name=&quot;decryptionKey&quot; id=&quot;decryptionKey&quot;&gt;<br>            &lt;br&gt;<br>            &lt;br&gt;<br>            &lt;input type=&quot;submit&quot; name=&quot;decrypt&quot; value=&quot;Decrypt&quot;&gt;<br>        &lt;/form&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><p><strong>Encryption Function: </strong>The encryptText function takes plaintext and an encryption key as inputs. It generates a random initialization vector (IV) using the openssl_random_pseudo_bytes function. The plaintext is then encrypted using the AES-256-CBC algorithm and the provided key. The IV is prepended to the encrypted text, and the combined data is base64-encoded to ensure safe transmission.</p><pre>function encryptText($text, $key) {<br>        $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(&#39;aes-256-cbc&#39;));<br>        $encrypted = openssl_encrypt($text, &#39;aes-256-cbc&#39;, $key, 0, $iv);<br>        return base64_encode($iv . $encrypted);<br>    }</pre><p><strong>Decryption Function:</strong> The decryptText function takes encrypted text and a decryption key as inputs. It decodes the base64-encoded input and separates the IV from the encrypted data. Using the IV and decryption key, it then decrypts the encrypted data back to the original plaintext.</p><pre>function decryptText($encryptedText, $key) {<br>        $data = base64_decode($encryptedText);<br>        $ivSize = openssl_cipher_iv_length(&#39;aes-256-cbc&#39;);<br>        $iv = substr($data, 0, $ivSize);<br>        $encrypted = substr($data, $ivSize);<br>        return openssl_decrypt($encrypted, &#39;aes-256-cbc&#39;, $key, 0, $iv);<br>    }</pre><p><strong>Form Processing:</strong> The PHP code checks the request method (POST) to determine whether the user submitted the form. If the “Encrypt” button is clicked, the plaintext and encryption key are used to encrypt the text, and the result is displayed. If the “Decrypt” button is clicked, the encrypted text and decryption key are used to decrypt the text, and the result is displayed.</p><pre>if ($_SERVER[&#39;REQUEST_METHOD&#39;] == &#39;POST&#39;) {<br>        if (isset($_POST[&#39;encrypt&#39;])) {<br>            $plaintext = $_POST[&#39;plaintext&#39;];<br>            $encryptionKey = $_POST[&#39;encryptionkey&#39;];<br>            $encryptedText = encryptText($plaintext, $encryptionKey);<br>            echo &quot;&lt;h3&gt;Encrypted Text:&lt;/h3&gt;&quot;;<br>            echo &quot;&lt;p&gt;$encryptedText&lt;/p&gt;&quot;;<br>        } else if (isset($_POST[&#39;decrypt&#39;])) {<br>            $encryptedText = $_POST[&#39;encryptedText&#39;];<br>            $decryptionKey = $_POST[&#39;decryptionKey&#39;];<br>            $decryptedText = decryptText($encryptedText, $decryptionKey);<br>            echo &quot;&lt;h3&gt;Decrypted Text:&lt;/h3&gt;&quot;;<br>            echo &quot;&lt;p&gt;$decryptedText&lt;/p&gt;&quot;;<br>        }<br>    }</pre><h3>Full PHP Code:</h3><pre>&lt;?php<br>    function encryptText($text, $key) {<br>        $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(&#39;aes-256-cbc&#39;));<br>        $encrypted = openssl_encrypt($text, &#39;aes-256-cbc&#39;, $key, 0, $iv);<br>        return base64_encode($iv . $encrypted);<br>    }<br><br>    function decryptText($encryptedText, $key) {<br>        $data = base64_decode($encryptedText);<br>        $ivSize = openssl_cipher_iv_length(&#39;aes-256-cbc&#39;);<br>        $iv = substr($data, 0, $ivSize);<br>        $encrypted = substr($data, $ivSize);<br>        return openssl_decrypt($encrypted, &#39;aes-256-cbc&#39;, $key, 0, $iv);<br>    }<br><br>    if ($_SERVER[&#39;REQUEST_METHOD&#39;] == &#39;POST&#39;) {<br>        if (isset($_POST[&#39;encrypt&#39;])) {<br>            $plaintext = $_POST[&#39;plaintext&#39;];<br>            $encryptionKey = $_POST[&#39;encryptionkey&#39;];<br>            $encryptedText = encryptText($plaintext, $encryptionKey);<br>            echo &quot;&lt;h3&gt;Encrypted Text:&lt;/h3&gt;&quot;;<br>            echo &quot;&lt;p&gt;$encryptedText&lt;/p&gt;&quot;;<br>        } else if (isset($_POST[&#39;decrypt&#39;])) {<br>            $encryptedText = $_POST[&#39;encryptedText&#39;];<br>            $decryptionKey = $_POST[&#39;decryptionKey&#39;];<br>            $decryptedText = decryptText($encryptedText, $decryptionKey);<br>            echo &quot;&lt;h3&gt;Decrypted Text:&lt;/h3&gt;&quot;;<br>            echo &quot;&lt;p&gt;$decryptedText&lt;/p&gt;&quot;;<br>        }<br>    }<br>?&gt;</pre><h3>Security Considerations:</h3><p>While this example provides a basic understanding of text encryption and decryption using PHP, it’s important to note that security is a complex topic. Some considerations include:</p><ol><li>Key Management: Safeguard your encryption and decryption keys. In a real-world scenario, using user-provided keys might not be the most secure approach.</li><li>Randomness: Use proper random number generators to generate IVs and keys to prevent predictable patterns.</li><li>Authentication: Encryption alone does not ensure the authenticity of the sender or the integrity of the data. Consider combining encryption with digital signatures.</li><li>Algorithm and Mode: Choose appropriate encryption algorithms and modes based on security requirements.</li><li>Secure Communication: Ensure that encrypted data is transmitted over secure channels (e.g., HTTPS).</li></ol><h3><strong>Conclusion:</strong></h3><p>Implementing text encryption and decryption using PHP can provide an extra layer of security for sensitive information. While this example provides a basic introduction, real-world security practices involve more complexity and considerations. Always stay updated with the latest security practices and technologies to ensure the protection of your data in an increasingly interconnected digital world.</p><p>You can get the working full source code from GitHub from here: <a href="https://github.com/Everyday-Programmer/Encryption-Decryption-PHP">https://github.com/Everyday-Programmer/Encryption-Decryption-PHP</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqTczJaclYfw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqTczJaclYfw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqTczJaclYfw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/41ae172916acfb0d393c99aacfbcdd0b/href">https://medium.com/media/41ae172916acfb0d393c99aacfbcdd0b/href</a></iframe><p>Make sure to subscribe, so that you won’t miss any contents.</p><p>Happy Coding :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddc85c116aa2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uploading files to Firebase Storage in Android Studio using Java]]></title>
            <link>https://medium.com/@everydayprogrammer/uploading-files-to-firebase-storage-in-android-studio-using-java-63f43b4c8d72?source=rss-22e7184f2e9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/63f43b4c8d72</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Everyday Programmer]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 16:18:36 GMT</pubDate>
            <atom:updated>2023-08-09T15:08:04.507Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Si-fi tech related image containing text “Upload Files to Firebase Cloud from Android”." src="https://cdn-images-1.medium.com/max/1024/1*C60mc34dcFxKGVQz4BfpvA.png" /><figcaption>Upload files to Firebase Cloud Storage from Android</figcaption></figure><p>Are you a budding Android developer looking to enhance your app with file uploading capabilities? Firebase Storage is your go-to solution. In this tutorial, I’ll walk you through the process of uploading images to Firebase Storage using Java in Android Studio.</p><h3>About Firebase Cloud Storage:</h3><p>Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale. The Firebase SDKs for Cloud Storage add Google security to file uploads and downloads for your Firebase apps, regardless of network quality. Cloud Storage for Firebase is built for app developers who need to store and serve user-generated content, such as photos or videos.</p><h3><strong>Prerequisites:</strong></h3><ol><li>Android Studio installed.</li><li>A Firebase project created and connected to your Android app.</li></ol><h3>Step 1: Setting Up Firebase Project</h3><ul><li>Go to the <a href="https://console.firebase.google.com/">Firebase Console</a> and create a new project if you haven’t already.</li><li>Follow the instructions to add your Android app to the project. Download the google-services.json file and place it in your app module.</li><li>And don’t forget to modify the rules of Cloud storage. For example in the below code the Cloud storage rules is modified to allow read and write from any request. You can change it in a way to accept read and write only from authenticated users and so on.</li></ul><pre>rules_version = &#39;2&#39;;<br>service firebase.storage {<br>  match /b/{bucket}/o {<br>    match /{allPaths=**} {<br>      allow read, write;<br>    }<br>  }<br>}</pre><h3>Step 2: Adding Firebase Storage Dependency</h3><p>In your app-level build.gradle file, add the Firebase Storage dependency:</p><pre>dependencies {<br>    implementation &#39;com.google.firebase:firebase-storage:20.0.0&#39;<br>}</pre><h3>Step 3: Java Code Implementation</h3><p>First initialize Firebase in your app’s onCreate method, with the following code:</p><pre>FirebaseApp.initializeApp(this);</pre><p>After that implement a method to select a file and get the uri of the selected file you can do it by using default Android’s Activity Result Launcher or by using third party libraries.</p><h3>Upload file to cloud:</h3><p>After getting the selected file’s uri use the below method to upload the file to cloud storage.</p><pre>// Get a reference to the Firebase Storage instance.<br>FirebaseStorage storage = FirebaseStorage.getInstance();<br>StorageReference storageRef = storage.getReference();<br><br>// Choose a name for your file. Replace the extension to the type of file you&#39;re uploading.<br>String imageName = &quot;image.jpg&quot;;<br><br>// Get a reference to the location where you want to save the image.<br>// This is somewhat similar to how our files are saved in our PC.<br>// The &quot;images&quot; represents the folder name, you can specify it however you want.<br>StorageReference imageRef = storageRef.child(&quot;images/&quot; + imageName);<br><br>// Get the file&#39;s Uri.<br>Uri imageUri = Uri.fromFile(new File(&quot;replace this with selected file&#39;s path&quot;));<br><br>// Upload the image.<br>UploadTask uploadTask = imageRef.putFile(imageUri);<br><br>// Monitor the upload progress.<br>uploadTask.addOnProgressListener(taskSnapshot -&gt; {<br>    double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();<br>    // This listener will provide the upload status of the file.<br>    // You can add a progress bar in you app and set max of the progress bar to taskSnapshot.getTotalByteCount().<br>    // And process of the progress bar to taskSnapshot.getBytesTransferred().<br>}).addOnSuccessListener(taskSnapshot -&gt; {<br>    // This listener is triggered when the file is uploaded successfully.<br>    // Using the below code you can get the download url of the file<br>    imageRef.getDownloadUrl().addOnSuccessListener(uri -&gt; {<br>        String imageUrl = uri.toString();<br>        // Do something with the file URL, like saving it to a database or displaying it from cloud.<br>    });<br>}).addOnFailureListener(exception -&gt; {<br>    // This listener is triggered if there was an exception occured while uploading the file.<br>    // You can display a error message from here if exception occurs.<br>});</pre><h3>Conclusion:</h3><p>Firebase Storage makes image uploading a breeze in Android apps. With just a few lines of code, you can enable users to upload and access images seamlessly. Explore further to enhance your app’s functionality, like implementing image resizing, handling permissions, and displaying uploaded images.</p><p>Happy coding and enjoy integrating Firebase Storage into your Android projects! 🚀</p><p>You can get the working full android studio source code to upload images to Firebase Cloud Storage from GitHub from here: <a href="https://github.com/Everyday-Programmer/Upload-Image-to-Firebase-Android">https://github.com/Everyday-Programmer/Upload-Image-to-Firebase-Android</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_mo0vPfOaAQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_mo0vPfOaAQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_mo0vPfOaAQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/de7763a648af8c22f0e7350ba3b5949c/href">https://medium.com/media/de7763a648af8c22f0e7350ba3b5949c/href</a></iframe><p>You can also find the full tutorial on YouTube on the following link: <a href="https://youtu.be/_mo0vPfOaAQ">https://youtu.be/_mo0vPfOaAQ</a></p><p>Make sure to subscribe, so that you won’t miss any contents.</p><p>Happy Coding :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63f43b4c8d72" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>