Pixplicity/gene-rate

SnackBar Multiple issues

Closed this issue · 1 comments

I call method every time i open my activity in which i need it to show the rating , first of all README is wrong about most of things!! after playing i got following conclusions i'd like to share with other facing problem like me:

Usage Conclusion:

  • What is root view passed in snackbar?
    Ans: Unlike in README , your rootView should be Coordinator layout to show the snackbar , otherwise it will simply don't show
  • Where to set the count after which i want my dialog/snack to show?
    Ans: you have to set rate.setTriggerCount(N) with rate.setRepeatCount(M)
    My snack/dialog will show after calling rate.count() and rate.showRequest() N number of times.
    M is count to repeat trigger after it rate.count()
  • What if i don't set count and trigger?
    Ans: Default count is 30 so app will need to run 30 times before showing anything
  • What if user clicked never ask again in snackbar and swiped/dismissed dialog?
    Ans: Your user will never see your snackbar/dialog again ever !!!! and most disappointing part is i can't able to find any option to disable it by default !!!

My Code:

It solve most of above problems but doesn't solve never ask again issue

 private void initRateAppSnack(){
        if(appRate != null){
            appRate.count();
            appRate.showRequest();
            return;
        }

        appRate = new Rate.Builder(this)
                .setTriggerCount(1)// Optional, defaults to 6
//                .setMinimumInstallTime(TimeUnit.DAYS.toMillis(7))   // Optional, defaults to 7 days
                .setRepeatCount(3)
                .setMinimumInstallTime(0)
                .setFeedbackAction(new OnFeedbackListener() {
                    @Override
                    public void onFeedbackTapped() {
                        LocalUtil.openGmailFeedback(SecondActivity.this);
                    }

                    @Override
                    public void onRateTapped() {
                    }

                    @Override
                    public void onRequestDismissed(boolean dontAskAgain) {

                    }
                })
                .setSnackBarParent(root_main)                            // Optional, shows dialog by default
                .setMessage(R.string.rating_message)                // Optional
                .setPositiveButton("Sure!")                         // Optional
                .setCancelButton("Maybe later")                     // Optional
                .setNegativeButton("FeedBack/Bug Report")                         // Optional
                .setSwipeToDismissVisible(true)                    // Add this when using the Snackbar
                // without a CoordinatorLayout as a parent.
                .build();

        initRateAppSnack();
    }

Hi! I've updated the Readme to address some of your concerns.
We feel that apps should not be nagging their users, which is why we made 'never ask again' the default and chose not to make that customizable. It is also why the repeat count (30) is by default higher than the trigger count (6) because after the user has already dismissed the request once, we want to nag as little as we can.