Galaxy Store Review Broadcast
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:
- Logged in to their Samsung account
- Downloaded or updated your app from Galaxy Store
- Did not rate your app within the last year
Note :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);
Broadcast intent details
Extra Key | Type | Description | Response |
---|---|---|---|
hasAuthority | Boolean | The user is authorized to rate and review the app. | True: The user is able to rate the app. False: The user is not able to rate the app. |
isRegistered | Boolean | A rating/review history exists for the user for the app. | True: The user has already reviewed this app. False: The user has not reviewed this app. |
currentScore | Int | The previous rating, based on five stars. The value is equal to half a star (for example, a value of 2 is equal to a one-star rating). The response is null if the user has not reviewed this app. | Half star rating value (1 ‑ 10) |
registeredDate | Date | Review Date (GMT) The response is null if the user has not reviewed this app. | Year, Month, Day |
deeplinkUri | String | URI that links to the Rating and Review screen. | URI |
errorCode | Int | Error code when an error occurs. | See errorCodes for more information. |
errorCodes
Error Code | Description |
---|---|
0 | No error. Normal Status. |
1000 | A mandatory parameter to check user status is not available. |
2000 | Server error. |
4002 | Content is not available in Galaxy Store for the user. |
5000 | The user is not logged in to a Samsung Account on the device. |
100015 | Repeated request for authorization happens within 10 seconds. |
Download the sample code
Download the sample code shown on this page.