Skip to main content

Posts

Privacy Policy for Gift Tracker

Last updated: July 02, 2025 This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You. We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the Privacy Policy Generator . Interpretation and Definitions Interpretation The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural. Definitions For the purposes of this Privacy Policy: Account means a unique account created for You to access our Service or parts of our Service. Affiliate means an entity that controls, is controlled by or is under co...

Exploring LayoutInflater#inflate method | Android | V4ALL

Good day!!! As a Android developer we all have experienced LayoutInflater#inflate at some point. But we maynot know clearly what this function will do. Come on, stay attention, Let's explore this in this blog with simple examples!!! Let's assume you have a layout named fragment_first.xml as following &lt?xml version="1.0" encoding="utf-8"?&gt &ltandroidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".FirstFragment"&gt &ltTextView android:id="@+id/textView" style="@style/TextAppearance.MaterialComponents.Headline4" android:layout_width="wrap_content" ...

Exploring Kotlin's LiveData | Part I | Android | V4ALL

Good day!!! As Per  Android Developer  documentation,  LiveData  is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services. This awareness ensures LiveData only updates app component observers that are in an active lifecycle state. Let's explore this statement with an simple example. Create our own observer which notifies if any changes available in an  username . Create a Basic Application in Android Studio using File → New → New Project and Choose Basic Activity template. [I used Android Studio 4.0] , and finish project setup. Create a kotlin file and name it as UserModel.kt and copy paste following codes, package com.example.basicapplication interface UserObserver { fun onUsernameChanged(username: String) } object UserHolder { private var username: String = "" private val userObservers...

Simple example of heads-up notification in Android

Beginning with Android 5.0, notifications can briefly appear in a floating window called a heads-up notification. This behavior is normally for important notifications that the user should know about immediately, and it appears only if the device is unlocked. The heads-up notification appears the moment your app issues the notification and it disappears after a moment, but remains visible in the notification drawer as usual. Example conditions that might trigger heads-up notifications include the following: The user's activity is in fullscreen mode (the app uses fullScreenIntent ). The notification has high priority and uses ringtones or vibrations on devices running Android 7.1 (API level 25) and lower. The notification channel has high importance on devices running Android 8.0 (API level 26) and higher. Here is the sample code private fun sendNotification() { var notifyManager: NotificationManager? = null val NOTIFY_ID = 1002 val name = "KotlinApp...

Simple example of DraggableTextView in Android | Kotlin

Hello All, By using simple onTouch event we make an DraggableTextView widget. Here is the code sample for you. override fun onTouch(v: View?, event: MotionEvent?): Boolean { val x = event?.rawX?.toInt()!! val y = event.rawY.toInt() when (event.action) { MotionEvent.ACTION_DOWN -> { val layoutParams = layoutParams as ConstraintLayout.LayoutParams xDelta = x - layoutParams.leftMargin yDelta = y - layoutParams.topMargin rect.set(0, 0, width, height) isDragging = true } MotionEvent.ACTION_MOVE -> { val layoutParams = layoutParams as ConstraintLayout.LayoutParams layoutParams.leftMargin = x - xDelta layoutParams.topMargin = y - yDelta setLayoutParams(layoutParams) } MotionEvent.ACTION_UP -> { isDragging = false } } invalidate() return true } Here is the full video tutorial. Interesting...

Using shuffle from Collections in Java | Android

From Doc shuffle is used to Randomly permutes the specified list using a default source of randomness. All permutations occur with approximately equal likelihood. Here is the simple example of shuffle from collections. List numbers = new ArrayList (); for (int i = 0; i Output: Original List: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Shuffled List: [2, 10, 0, 3, 7, 5, 1, 9, 8, 6, 4] There is also public static void shuffle(List list, Random rnd) which will Randomly permute the specified list using the specified source of randomness. Interesting right? If you are really interested in this example, then please share this post with your friends, also share your feedback as comment here. Thank You

Simple example of using Firebase Cloud Messaging in Android | Kotlin

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost. You can send notification messages to drive user re-engagement and retention. To write your Firebase Cloud Messaging Android client app, use the FirebaseMessaging API and Android Studio 1.4 or higher with Gradle. FCM clients require devices running Android 4.0 or higher that also have the Google Play Store app installed, or an emulator running Android 4.0 with Google APIs. Note that you are not limited to deploying your Android apps through Google Play Store. Set up Firebase and the FCM SDK * If you haven't already, add Firebase to your Android project . * In Android Studio, add the FCM dependency to your app-level build.gradle file: implementation 'com.google.firebase:firebase-messaging:17.1.0' Create a Service that extends FirebaseMessagingService. Here is the full code of FCMService.kt class FCMService : FirebaseMessagingService() { o...