Code Monkey home page Code Monkey logo

android-ratethisapp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-ratethisapp's Issues

Reload counters after close dialog

If RateThisApp.showRateDialogIfNeeded() called multiple times while app execution, the dialog appears on each call. Even if mLaunchTimes > 1.

I think we need to update the value of the mLaunchTimes, mOptOut and mAskLaterDate after each showRateDialog() call.

Multi user error

Hi,

I found an error:

  • Owner install app
  • wait some time (without app usage)
  • add user to device
  • new user install same app
  • open the app first time
    -> Please rate dialog is shown

In my opinion this is an error. You should bild/use user specific preference keys.

Thanks,
Mario

Received status code 401 from server: Unauthorized | API level 34 / Android 14/15 devices!

Info:

  • Android Studio Hedgehog | 2023.1.1 Patch 2
  • Build #AI-231.9392.1.2311.11330709, built on January 18, 2024
  • Runtime version: 17.0.7+0-b2043.56-10550314 amd64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • Gradle Version: 8.2.2
  • Gradle JDK: jbr-17 (JetBrains Runtime version 17.0.7)
  • Windows 11 22H2 (version 10.0.22621.3155)

Code:
build.gradle:

dependencies {
    (...)
    implementation 'io.github.kobakei:ratethisapp:1.0'
}

settings.gradle:

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}
rootProject.name = "app-name"
include ':app'

Error:

Could not GET 'https://jitpack.io/io/github/kobakei/ratethisapp/1.0/ratethisapp-1.0.pom'. 
Received status code 401 from server: Unauthorized

It was tried with the dependency:

        maven { url 'https://maven.aliyun.com/repository/jcenter' }

Error:

Unresolved dependencies

Could not resolve io.github.kobakei:ratethisapp:1.0.

Unable to add library

I tried to add library but it gives error. Have a look at the build gradle

build.gralde(project-level)
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.novoda:bintray-release:0.3.4'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
    }

}

build.gradle(app level)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "xxx.xxxx.xxxxxx"
        minSdkVersion 9
        targetSdkVersion 25
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.google.android.gms:play-services-ads:8.1.0'
    compile 'com.android.support:support-v4:25.2.0'
    compile 'io.github.kobakei:ratethisapp:x.y.z'
    compile 'com.android.support:appcompat-v7:25.2.0'
}

Change colors

Is there a way to make it not inherit your app's colors so that you can customize them?

You need to use a Theme.AppCompat theme (or descendant) with this activity

I was having the following error when I tried using the code in an Activity:

You need to use a Theme.AppCompat theme (or descendant) with this activity

This is because in my AndroidManifest.xml I'm using the following theme:
android:theme="@android:style/Theme.NoTitleBar"

Changing the above to the below for the Activity that shows the RateApp dialog fixed this for me.
android:theme="@style/Theme.AppCompat.NoActionBar"

I got this solution from the below article:
http://stackoverflow.com/questions/21814825/you-need-to-use-a-theme-appcompat-theme-or-descendant-with-this-activity

mOptOut never set to true

Hi,

I think that you should set mOptOut property inside setOptOut method. ATM when i choose "never" and call showRateDialogIfNeeded in the same session, dialog appears again.

Rate this app dialog not working

I had incorporated the rate this app dialog box into my app last year. It was working perfectly for sometimes but later it stopped showing the rate this dialog box. Any idea what can be the reasons for this.

I was using the following condition in oncreate method ;

// Custom condition: 3 days and 5 launches
RateThisApp.Config config = new RateThisApp.Config(3, 5);
RateThisApp.init(config);

Do we need to use the following in Oncreate method;

RateThisApp.onCreate(this);

Setting config.

I just want to set a title and a message from a string variable. But actually the methods requires an int from resource. Could you add those two methods?!?
Thank you.

Events

Missing events for show dialog and selected options.
i want to track it with Google analitics

Thanks

RTL Support?

I am trying to use this dialog with Arabic text, the body and buttons are aligned correctly, but the title is still left-aligned.
Any ideas on how to correctly align it? I tried to pass a theme resource but still without success.

