home top ad

How to implements Rate me feature in android app

 Hi Guys,When you have a distributed application on the Google Play Store, it is significant that you get criticism from your clients. Your application won't be fruitful until your clients rate your application by any means..  This guide will go more than two unique techniques for executing a Rate Me include:

  • Physically joining a Rate Me expectation to a Button a Button
  • Consequently immediate the client to rate your application dependent on predefined condition

  • Importance of Rate me feature:- 

    •  It improves the rating of your application in play store.
    •  It helps you to improve your application (find bugs) by getting feedback.
    • It helps you to make decision on future updates of your application.

    Manual Rate Me Feature :

    This technique is easier to carry out and is less irritating to clients since it expects them to first, discover your Rate Me Button, and second, really click it and finish. All things considered, it is additionally more averse to get clients to really rate your application. Similarly as with any element that doesn't straightforwardly add to the client experience, you should gauge the adverse consequence of messing with the client to rate your application with the advantage that appraisals have on your application's prosperity.

    on the off chance that you need to carry out this technique, so you will require where you need to carries out this strategy . in the event that you carries out this technique in route cabinet , Main Menu or anyplace so adhere to this standard .

    • First Create a new Android project in Android Studio
    • File ⇒ New Android ⇒ Application Project
    • Then Open MainActivity.java and then add following code :
    MainActivity.java

     import android.content.Intent;   
      import android.net.Uri;   
      import android.os.Bundle;   
      import android.view.View;   
      import android.widget.Button;   
      import androidx.annotation.Nullable;   
      import androidx.appcompat.app.AppCompatActivity;   
      public class MainActivity extends AppCompatActivity {   
       private Button rate;   
       @Override   
       protected void onCreate(@Nullable Bundle savedInstanceState) {   
        super.onCreate(savedInstanceState);   
        setContentView(R.layout.activity_main);   
        rate=findViewById(R.id.Rate);   
        rate.setOnClickListener(new View.OnClickListener() {   
         @Override   
         public void onClick(View v) {   
          final String appName = getPackageName();   
          try {   
           startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appName)));   
          } catch (android.content.ActivityNotFoundException anfe) {   
           startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appName)));   
          }   
         }   
        });   
       }   
      }   
    The try/catch The try/catch block is fundamental in light of the fact that the client might not have the Play Store introduced, in which case we direct the client to a program variant of the Play Store. Regardless, notice that this code square can really be put anyplace in your application. It's smartest, be that as it may, to get along with the client and possibly dispatch this expectation when they most anticipate it (like when they click on a Rate Me Button)Button).

    Now Open resource folder -> layout -> again activity_main.xml and then add following code :

    activity_main.xml:

    <?xml version="1.0" encoding="utf-8"?>  
     <androidx.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=".MainActivity">  
       <Button  
         android:id="@+id/Rate"  
         android:layout_width="wrap_content"  
         android:layout_height="wrap_content"  
         android:text="Rate APP"  
         app:layout_constraintBottom_toBottomOf="parent"  
         app:layout_constraintEnd_toEndOf="parent"  
         app:layout_constraintStart_toStartOf="parent"  
         app:layout_constraintTop_toTopOf="parent" />  
     </androidx.constraintlayout.widget.ConstraintLayout> 

    Automatic Rate Me :

    For this method, we use of the open source library for Rate Me . So Add the gradle dependencies like this in your root build.gradle:

    build.gradle :
     allprojects {  
         repositories {  
           ...  
           maven { url "https://jitpack.io" }  
         }  
       }          
       
    Now add the dependency
     dependencies {  
       implementation 'com.github.msfjarvis:AppRate:1.3'  
     }  
    
    Then run a gradle sync and Use AppRate as follows in your MAIN activity:
     new AppRate(this).init();  
    
    The critical distinction between this strategy and the manual technique is that this one dispatches a brief, and just when the client taps on the positive activity in that brief will they be shipped off the Play Store to rate your application. The above codeblock will dispatch the brief when they open your application, which is for the most part not the ideal conduct. You'll undoubtedly need to tweak when your brief happens. Fortunately, a large portion of the public strategies for the AppRate object return itself, so you can bind the techniques together to effectively alter the brief. The accompanying arrangement is suggested::
     new AppRate(this)  
       .setMinDaysUntilPrompt(7)  
       .setMinLaunchesUntilPrompt(20)  
       .setShowIfAppHasCrashed(false)  
       .init() 
    
    This won't dispatch the brief until 7 days have passed and the client has dispatched the application at least multiple times. Furthermore, on the off chance that the application has slammed anytime previously, the brief won't dispatch, regardless of whether the other two measures are met. Toward the end, you run this undertaking and see the yield. A screen capture is given underneath with the goal that you can perceive how the offer technique will function.
    hope that this article will be very useful for you. Thank you...

    Post a Comment

    0 Comments