<?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 Emandi Raviteja on Medium]]></title>
        <description><![CDATA[Stories by Emandi Raviteja on Medium]]></description>
        <link>https://medium.com/@ravitejae?source=rss-3f421f12b4cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QGAqlHHTVqkcvvqw-SBpvQ.jpeg</url>
            <title>Stories by Emandi Raviteja on Medium</title>
            <link>https://medium.com/@ravitejae?source=rss-3f421f12b4cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:04:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ravitejae/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[Complete guide to developing an Android app in 2025]]></title>
            <link>https://medium.com/@ravitejae/complete-guide-to-developing-an-android-app-in-2025-8e400e0e5850?source=rss-3f421f12b4cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e400e0e5850</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[2025]]></category>
            <dc:creator><![CDATA[Emandi Raviteja]]></dc:creator>
            <pubDate>Fri, 13 Dec 2024 07:38:06 GMT</pubDate>
            <atom:updated>2024-12-13T07:38:06.800Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iYykof_XdQ9FYe9V" /><figcaption>Photo by <a href="https://unsplash.com/@the_average_tech_guy?utm_source=medium&amp;utm_medium=referral">The Average Tech Guy</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Creating an Android app in 2025 follows a similar process as previous years but incorporates the latest technologies, design trends, and tools that have evolved to offer better user experiences and faster development cycles. Here’s a complete guide to developing an Android app in 2025, from initial planning to post-launch maintenance.</p><h3>1. Idea &amp; Market Research</h3><h3>1.1 Define the App’s Purpose</h3><ul><li><strong>Solve a Problem:</strong> Identify a clear problem your app will solve or a need it will address.</li><li><strong>Target Audience:</strong> Define who will use the app. Know their demographics, needs, and pain points.</li><li><strong>Core Features:</strong> List out the features that your app will have, prioritizing the essential ones to meet the needs of your users.</li></ul><h3>1.2 Market Research</h3><ul><li><strong>Competitor Analysis:</strong> Study existing apps that serve a similar purpose. Evaluate their strengths, weaknesses, and user feedback to identify opportunities for your app.</li><li><strong>Trends &amp; Innovations:</strong> Research emerging trends such as AI, augmented reality (AR), machine learning (ML), or new app architectures that could enhance your app.</li><li><strong>Monetization Strategy:</strong> Decide how the app will make money (ads, subscription, in-app purchases, etc.).</li></ul><h3>2. Planning &amp; Design</h3><h3>2.1 Wireframing &amp; Prototyping</h3><ul><li><strong>Wireframes:</strong> Use wireframing tools (e.g., Figma, Adobe XD, Sketch) to create a basic layout of the app’s user interface (UI). This includes navigation, screens, and interactions.</li><li><strong>Prototypes:</strong> Develop interactive prototypes to visualize how users will interact with your app. Tools like Figma, InVision, or Marvel can be helpful.</li></ul><h3>2.2 User Experience (UX) &amp; User Interface (UI) Design</h3><ul><li><strong>UX Design:</strong> Focus on the user journey and ensure your app is intuitive and easy to use. UX design emphasizes how users will feel while using the app and solving their problems.</li><li><strong>UI Design:</strong> Create aesthetically appealing designs by selecting color schemes, fonts, buttons, and images. Tools like Figma, Sketch, and Adobe XD can help design modern UIs.</li><li><strong>Material Design:</strong> Android apps should follow Google’s Material Design principles, ensuring consistency and a pleasant user experience across devices.</li></ul><h3>3. App Development</h3><h3>3.1 Set Up the Development Environment</h3><ul><li><strong>Install Android Studio:</strong> This is the official Integrated Development Environment (IDE) for Android development, supporting Kotlin and Java.</li><li><strong>SDK Tools:</strong> Install the necessary Android Software Development Kit (SDK) and dependencies.</li><li><strong>Emulators:</strong> Use Android emulators to test your app on different devices, screen sizes, and Android versions.</li><li><strong>Version Control:</strong> Use Git for version control, allowing for easier collaboration and code management.</li></ul><h3>3.2 Choose Programming Language</h3><ul><li><strong>Kotlin (Recommended):</strong> Kotlin is now the preferred language for Android development due to its concise syntax, safety features, and modern functionality.</li><li><strong>Java:</strong> While Kotlin is recommended, Java is still widely used, especially in legacy projects.</li></ul><h3>3.3 App Architecture</h3><ul><li><strong>MVVM (Model-View-ViewModel):</strong> This is the recommended architectural pattern for Android apps, allowing for better separation of concerns and more manageable code.</li><li><strong>Clean Architecture:</strong> For more complex apps, this architecture ensures scalability, maintainability, and testability.</li><li><strong>Jetpack Libraries:</strong> Use Android Jetpack components like Room (for databases), LiveData, ViewModel, and WorkManager to streamline development.</li></ul><h3>3.4 Backend Development</h3><ul><li><strong>Cloud Databases:</strong> If your app requires cloud storage, Firebase and Google Cloud are popular backend solutions for Android apps.</li><li><strong>APIs:</strong> If your app interacts with third-party services (e.g., payment systems, social media), develop or integrate RESTful APIs.</li><li><strong>Authentication:</strong> Use Firebase Authentication, OAuth 2.0, or other secure methods for user authentication.</li></ul><h3>3.5 Implement Key Features</h3><ul><li><strong>Offline Support:</strong> Ensure that your app functions offline or with limited connectivity, leveraging local databases like SQLite or Room.</li><li><strong>Push Notifications:</strong> Implement push notifications using Firebase Cloud Messaging (FCM) for engaging users.</li><li><strong>Payment Integration:</strong> Integrate payment gateways like Stripe or Google Pay for in-app purchases.</li><li><strong>Permissions:</strong> Request necessary permissions (location, camera, storage, etc.) while maintaining user privacy.</li></ul><h3>4. Testing &amp; Debugging</h3><h3>4.1 Unit Testing &amp; UI Testing</h3><ul><li><strong>Unit Tests:</strong> Write unit tests for individual functions or components using JUnit or Kotlin Test.</li><li><strong>UI Tests:</strong> Use tools like Espresso or UI Automator for testing UI elements and ensuring the app functions properly on various screen sizes.</li><li><strong>Automated Testing:</strong> Set up continuous integration (CI) tools like GitHub Actions or CircleCI to automate builds and tests.</li></ul><h3>4.2 Debugging</h3><ul><li><strong>Android Debugging:</strong> Use Android Studio’s built-in debugging tools, including the Logcat viewer to track app logs and breakpoints.</li><li><strong>Crash Reporting:</strong> Integrate Firebase Crashlytics or other crash reporting tools to monitor and fix bugs after launch.</li><li><strong>Performance Testing:</strong> Ensure the app performs well across devices by checking CPU usage, memory leaks, and battery consumption.</li></ul><h3>5. Deployment</h3><h3>5.1 Prepare for Release</h3><ul><li><strong>Optimize Your Code:</strong> Minify and obfuscate your app code using ProGuard or R8 to make it smaller and more secure.</li><li><strong>Versioning:</strong> Increase the version number and name in your app’s build.gradle file.</li><li><strong>Create Signed APK or App Bundle:</strong> Generate a signed APK or Android App Bundle (.aab) to be submitted to the Google Play Store.</li></ul><h3>5.2 Google Play Store Submission</h3><ul><li><strong>Create Developer Account:</strong> Set up a Google Play Developer account ($25 one-time fee).</li><li><strong>App Store Listing:</strong> Create a compelling app description, select the appropriate category, and upload app assets such as screenshots, an app icon, and a promotional video.</li><li><strong>Compliance:</strong> Ensure that your app complies with Google Play’s content policies, including privacy policies and terms of service.</li></ul><h3>5.3 Beta Testing</h3><ul><li><strong>Beta Testing:</strong> Use Google Play’s internal test or closed test features to gather feedback from real users before the full launch.</li><li><strong>TestFlight Alternative:</strong> You can also use third-party services like TestFairy or Firebase App Distribution to distribute beta versions of your app.</li></ul><h3>6. Post-Launch Activities</h3><h3>6.1 Monitor &amp; Analytics</h3><ul><li><strong>User Analytics:</strong> Integrate Firebase Analytics, Google Analytics, or other tools to track user engagement, screen views, and in-app actions.</li><li><strong>Crash Reporting:</strong> Continuously monitor app crashes with Firebase Crashlytics or similar tools.</li><li><strong>App Performance:</strong> Monitor app performance in real-time to fix any emerging issues quickly.</li></ul><h3>6.2 Regular Updates</h3><ul><li><strong>Bug Fixes &amp; Improvements:</strong> Respond to user feedback and release timely bug fixes and updates.</li><li><strong>New Features:</strong> Roll out new features or improve existing ones based on user demands and market trends.</li><li><strong>Stay Compatible:</strong> Keep the app up-to-date with the latest Android OS versions, ensuring compatibility with new devices and features.</li></ul><h3>6.3 User Feedback &amp; App Reviews</h3><ul><li><strong>Engage with Users:</strong> Actively engage with users on Google Play reviews, social media, and email to resolve issues or offer support.</li><li><strong>Optimize ASO (App Store Optimization):</strong> Optimize your app listing to improve visibility and downloads, using relevant keywords and high-quality screenshots.</li></ul><h3>7. Maintenance</h3><h3>7.1 Monitor for Issues</h3><ul><li>Regularly check for crashes, bugs, and other performance issues.</li><li>Update the app periodically to fix vulnerabilities and ensure security.</li></ul><h3>7.2 Adapt to Changes</h3><ul><li><strong>Android OS Updates:</strong> Ensure your app is compatible with newer Android OS versions.</li><li><strong>New Features in Android:</strong> As Android continues to evolve, integrate new features, such as support for foldable devices, 5G, and new sensors.</li></ul><h3>Conclusion</h3><p>In 2025, Android app development remains a dynamic and evolving process, driven by user-centered design, rapid prototyping, and modern technologies like machine learning, AR/VR, and cloud computing. By following a structured approach — starting from idea conceptualization to post-launch maintenance — you can ensure the successful development of an Android app that meets user needs, stands out in the market, and is scalable for future updates.</p><p>Stay updated on trends, use the best tools available, and iterate based on user feedback to ensure your app’s long-term success.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Thank you for reading. 🙌🙏✌.</p><p>Don’t forget to clap 👏 and follow me for more such useful articles about Android Development.</p><p>If you need any help related to Android, Kotlin. I’m always happy to help you.</p><blockquote><a href="https://medium.com/u/3f421f12b4cd">Tejalu Teju</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e400e0e5850" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Mobile App Development Lifecycle]]></title>
            <link>https://medium.com/@ravitejae/android-mobile-app-development-lifecycle-2faee24c5183?source=rss-3f421f12b4cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/2faee24c5183</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-lifecycle]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Emandi Raviteja]]></dc:creator>
            <pubDate>Fri, 13 Dec 2024 05:42:28 GMT</pubDate>
            <atom:updated>2024-12-13T06:05:55.900Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mx17w8yXS43Frfb_" /><figcaption>Photo by <a href="https://unsplash.com/@kommumikation?utm_source=medium&amp;utm_medium=referral">Mika Baumeister</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The Android mobile app development lifecycle refers to the various stages involved in creating and maintaining an Android application. These stages typically cover the entire process, from the initial planning and design of the app to its deployment and post-launch maintenance. Here’s a breakdown of the Android app development lifecycle:</p><h3>Summary of Android App Development Lifecycle:</h3><ol><li><strong>Idea and Conceptualization</strong></li><li><strong>Planning and Designing (UX/UI Design)</strong></li><li><strong>App Development (Frontend &amp; Backend)</strong></li><li><strong>Testing and Debugging</strong></li><li><strong>Deployment (Publishing to Google Play)</strong></li><li><strong>Post-Launch Activities (Monitoring, Fixing Bugs, Collecting Feedback)</strong></li><li><strong>Maintenance and Upgrades</strong></li></ol><p>Each stage is critical for ensuring that the final product is polished, functional, and meets users’ expectations. Successful Android app development requires attention to detail at every phase and consistent monitoring and improvement after launch.</p><h3>1. Idea and Conceptualization</h3><ul><li><strong>Define the Problem:</strong> The first step is identifying the problem you want to solve with the app. This stage involves gathering requirements, identifying target audiences, and understanding user needs.</li><li><strong>Market Research:</strong> Analyze similar apps and competitors in the market to find a unique selling point (USP) for your app.</li><li><strong>Feature Set:</strong> List the core features of your app. This is where you begin defining what your app will do and its functionalities.</li></ul><h3>2. Planning and Designing</h3><ul><li><strong>Wire framing:</strong> Create a blueprint for your app, including its navigation, layout, and user interface (UI). Tools like Figma or Adobe XD are often used to create wire frames.</li><li><strong>User Experience (UX) Design:</strong> Focus on how the app will function, ensuring it’s intuitive and user-friendly. This is about the overall interaction with the app.</li><li><strong>User Interface (UI) Design:</strong> Design the visual aspects of the app, including buttons, colors, and layout. The UI should be aesthetically pleasing while being functional.</li><li><strong>Technical Planning:</strong> Decide on the tools, technologies, and frameworks you will use. This includes choosing the Android version(s) to support, third-party libraries, and APIs.</li></ul><h3>3. App Development</h3><ul><li><strong>Set Up Development Environment:</strong> Install and configure Android Studio (or another IDE) for development. You will also need the Android SDK, along with Java or Kotlin, the two main programming languages for Android development.</li><li><strong>Backend Development:</strong> If the app requires a server (e.g., for storing data), you need to develop the backend, which could involve APIs, databases, and cloud services.</li><li><strong>Frontend Development:</strong> Write the code for the app’s UI, features, and functionality, such as buttons, lists, navigation, and interactions.</li><li><strong>Database Integration:</strong> If your app uses local or remote storage, integrate the database (SQLite for local or Firebase for cloud storage).</li><li><strong>Integration of APIs:</strong> If your app depends on third-party services (e.g., payment gateways, social media integration), you need to integrate the necessary APIs.</li></ul><h3>4. Testing and Debugging</h3><ul><li><strong>Unit Testing:</strong> Test individual components or functions of your app to ensure they work as expected.</li><li><strong>Integration Testing:</strong> Test the entire app together to ensure all parts are functioning correctly and interacting properly.</li><li><strong>UI Testing:</strong> Verify that the app’s user interface is responsive, functional, and user-friendly.</li><li><strong>Bug Fixing:</strong> Identify and fix bugs or issues that are discovered during testing.</li><li><strong>Performance Testing:</strong> Ensure that your app performs well under load and doesn’t consume too much battery or memory.</li></ul><h3>5. Deployment</h3><ul><li><strong>Prepare for Release:</strong> Create a signed APK (Android Package) or App Bundle that can be distributed. This involves minifying your code and optimizing it for performance.</li><li><strong>Publish on Google Play:</strong> Submit your app to the Google Play Store. You’ll need to create a developer account, provide app details (like screenshots, descriptions, and categorization), and upload the APK/App Bundle.</li><li><strong>App Store Optimization (ASO):</strong> Optimize your app listing on Google Play to increase visibility and downloads. This includes selecting relevant keywords, writing a compelling description, and using attractive visuals.</li></ul><h3>6. Post-Launch Activities</h3><ul><li><strong>Monitor Performance:</strong> Track app performance using analytics tools (e.g., Google Analytics, Firebase). Monitor user engagement, crashes, and issues.</li><li><strong>Fix Bugs:</strong> After launch, you may need to address bugs or unexpected issues. Promptly releasing bug fixes is crucial.</li><li><strong>User Feedback:</strong> Collect and analyze user feedback, either through app reviews or direct feedback, to improve the app.</li><li><strong>Update and Improve:</strong> Periodically release updates to introduce new features, fix issues, or improve the app’s performance.</li></ul><h3>7. Maintenance and Upgrades</h3><ul><li><strong>Bug Fixes:</strong> Regularly fix any issues that arise, ensuring that your app runs smoothly on the latest Android versions.</li><li><strong>App Updates:</strong> Add new features and functionality based on user feedback and market demands.</li><li><strong>Adapt to OS Changes:</strong> Android frequently releases new OS versions, and it’s essential to keep your app compatible with these updates.</li><li><strong>Versioning:</strong> Continuously improve the app’s version, keeping track of changes and improvements.</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Thank you for reading. 🙌🙏✌.</p><p>Don’t forget to clap 👏 and follow me for more such useful articles about Android Development.</p><p>If you need any help related to Android, Kotlin. I’m always happy to help you.</p><blockquote><a href="https://medium.com/u/3f421f12b4cd?source=post_page---user_mention--fb8e94254297--------------------------------"><em>Tejalu Teju</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2faee24c5183" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reason behind the Android App’s lag or slow performance speed]]></title>
            <link>https://medium.com/@ravitejae/reason-behind-the-android-apps-lag-or-slow-performance-speed-fb8e94254297?source=rss-3f421f12b4cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb8e94254297</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Emandi Raviteja]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 06:26:52 GMT</pubDate>
            <atom:updated>2024-12-13T05:25:14.329Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*98_G1ZwaHh-iBNZm" /><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><p>The main reason for the Android App’s lag or for the low performance of the Android app is that it runs GC (Garbage Collector) very frequently.</p><p>The time for which GC is running the actual app is not running.</p><p>Normally the Android app updates its UI every 16ms (considering 60FPS -&gt; 1000ms/60 = 16.67ms ~ 16ms) for smooth UI rendering.</p><p>So, if the GC runs for more time, the app will be unable to update UI and it will skip a few frames, so it will seem that the app is lagging. That is one of the reasons for the app lag.</p><p><strong>Here will discuss most important reasons because of why the Android Apps lag which are as follow</strong></p><ul><li>Too much work on main thread</li><li>Bad UI/UX design</li><li>Bottleneck effect</li><li>Too much linear processing</li><li>Bad data model</li></ul><h4>Too much work on main thread:</h4><p>Multi-threaded does not necessarily make it faster. Your apps won’t benefit from a multi-threaded model and multiple CPU/cores if they are battling blocking, waiting, and waiting. Examine your threading model and eliminate conflicts. Insufficient contention can affect your app’s performance when the load grows. The addition of more CPUs will not improve performance.</p><h4><strong>Bad UI/UX design:</strong></h4><p>Yes, your app will be slow because it takes a long time to figure out what you must do if the user interface needs to be designed better. What is the time it takes to work out the details? This is a factor in your application’s performance and ultimately impacts the quality of service. Focus on UI design and user experience, which will help make your application quicker.</p><h4><strong>Bottleneck effect:</strong></h4><p>If you built an application very well, it will run as slowly as the slowest link. This is because the network, DB, and application servers need to be quick to ensure maximum performance. The most common examples of sinks and hubs are brokers, web servers, databases, routers, and middleware. Reduce hub/spoke dependency, utilize redundant replicated infrastructure, and reduce bottlenecks by eliminating one point of failure.</p><h4><strong>Too much linear processing:</strong></h4><p>Sometimes, your application requires lots of processing, which requires a large amount of computation with a large volume of data. It is time-consuming. Improve your data model to reflect how it is used, not just how well the information is stored. As a result, it is necessary to compromise some aspects to achieve more speedy processing.</p><h4>Bad data model:</h4><p>Does your app use data? Does your app load heavily on read or write things? Your app’s performance is affected if your data model fails to optimize for the most common scenarios. If you run a read-intensive application and you store your data in SQL. A flawed data model or wrong choices for indexing can prevent your application from failing. Look closely at the usage scenarios and examples and see how your data model supports them.</p><p>In order to fix this lag issue, we need to focus on the following:</p><ul><li>Reduce GC running time</li><li>Do not do too much on the main thread</li></ul><p><strong>Improve the performance by using some of steps below:</strong></p><ul><li>Keep heavy work away from the main thread. Transfer it to the background thread.</li><li>Use LRU cache for the bitmap to avoid redundant decoding of bitmap, it reduces GC calling again and again.</li><li>Use static inner classes over non-static.</li><li>Don’t leak contexts in inner classes.</li></ul><p>That’s it for now.</p><p>Thank you for reading. 🙌🙏✌.</p><p>Don’t forget to clap 👏 and follow me for more such useful articles about Android Development, Kotlin.</p><p>If you need any help related to Android, Kotlin. I’m always happy to help you.</p><blockquote><a href="https://medium.com/u/3f421f12b4cd">Tejalu Teju</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb8e94254297" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Facebook login from android application]]></title>
            <link>https://medium.com/@ravitejae/facebook-login-from-android-application-5d569c5167fc?source=rss-3f421f12b4cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d569c5167fc</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[facebook-login]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[login-through-facebook]]></category>
            <category><![CDATA[facebook-sdk]]></category>
            <dc:creator><![CDATA[Emandi Raviteja]]></dc:creator>
            <pubDate>Wed, 19 Apr 2017 14:08:56 GMT</pubDate>
            <atom:updated>2024-12-13T05:25:41.439Z</atom:updated>
            <content:encoded><![CDATA[<p>Facebook login provides a convenient way for people to log into app without having to go through a signup process.</p><p>Using the latest version of Facebook SDK’s of android, it takes only a few minutes to add this feature to your android app.</p><p>In this blog, you will learn how to add a Facebook login into your android app and handle the event to log a user in using Facebook login.</p><h3>1. Register your app:</h3><p>All apps that use the Facebook SDK’s must be registered with Facebook Account.</p><ul><li>First login into Facebook Developer Page <a href="https://developers.facebook.com/">https://developers.facebook.com/</a></li></ul><p>- Click on login and Click a create a new app in the top right.</p><p>- You will get a form that asks for the App’s Display name, Contact email and Category.</p><ul><li>Enter the required fields and click the “<strong>Create App ID</strong>”. See below:</li><li>In the next screen, you are able to see your<strong> Application ID</strong>. Make a note of it.</li><li>Because you will be need it later in your Facebook project.</li><li>Next, Click on Settings (Left side on top): Settings — -&gt; Basic</li><li>Click on <strong>Add Platform, </strong>select <strong>Android.</strong></li><li>Now Enter the Google Play Package Name of your app and the name of your Activity name.</li><li><strong>Key Hashes:</strong> After that to fill the key hash filed, open a command prompt window and run the <strong>key tool</strong> command to generate a <strong>key hash</strong> using the <strong>Debug key store</strong>.</li><li><strong>Debug Keystore:</strong></li></ul><pre>keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore |</pre><pre>openssl sha1 -binary | openssl base64</pre><pre>Then it asks for password</pre><pre>The default password for the debug key store is <strong>android.</strong></pre><pre>- The output of a command should be a 28 Characters string.Copy it.</pre><pre>- Go back to your browser, paste the string in to key hashes field.</pre><pre>- Make sure single sign on is set to yes and click the save changes button.</pre><pre>- Now, your app is registered with Facebook.</pre><h3>2. Add Facebook SDK into your Project.</h3><pre>The Facebook SDK&#39;s is available on <strong>Maven Central</strong>. To use this repository,</pre><pre>edit the build.gradle file in your project&#39;s app directory and add the following</pre><pre>code to it. Before the list of dependencies.</pre><h3>3. Here, its the Full code.</h3><pre><strong>activity_main.xml:</strong></pre><pre><strong>&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>android:layout_width=&quot;match_parent&quot;<br>android:layout_height=&quot;wrap_content&quot;&gt;<br><br>&lt;com.facebook.login.widget.LoginButton<br>                android:id=&quot;@+id/loginbutton&quot;<br>                android:layout_width=&quot;match_parent&quot;<br>                android:layout_height=&quot;wrap_content&quot;/&gt;<br><br>&lt;RelativeLayout</strong></pre><pre><strong>TodayApp.java:</strong></pre><pre><strong>public class Todayapp extends Application {<br><br>    @Override<br>    public void onCreate() {<br>        super.onCreate();<br>        FacebookSdk.sdkInitialize(getApplicationContext());<br>        AppEventsLogger.activateApp(this);<br>    }<br>}</strong></pre><pre><strong>MainActivity.java:</strong></pre><pre><strong>import android.app.ProgressDialog;<br>import android.content.Intent;<br>import android.support.v7.app.AppCompatActivity;<br>import android.os.Bundle;<br>import android.util.Log;<br>import android.widget.Toast;<br><br>import com.facebook.CallbackManager;<br>import com.facebook.FacebookCallback;<br>import com.facebook.FacebookException;<br>import com.facebook.GraphRequest;<br>import com.facebook.GraphResponse;<br>import com.facebook.login.LoginResult;<br>import com.facebook.login.widget.LoginButton;<br><br>import org.json.JSONException;<br>import org.json.JSONObject;<br><br>import java.sql.Array;<br>import java.util.Arrays;<br><br>public class MainActivity extends AppCompatActivity {<br><br>    private LoginButton loginButton;<br>    private CallbackManager callbackManager;<br>    private ProgressDialog progressDialog;<br><br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        setContentView(R.layout.activity_login);<br><br>        callbackManager = CallbackManager.Factory.create();<br><br>        loginButton = (LoginButton) findViewById(R.id.loginbutton);<br><br>        loginButton.setReadPermissions(Arrays.asList(&quot;email&quot;));<br><br>        loginButton.registerCallback(callbackManager, new FacebookCallback&lt;LoginResult&gt;() {<br><br>            @Override<br>            public void onSuccess(LoginResult loginResult) {<br><br>                System.out.println(&quot;onSuccess&quot;);<br>                progressDialog = new ProgressDialog(MainActivity.this);<br>                progressDialog.setMessage(&quot;Loading...&quot;);<br>                progressDialog.show();<br><br>                String accessToken = loginResult.getAccessToken().getToken();<br>                Log.i(&quot;accessToken&quot;, accessToken);<br><br>                GraphRequest request = GraphRequest.newMeRequest(loginResult.getAccessToken(),</strong></pre><pre><strong>new GraphRequest.GraphJSONObjectCallback() {<br><br>                    @Override<br>                    public void onCompleted(JSONObject object, GraphResponse response) {<br>                        Log.i(&quot;LoginActivity&quot;, response.toString());<br>                        // Get facebook data from login<br>                        Bundle bFacebookData = getFacebookData(object);<br>                    }<br>                });<br>                Bundle parameters = new Bundle();<br>                parameters.putString(&quot;fields&quot;, &quot;id, first_name, last_name, email,gender, birthday, location&quot;);<br>                request.setParameters(parameters);<br>                request.executeAsync();<br>            }<br><br>            @Override<br>            public void onCancel() {<br>                Toast.makeText(getApplicationContext(), &quot;login cancelled&quot;, Toast.LENGTH_SHORT).show();<br><br>            }<br><br>            @Override<br>            public void onError(FacebookException error) {<br>                Toast.makeText(getApplicationContext(), &quot;login Error&quot;, Toast.LENGTH_SHORT).show();<br>            }<br>        });<br><br>    }<br><br>    private Bundle getFacebookData(JSONObject object) {<br><br>        Bundle bundle = new Bundle();<br><br>        try {<br><br>            if (object.has(&quot;email&quot;))<br><br>                bundle.putString(&quot;email&quot;, object.getString(&quot;email&quot;));<br><br>            Log.e(&quot;email&quot;, object.getString(&quot;email&quot;));<br><br>            goMainScreen();<br><br>        } catch (JSONException e) {<br>            e.printStackTrace();<br>            progressDialog.cancel();<br>        }<br><br>        return bundle;<br>    }<br><br>    @Override<br>    protected void onActivityResult(int requestCode, int resultCode, Intent data) {<br>        super.onActivityResult(requestCode, resultCode, data);<br>        callbackManager.onActivityResult(requestCode, resultCode, data);<br>    }<br>}</strong></pre><pre><strong>Manifest.xml:</strong></pre><pre>Add internet permission</pre><pre><strong>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    package=&quot;your app package name&quot;&gt;<br><br>    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;<br><br>    &lt;application<br>        android:name=&quot;.Todayapp&quot;<br>        android:allowBackup=&quot;true&quot;<br>        android:icon=&quot;@mipmap/ic_launcher&quot;<br>        android:label=&quot;@string/app_name&quot;<br>        android:supportsRtl=&quot;true&quot;<br>        android:theme=&quot;@style/AppTheme&quot;&gt;<br><br>        &lt;meta-data<br>            android:name=&quot;com.facebook.sdk.ApplicationId&quot;<br>            android:value=&quot;@string/facebook_app_id&quot; /&gt;<br><br>        &lt;activity android:name=&quot;com.facebook.FacebookActivity&quot;<br>            android:configChanges=<br>                &quot;keyboard|keyboardHidden|screenLayout|screenSize|orientation&quot;<br>            android:label=&quot;@string/app_name&quot; /&gt;<br><br>        &lt;activity android:name=&quot;.MainActivity&quot;&gt;<br>            &lt;intent-filter&gt;<br>                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;<br><br>                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;<br>            &lt;/intent-filter&gt;<br>        &lt;/activity&gt;<br>    &lt;/application&gt;<br><br>&lt;/manifest&gt;</strong></pre><pre><strong>strings.xml:</strong></pre><pre><strong>&lt;string name=&quot;facebook_app_id&quot;&gt;Replace with your Facebook ApplicatioId&lt;/string&gt;</strong></pre><pre>* Now, build and run. Your app is ready. Enjoy.</pre><p>Thank you for reading. 🙌🙏✌.</p><p>Don’t forget to clap 👏 and follow me for more such useful articles about Android Development.</p><p>If you need any help related to Android, Kotlin. I’m always happy to help you.</p><blockquote><a href="https://medium.com/u/3f421f12b4cd">Tejalu Teju</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d569c5167fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>