Add a public setOptOut()

I use a Intent to launch the Play Store if a preference (Rate the app) is clicked.

So I would like to disable the pop of the rating dialog.

KEY_INSTALL_DATE pref not cleared on uninstall

This line in onStart returns the same date no matter how many times I uninstall the app.

    mInstallDate = new Date(pref.getLong(KEY_INSTALL_DATE, 0));

The result is that on my test device I cannot properly test the functionality of RateThisApp because the prompt is always triggered on a fresh install. According to this SO post Android automatically backs up preferences to your account since SDK 21: http://stackoverflow.com/questions/15873066/how-to-remove-shared-preference-while-application-uninstall-in-android

However I already have android:allowBackup="false" and am still experiencing this issue. Does anyone have any suggestions?

Not working with API level 33 / Android 13 devices!

This library crashes with a StackOverFlow exception on Android 13 devices.
It enters a loop on in the callback methods:
com.kobakei.ratethisapp.RateThisApp.onCancelClicked (RateThisApp.java:475)
com.kobakei.ratethisapp.RateThisApp.onNoClicked (RateThisApp.java:467)
and the OnYesClicked too.

Missing Title and Message on Android Marshmallow

Hi, first of all, thank you so much for creating this library. As I tried on Android Marshmallow, the title and message are missing. I see in RateThisApp.java:showRateDialog(), it still uses AlertDialog which uses a different constructor with theme for Android Lollilop and Marshmallow. As the result, I change the code (as described on here) and it works like a charm.
So, I hope it will be fixed on the next release.

*Sorry for my English. 👯

WindowLeaked Exception

I got an exception because the activity already be destroyed but dialog still showing,
Could you provide hide dialog API?

E/WindowManager: android.view.WindowLeaked: Activity has leaked window DecorView@411d6b4[] that was originally added here
                                 at android.view.ViewRootImpl.<init>(ViewRootImpl.java:418)
                                 at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331)
                                 at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
                                 at android.app.Dialog.show(Dialog.java:322)
                                 at android.support.v7.app.AlertDialog$Builder.show(AlertDialog.java:955)
                                 at com.kobakei.ratethisapp.RateThisApp.showRateDialog(RateThisApp.java:255)
                                 at com.kobakei.ratethisapp.RateThisApp.showRateDialog(RateThisApp.java:170)

StrictMode policy violations

Calling RateThisApp.onStart(this); causes several StrictMode policy violations, mostly related to reading and writing to disk (shared preferences) on the main thread. This should be done on a background thread/asynchronously.

Allow set message and title by String too

The moment we ask users to rate our App is very important, should be done nicely and in a not-disturbing way. To try to engage people, I want to set message in runtime, not only by StringRes id. So if I have a logged in customer, I want to show something like:

"Hello, William! Today we want to ask you a few seconds of your time to bla bla bla..."

This can be easily achieved by allowing access to Config object creating a .setMessage(String message) public method!

Readme suggests onStart be called in Activity onStart which may be misleading

From what I can tell the onStart life-cycle method is fired every time an AppCompatActivity becomes visible again. Doesn't this mean calling RateThisApp.onStart(this); in protected void onStart() could result in the startup counter incrementing multiple times in one user session? In my applications the MainActivity represents a home page and a user can easily navigate away and come back again 10-20 times in a single session.

If my understanding above is correct I would recommend you suggest RateThisApp.onStart(this); be called in the launcher Activity's onCreate method instead as this should persist for the duration of the user's session.

CI error

dependencies resolution is failed.

Against dialog guidelines

From https://material.io/guidelines/components/dialogs.html#dialogs-specs

Number of actions

Dialogs should not include more than two actions. A third action, such as “Learn more,” navigates away from the dialog, potentially leaving the task unfinished.

Avoid using a “Learn more” action to access help documentation; in-line expansion within the dialog should be used instead. If more extensive information is needed, provide it prior to entering the dialog.

Is there anything you can do to fulfill the guidelines for the best user experience?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.