Home > Back-end >  Error while performing in-app Review for Galaxy Store
Error while performing in-app Review for Galaxy Store

Time:05-02

I am trying in-app pop up review for my Galaxy Store app for first time. As per the documents provided by Galaxy Developer (https://developer.samsung.com/galaxy-store/customer-review/galaxy-store-review-broadcast.html) I followed each step and got this error while exciting the project.

Here is the code I implement inside MainActivity.java:

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
}

// 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", com.protecgames.htmleditor);  // targetPacakge : your package name
sendBroadcast(intent);

Intent intent = new Intent();
intent.setData(Uri.parse(samsungapps://AppRating/com.protecgames.htmleditor));    // deeplinkUri, included in response intent
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
startActivity(intent);

Here is the error I got:

1. ERROR in /storage/emulated/0/.sketchware/mysc/603/app/src/main/java/com/protecgames/htmleditor/MainActivity.java (at line 184)
    intent.setData(Uri.parse(samsungapps://AppRating/com.protecgames.htmleditor));    // deeplinkUri, included in response intent
                            ^
Syntax error, insert ")" to complete MethodInvocation
----------
2. ERROR in /storage/emulated/0/.sketchware/mysc/603/app/src/main/java/com/protecgames/htmleditor/MainActivity.java (at line 184)
    intent.setData(Uri.parse(samsungapps://AppRating/com.protecgames.htmleditor));    // deeplinkUri, included in response intent
                            ^
Syntax error, insert ")" to complete MethodInvocation
----------
3. ERROR in /storage/emulated/0/.sketchware/mysc/603/app/src/main/java/com/protecgames/htmleditor/MainActivity.java (at line 184)
    intent.setData(Uri.parse(samsungapps://AppRating/com.protecgames.htmleditor));    // deeplinkUri, included in response intent
                            ^
Syntax error, insert ";" to complete Statement
----------
3 problems (3 errors)

Language I am using is Java

CodePudding user response:

You should add the data as a String not as a package or whatever we say it. Try to set the data this way:

intent.setData(Uri.parse("samsungapps://AppRating/com.protecgames.htmleditor"));  
  • Related