In this article, I am going to integrate Paypal with Java Spring Boot application. Please note I am using PayPal Checkout with Smart Payment Button https://developer.paypal.com/docs/checkout/ which is the preferred method since February 2019. You have to generate client id and secret from the PayPal developer site as well. I am using Spring MVC. So […]
Put Constant Non-editable Text in EditText Android
Sometimes we have to put constant non-editable text in EditText in Android. For example, when we have to take phone number as input we can put fix country code as a prefix. In the case of website address as input, we can put “https://” as hardcoded string at the start. For this purpose, you can […]
Generating Pdf Table Using Java + IText
Here in this article, I am going to show you how we can create a pdf file with a table using java and iText. IText is a library to read and write pdf files. If you want to learn about iText visit https://itextpdf.com/en/get-started . See below image we are going to create a pdf file […]
Easiest Way to Implement Facebook Login in Android
As an Android developer, we have to add Facebook login in Apps in our routine life. Every time we have to copy-paste code in our Activity class. For that problem, I have written a Facebook Activity class, which you can just copy-paste in your App and extend your Activity class from this FacebookActivity instead of […]
Ultimate Guide to Realm Database Migration in Android
If you are using Realm Database in your Android App, you must have faced the migration issue while submitting new versions. If we don’t migrate Realm database properly, it causes crashes when users update the App. This article is a guide to Realm database migration in Android. Basic Realm Database Migration Steps Add the following […]
Spring Data JPA : Don’t need to write SQL queries.
If you are not aware of spring data JPA this article is for you. Even if you are aware still you can read complex cases that can help you. Note that Spring Data is a collection of many modules. You may find these here https://spring.io/projects/spring-data . Spring Data JPA is a part of Spring data. […]
Ultimate Guide to Observe Application Lifecycle Events in Android
Recently, Android has provided LifecycleObserver interface to observe Application lifecycle events easily. But I have seen on Stackoverflow that few developers are still struggling in using ‘LifecycleObserver‘ interface. This tutorial will help you to understand how to listen, Application Lifecycle Events. Using ‘LifecycleObserver‘ interface we can easily receive Application Lifecycle Events in Android. Following is […]
How to Resize a Bitmap by Keeping the Same Aspect Ratio – Android
In Android, we use Bitmap class to store images. This class contains many functions to apply different operations on images. But there is no builtin method to resize images by keeping the same aspect ratio. Here, I am sharing that utility function to resize a bitmap by keeping the same aspect ratio. Following is the […]
Utility Method to Replace Email Addresses with Asterisks(*) in a String – Java
Recently I came across a problem when I was needed to replace all email addresses in a String with asterisks(*). I have written a Utility Method to Replace Email Addresses with Asterisks in a String in Java. That functions are the following. This is how you can call this Utility method. In the above methods, […]
Utility Method to Get All Email Addresses From a String in Java
Recently I came across a problem when I was needed to get ArrayList of all Email Addresses from a String in java. I’ve decided to write this article to share it with other developers. In this function java.util.regex.Matcher and java.util.regex.Pattern classes are used. First, you need to know about the regular expression to match the […]