The Galaxy Store review broadcast allows a customer to rate and review your app without leaving the app itself.
In order to use the Galaxy Store review broadcast, you must check the version of Galaxy Store and verify that the customer is eligible to rate and review your app before requesting a review.
Because verifying the version of Galaxy Store and customer eligibility may take some time, check this in advance and not right before exposing the review screen. Learn more about the best practices you can use to increase the chances of getting a response from a customer.
The provided code must be used as-is and must not be modified nor updated.
Check the version of Galaxy Store. Galaxy Store review broadcast is supported on Galaxy Store version 4.5.22.7 or higher. Use the code below:
ApplicationInfo ai = getPackageManager().getApplicationInfo("com.sec.android.app.samsungapps", PackageManager.GET_META_DATA); int inappReviewVersion = ai.metaData.getInt("com.sec.android.app.samsungapps.review.inappReview", 0); if (inappReviewVersion > 0){ // if inappReviewVersion is larger than zero, Galaxy Store supports in-app review function } else { // else, Galaxy Store does not support in-app review function }
Before the customer can rate and review your app, verify that the customer meets the following conditions:
Customers who do not meet these conditions do not see the review prompt.
Use the following code:
Request
// 1. Check your review authority by Galaxy Store package Intent intent = new Intent("com.sec.android.app.samsungapps.REQUEST_INAPP_REVIEW_AUTHORITY"); intent.setPackage("com.sec.android.app.samsungapps"); intent.putExtra("callerPackage", targetPackage); // targetPacakge : your package name sendBroadcast(intent);
Response
// 2. Get result of authority checking from Galaxy Store package IntentFilter filter = new IntentFilter(); filter.addAction("com.sec.android.app.samsungapps.RESPONSE_INAPP_REVIEW_AUTHORITY"); authorityReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // If true, you have authority to write review boolean hasAuthority = intent.getBooleanExtra("hasAuthority", false); // By using deeplinkUrlForReview, you can open review activity of Galaxy Store String deeplinkUri = intent.getStringExtra("deeplinkUri"); } }
If the customer satisfies the conditions in steps 1 and 2, request a review prompt. Use the following code:
Intent intent = new Intent(); intent.setData(Uri.parse(deeplinkUri)); // deeplinkUri, included in response intent intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_INCLUDE_STOPPED_PACKAGES); startActivity(intent);
Download the sample code shown on this page.