1. Install Google Core Gradle implementation ‘com.google.android.play:core:1.9.1’ 2. Create these method and call it where you want to show. public void showRateApp() { ReviewManager reviewManager; reviewManager = ReviewManagerFactory.create(this); Task<ReviewInfo> request = reviewManager.requestReviewFlow(); request.addOnCompleteListener(task -> { if (task.isSuccessful()) { ReviewInfo reviewInfo = task.getResult(); Task<Void> flow = reviewManager.launchReviewFlow(this, reviewInfo); flow.addOnCompleteListener(task1 -> { }); } else { showRateAppFallbackDialog();…
Android custom navigation menu icon
Generally the default navigation drawer code is DrawerLayout drawer = findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.addDrawerListener(toggle); toggle.syncState(); NavigationView navigationView…
Android schedule Notification – Fire Notification Every Day at the Specific time
1. Create a Method on your Activity and Call it on Oncreate 2. Create a BroadcastReceiver class package com.arifhasnat.booksapp.services;import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;public class MyReceiver extends…
RecylerView Scroll Event Listener
recyclerView.setOnScrollChangeListener(new View.OnScrollChangeListener() { @Override public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { if (scrollY > oldScrollY){ // scroll Down }else…
android check update version and show an update app message
First check App live version and then check current version. if not same update message will be thrown. This code should be pasted on onCreate…