├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── Screenshot_2019-11-23-22-52-27-294_com.oxylabs.easyrate_example.png
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── oxylabs
│ │ └── easyrate_example
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── oxylabs
│ │ │ └── easyrate_example
│ │ │ └── MainActivity.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── content_main.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── oxylabs
│ └── easyrate_example
│ └── ExampleUnitTest.java
├── build.gradle
├── easyrate
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── oxylabs
│ │ └── easyrate
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── oxylabs
│ │ │ └── easyrate
│ │ │ └── EasyRate.java
│ └── res
│ │ ├── drawable
│ │ ├── avatar_boy.xml
│ │ ├── avatar_girl.xml
│ │ ├── avatar_girl_1.xml
│ │ ├── avatar_man.xml
│ │ ├── avatar_man_1.xml
│ │ ├── bubble_coming.xml
│ │ ├── emoji_angry.xml
│ │ ├── emoji_crying.xml
│ │ ├── emoji_happy.xml
│ │ ├── emoji_in_love.xml
│ │ ├── emoji_thinking.xml
│ │ ├── ic_close.xml
│ │ ├── round_corners_fill.xml
│ │ └── round_corners_fill_gray.xml
│ │ ├── layout
│ │ └── view_easy_rate.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── oxylabs
│ └── easyrate
│ └── ExampleUnitTest.java
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # EasyRate Android
2 | [](https://jitpack.io/#grezzled/EasyRate)
3 |
4 | EasyRate is an Android library for dealing with app ratings & feedbacks.
5 | In simple words, it shows a modern and well-designed dialog to engage users to rate the app in Google Play. To avoid bad ratings, the CTA Button changes according to the user's review as Follow :
6 | - Write Feedback: if review between 1 & 3 Stars
7 | - Rate: if a review is 4 or 5 Stars
8 |
9 |
10 |
11 | ## Getting Started
12 | Add to your root build.gradle at the end of repositories:
13 | ```java
14 | allprojects {
15 | repositories {
16 | ...
17 | maven { url 'https://jitpack.io' }
18 | }
19 | }
20 | ```
21 | Step 2. Add the dependency
22 |
23 | ```java
24 | implementation 'com.github.grezzled:EasyRate:1.0.2'
25 | ```
26 |
27 | ## Basic Usage
28 | Show dialog
29 | ```java
30 | EasyRate.init(MainActivity.this)
31 | .setMailingContact("YOUR_EMAIL@email.com","write a subject","write a description")
32 | .show();
33 | ```
34 | Initiate to show dialog at an appropriate timing
35 | ```java
36 | EasyRate.init(MainActivity.this)
37 | .setMailingContact("YOUR_EMAIL@email.com","write a subject","write a description")
38 | .build();
39 | ```
40 |
41 |
42 | ## Advanced Usage
43 | In default, the dialog will be shown when the following conditions is satisfied.
44 | - App is launched more than 3 times
45 | - App is launched more than 3 days later than installation.
46 | ```java
47 | EasyRate.init(MainActivity.this)
48 | .setMailingContact("YOUR_EMAIL@email.com","write a subject","write a description")
49 | .setLaunchesDelay(10) // App Launched more than 10 times
50 | .setDaysDelay(7) // App is launched more than 7 days later than installation.
51 | .setOnCloseClickListener(new EasyRate.OnCloseClick() {
52 | @Override
53 | public void onCloseClickListener() {
54 | // Set what to do when close button clicked!
55 | }
56 | })
57 | .setOnFeedbackClickListener(new EasyRate.OnFeedbackClick() {
58 | @Override
59 | public void onFeedBackClickListener() {
60 | /* By Overriding this Listener, Feedback by email will be ignored
61 | * and "setMailingContact()" won't be necessary anymore.
62 | * You can call a feedback activity, open a link, your Instagram account or whatever you want
63 | */
64 | }
65 | })
66 | .build();
67 | ```
68 | Reset Count of launches and days to 0
69 | ```java
70 | EasyRate.resetDelay(context);
71 | ```
72 | Prevent the dialog from showing again
73 | ```java
74 | EasyRate.dontShowAgain(true,context);
75 | ```
76 | ## Contributing
77 | If you want to contribute this project, please send pull request. In present, I need contributors who can translate resources from English into other languages.
78 | For major changes, please open an issue first to discuss what you would like to change.
79 |
80 | Please make sure to update the tests as appropriate.
81 |
82 | ## License
83 | ```
84 | Copyright 2019 Grezzled
85 |
86 | Licensed under the Apache License, Version 2.0 (the "License");
87 | you may not use this file except in compliance with the License.
88 | You may obtain a copy of the License at
89 |
90 | http://www.apache.org/licenses/LICENSE-2.0
91 |
92 | Unless required by applicable law or agreed to in writing, software
93 | distributed under the License is distributed on an "AS IS" BASIS,
94 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
95 | See the License for the specific language governing permissions and
96 | limitations under the License.
97 | ```
98 |
99 | ## Author
100 | Grezzled - lotub.llc@gmail.com
101 |
--------------------------------------------------------------------------------
/Screenshot_2019-11-23-22-52-27-294_com.oxylabs.easyrate_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/Screenshot_2019-11-23-22-52-27-294_com.oxylabs.easyrate_example.png
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | defaultConfig {
6 | applicationId "com.oxylabs.easyrate_example"
7 | minSdkVersion 22
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'androidx.appcompat:appcompat:1.0.2'
24 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
25 | implementation 'com.google.android.material:material:1.0.0'
26 | testImplementation 'junit:junit:4.12'
27 | androidTestImplementation 'androidx.test:runner:1.2.0'
28 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
29 | implementation project(path: ':easyrate')
30 | }
31 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in show.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/oxylabs/easyrate_example/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.oxylabs.easyrate_example;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.InstrumentationRegistry;
6 | import androidx.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.oxylabs.easyrate_example", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/oxylabs/easyrate_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.oxylabs.easyrate_example;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 |
6 | import com.google.android.material.floatingactionbutton.FloatingActionButton;
7 | import com.oxylabs.easyrate.EasyRate;
8 |
9 | import androidx.appcompat.app.AppCompatActivity;
10 | import androidx.appcompat.widget.Toolbar;
11 |
12 | import android.view.View;
13 | import android.view.Menu;
14 | import android.view.MenuItem;
15 | import android.widget.Toast;
16 |
17 | public class MainActivity extends AppCompatActivity {
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_main);
23 | Toolbar toolbar = findViewById(R.id.toolbar);
24 | setSupportActionBar(toolbar);
25 | final Context context = this;
26 | // EasyRate.resetDelay(context);
27 | EasyRate.init(MainActivity.this)
28 | .setMailingContact("lotub.llc@gmail.com","this is a subject","this is a description")
29 | .setLaunchesDelay(2) // App Launched more than 10 times
30 | .setDaysDelay(0) // App is launched more than 7 days later than installation.
31 | .build();
32 |
33 | FloatingActionButton fab = findViewById(R.id.fab);
34 | // fab.setOnClickListener(new View.OnClickListener() {
35 | // @Override
36 | // public void onClick(View view) {
37 | // EasyRate.init(MainActivity.this)
38 | // .setMailingContact("lotub.llc@gmail.com","this is a subject?:","this is a description")
39 | // .show();
40 | //
41 | // }
42 | // });
43 | }
44 |
45 | @Override
46 | public boolean onCreateOptionsMenu(Menu menu) {
47 | // Inflate the menu; this adds items to the action bar if it is present.
48 | getMenuInflater().inflate(R.menu.menu_main, menu);
49 | return true;
50 | }
51 |
52 | @Override
53 | public boolean onOptionsItemSelected(MenuItem item) {
54 | // Handle action bar item clicks here. The action bar will
55 | // automatically handle clicks on the Home/Up button, so long
56 | // as you specify a parent activity in AndroidManifest.xml.
57 | int id = item.getItemId();
58 |
59 | //noinspection SimplifiableIfStatement
60 | if (id == R.id.action_settings) {
61 | return true;
62 | }
63 |
64 | return super.onOptionsItemSelected(item);
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | EasyRate_example
3 | Settings
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/test/java/com/oxylabs/easyrate_example/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.oxylabs.easyrate_example;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.5.1'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/easyrate/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/easyrate/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 28
5 |
6 |
7 | defaultConfig {
8 | minSdkVersion 16
9 | targetSdkVersion 28
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14 |
15 | }
16 |
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 |
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 |
29 | implementation 'androidx.appcompat:appcompat:1.1.0'
30 | testImplementation 'junit:junit:4.12'
31 | androidTestImplementation 'androidx.test:runner:1.2.0'
32 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
33 | }
34 |
--------------------------------------------------------------------------------
/easyrate/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in show.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/easyrate/src/androidTest/java/com/oxylabs/easyrate/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.oxylabs.easyrate;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.InstrumentationRegistry;
6 | import androidx.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.oxylabs.easyrate2.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/easyrate/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/easyrate/src/main/java/com/oxylabs/easyrate/EasyRate.java:
--------------------------------------------------------------------------------
1 | package com.oxylabs.easyrate;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.content.pm.ApplicationInfo;
8 | import android.graphics.ColorMatrix;
9 | import android.graphics.ColorMatrixColorFilter;
10 | import android.graphics.drawable.ColorDrawable;
11 | import android.graphics.drawable.Drawable;
12 | import android.net.Uri;
13 | import android.util.Log;
14 | import android.view.LayoutInflater;
15 | import android.view.View;
16 | import android.view.Window;
17 | import android.view.WindowManager;
18 | import android.widget.Button;
19 | import android.widget.ImageView;
20 | import android.widget.LinearLayout;
21 | import android.widget.TextView;
22 | import android.widget.Toast;
23 |
24 | import androidx.core.content.res.ResourcesCompat;
25 |
26 | import java.net.URI;
27 |
28 |
29 | /**
30 | * Created by Soufiane on 03,September,2019
31 | * https://www.isoufiane.com
32 | */
33 | public class EasyRate {
34 |
35 | private String title;
36 | private Context context;
37 | private Dialog d;
38 | private ImageView imgRev1, imgRev2, imgRev3, imgRev4, imgRev5, avatarImg, closeBtn;
39 | private TextView avatarTxt, avatarMsg, appTitle;
40 | private Button ctaBtn;
41 | private SharedPreferences.Editor editor;
42 | private OnCloseClick onCloseClick;
43 | private OnFeedbackClick onFeedbackClick;
44 | private int DAYS_UNTIL_PROMPT = 3;//Default number of days
45 | private int LAUNCHES_UNTIL_PROMPT = 3;//Default number of launches
46 | private String EMAIL_ADDRESS, SUBJECT, TEXT_CONTENT;
47 |
48 | public static EasyRate init(Context context) {
49 | EasyRate easyRate = new EasyRate();
50 | easyRate.context = context;
51 | return easyRate;
52 | }
53 |
54 | // TODO Customize things
55 |
56 | public void show() {
57 | d = new Dialog(context);
58 | // Inflate layout and add it to dialog
59 | // LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
60 | LayoutInflater inflater = LayoutInflater.from(context);
61 | if (inflater == null)
62 | return;
63 | View view = inflater.inflate(R.layout.view_easy_rate, new LinearLayout(context), false);
64 |
65 | bindViews(view);
66 | initViews();
67 |
68 | d.setContentView(view);
69 |
70 | // Copy Default params then change width & height
71 | WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
72 | Window window = d.getWindow();
73 | if (window != null) {
74 | window.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
75 | lp.copyFrom(window.getAttributes());
76 | lp.width = WindowManager.LayoutParams.MATCH_PARENT;
77 | lp.height = WindowManager.LayoutParams.MATCH_PARENT;
78 | window.setAttributes(lp);
79 | }
80 | d.show();
81 | }
82 |
83 | private void bindViews(View view) {
84 | imgRev1 = view.findViewById(R.id.rev1_img);
85 | imgRev2 = view.findViewById(R.id.rev2_img);
86 | imgRev3 = view.findViewById(R.id.rev3_img);
87 | imgRev4 = view.findViewById(R.id.rev4_img);
88 | imgRev5 = view.findViewById(R.id.rev5_img);
89 | avatarImg = view.findViewById(R.id.avatar_img);
90 | avatarTxt = view.findViewById(R.id.avatar_txt);
91 | avatarMsg = view.findViewById(R.id.avatar_msg);
92 | ctaBtn = view.findViewById(R.id.cta_btn);
93 | closeBtn = view.findViewById(R.id.close_btn);
94 | appTitle = view.findViewById(R.id.love_app);
95 | }
96 |
97 | private static String getApplicationName(Context context) {
98 | ApplicationInfo applicationInfo = context.getApplicationInfo();
99 | int stringId = applicationInfo.labelRes;
100 | return stringId == 0 ? applicationInfo.nonLocalizedLabel.toString() : context.getString(stringId);
101 | }
102 |
103 | private void sendEmail() {
104 |
105 | Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
106 | String uriText = "mailto:"+EMAIL_ADDRESS + "?subject=" + Uri.encode(SUBJECT) + "&body=" + Uri.encode(TEXT_CONTENT);
107 | emailIntent.setData(Uri.parse(uriText));
108 | if (emailIntent.resolveActivity(context.getPackageManager()) != null) {
109 | try {
110 | context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
111 | } catch (android.content.ActivityNotFoundException ex) {
112 | Toast.makeText(context, context.getResources().getString(R.string.no_email_client), Toast.LENGTH_SHORT).show();
113 | }
114 | }
115 |
116 | }
117 |
118 | private void initViews() {
119 | String loveThisApp = context.getString(R.string.love_this_app) + " " + getApplicationName(context) + "?";
120 | appTitle.setText(loveThisApp);
121 | setFilter(imgRev1, imgRev2, imgRev3, imgRev4, imgRev5);
122 |
123 | imgRev1.setOnClickListener(new View.OnClickListener() {
124 | @Override
125 | public void onClick(View v) {
126 | removeFilter(imgRev1);
127 | initIcons(context);
128 | setFilter(imgRev2, imgRev3, imgRev4, imgRev5);
129 | avatarImg.setImageDrawable(context.getResources().getDrawable(R.drawable.avatar_man_1));
130 | avatarImg.setImageDrawable(ResourcesCompat.getDrawable(context.getResources(), R.drawable.avatar_man_1, null));
131 | avatarTxt.setText(context.getResources().getString(R.string.dev));
132 | avatarMsg.setText(context.getResources().getString(R.string.review_1));
133 | ctaBtn.setOnClickListener(new View.OnClickListener() {
134 | @Override
135 | public void onClick(View v) {
136 | if (onFeedbackClick != null) {
137 | onFeedbackClick.onFeedBackClickListener();
138 | return;
139 | }
140 | if (EMAIL_ADDRESS == null || SUBJECT == null || TEXT_CONTENT == null)
141 | return;
142 | sendEmail();
143 |
144 | if (editor != null) {
145 | editor.putBoolean("dontshowagain", true);
146 | editor.apply();
147 | }
148 | d.dismiss();
149 | }
150 | });
151 | ctaBtn.setText(context.getResources().getText(R.string.write_feedback));
152 | ctaBtn.setEnabled(true);
153 | ctaBtn.setBackground(context.getResources().getDrawable(R.drawable.round_corners_fill));
154 | }
155 | });
156 |
157 | imgRev2.setOnClickListener(new View.OnClickListener() {
158 | @Override
159 | public void onClick(View v) {
160 | removeFilter(imgRev1, imgRev2);
161 | initIcons(context);
162 | setSameImg(context.getResources().getDrawable(R.drawable.emoji_angry), imgRev1, imgRev2);
163 | setFilter(imgRev3, imgRev4, imgRev5);
164 | avatarImg.setImageDrawable(context.getResources().getDrawable(R.drawable.avatar_girl_1));
165 | avatarTxt.setText(context.getResources().getString(R.string.ui));
166 | avatarMsg.setText(context.getResources().getString(R.string.review_2));
167 | ctaBtn.setOnClickListener(new View.OnClickListener() {
168 | @Override
169 | public void onClick(View v) {
170 | if (onFeedbackClick != null) {
171 | onFeedbackClick.onFeedBackClickListener();
172 | return;
173 | }
174 | if (EMAIL_ADDRESS == null || SUBJECT == null || TEXT_CONTENT == null)
175 | return;
176 | sendEmail();
177 |
178 | if (editor != null) {
179 | editor.putBoolean("dontshowagain", true);
180 | editor.apply();
181 | }
182 | d.dismiss();
183 | }
184 | });
185 | ctaBtn.setText(context.getResources().getText(R.string.write_feedback));
186 | ctaBtn.setEnabled(true);
187 | ctaBtn.setBackground(context.getResources().getDrawable(R.drawable.round_corners_fill));
188 | }
189 | });
190 |
191 | imgRev3.setOnClickListener(new View.OnClickListener() {
192 | @Override
193 | public void onClick(View v) {
194 | removeFilter(imgRev1, imgRev2, imgRev3);
195 | initIcons(context);
196 | setSameImg(context.getResources().getDrawable(R.drawable.emoji_thinking), imgRev1, imgRev2, imgRev3);
197 | setFilter(imgRev4, imgRev5);
198 | avatarImg.setImageDrawable(context.getResources().getDrawable(R.drawable.avatar_boy));
199 | avatarTxt.setText(context.getResources().getString(R.string.qa));
200 | avatarMsg.setText(context.getResources().getString(R.string.review_3));
201 | ctaBtn.setOnClickListener(new View.OnClickListener() {
202 | @Override
203 | public void onClick(View v) {
204 | if (onFeedbackClick != null) {
205 | onFeedbackClick.onFeedBackClickListener();
206 | return;
207 | }
208 | if (EMAIL_ADDRESS == null || SUBJECT == null || TEXT_CONTENT == null)
209 | return;
210 | sendEmail();
211 |
212 | if (editor != null) {
213 | editor.putBoolean("dontshowagain", true);
214 | editor.apply();
215 | }
216 | d.dismiss();
217 |
218 | }
219 | });
220 | ctaBtn.setText(context.getResources().getText(R.string.write_feedback));
221 | ctaBtn.setEnabled(true);
222 | ctaBtn.setBackground(context.getResources().getDrawable(R.drawable.round_corners_fill));
223 | }
224 | });
225 |
226 | imgRev4.setOnClickListener(new View.OnClickListener() {
227 | @Override
228 | public void onClick(View v) {
229 | removeFilter(imgRev1, imgRev2, imgRev3, imgRev4);
230 | initIcons(context);
231 | setSameImg(context.getResources().getDrawable(R.drawable.emoji_happy), imgRev1, imgRev2, imgRev3, imgRev4);
232 | setFilter(imgRev5);
233 | avatarImg.setImageDrawable(context.getResources().getDrawable(R.drawable.avatar_man));
234 | avatarTxt.setText(context.getResources().getString(R.string.op));
235 | avatarMsg.setText(context.getResources().getString(R.string.review_4));
236 | ctaBtn.setOnClickListener(new View.OnClickListener() {
237 | @Override
238 | public void onClick(View v) {
239 | context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + context.getPackageName())));
240 | if (editor != null) {
241 | editor.putBoolean("dontshowagain", true);
242 | editor.apply();
243 | }
244 | d.dismiss();
245 |
246 | }
247 | });
248 | ctaBtn.setText(context.getResources().getText(R.string.rate));
249 | ctaBtn.setEnabled(true);
250 | ctaBtn.setBackground(context.getResources().getDrawable(R.drawable.round_corners_fill));
251 | }
252 | });
253 |
254 | imgRev5.setOnClickListener(new View.OnClickListener() {
255 | @Override
256 | public void onClick(View v) {
257 | removeFilter(imgRev1, imgRev2, imgRev3, imgRev4, imgRev5);
258 | initIcons(context);
259 | setSameImg(context.getResources().getDrawable(R.drawable.emoji_in_love), imgRev1, imgRev2, imgRev3, imgRev4, imgRev5);
260 | avatarImg.setImageDrawable(context.getResources().getDrawable(R.drawable.avatar_girl));
261 | avatarTxt.setText(context.getResources().getString(R.string.pm));
262 | avatarMsg.setText(context.getResources().getString(R.string.review_5));
263 | ctaBtn.setOnClickListener(new View.OnClickListener() {
264 | @Override
265 | public void onClick(View v) {
266 | context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + context.getPackageName())));
267 | if (editor != null) {
268 | Log.d("log123","Here");
269 | editor.putBoolean("dontshowagain", true);
270 | editor.apply();
271 | }
272 | d.dismiss();
273 | }
274 | });
275 | ctaBtn.setText(context.getResources().getText(R.string.rate));
276 | ctaBtn.setEnabled(true);
277 | ctaBtn.setBackground(context.getResources().getDrawable(R.drawable.round_corners_fill));
278 | }
279 | });
280 |
281 | closeBtn.setOnClickListener(new View.OnClickListener() {
282 | @Override
283 | public void onClick(View v) {
284 | if (onCloseClick != null)
285 | onCloseClick.onCloseClickListener();
286 | else
287 | resetDelay(context);
288 |
289 | d.dismiss();
290 | }
291 | });
292 | }
293 |
294 | private void setFilter(ImageView... imageViews) {
295 | ColorMatrix matrix = new ColorMatrix();
296 | matrix.setSaturation(0);
297 | ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix);
298 | for (ImageView imgv : imageViews) {
299 | imgv.setColorFilter(filter);
300 | }
301 | }
302 |
303 | private void setSameImg(Drawable image, ImageView... imageViews) {
304 | for (ImageView imgV : imageViews) {
305 | imgV.setImageDrawable(image);
306 | }
307 | }
308 |
309 | private void removeFilter(ImageView... imageViews) {
310 | for (ImageView imgV : imageViews) {
311 | imgV.setColorFilter(null);
312 | }
313 | }
314 |
315 | private void initIcons(Context context) {
316 | imgRev1.setImageDrawable(context.getResources().getDrawable(R.drawable.emoji_crying));
317 | imgRev2.setImageDrawable(context.getResources().getDrawable(R.drawable.emoji_angry));
318 | imgRev3.setImageDrawable(context.getResources().getDrawable(R.drawable.emoji_thinking));
319 | imgRev4.setImageDrawable(context.getResources().getDrawable(R.drawable.emoji_happy));
320 | imgRev5.setImageDrawable(context.getResources().getDrawable(R.drawable.emoji_in_love));
321 | }
322 |
323 | public void build() {
324 | // Should Show Dialog
325 | SharedPreferences prefs = context.getSharedPreferences("apprater", 0);
326 | if (prefs.getBoolean("dontshowagain", false)) {
327 | return;
328 | }
329 |
330 | editor = prefs.edit();
331 |
332 | // Increment launch counter
333 | long launch_count = prefs.getLong("launch_count", 0) + 1;
334 | editor.putLong("launch_count", launch_count);
335 |
336 | // Get date of first launch
337 | Long date_firstLaunch = prefs.getLong("date_firstlaunch", 0);
338 | if (date_firstLaunch == 0) {
339 | date_firstLaunch = System.currentTimeMillis();
340 | editor.putLong("date_firstlaunch", date_firstLaunch);
341 | }
342 |
343 | // Wait at least n days before opening
344 | if (launch_count >= LAUNCHES_UNTIL_PROMPT) {
345 | if (System.currentTimeMillis() >= date_firstLaunch +
346 | (DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000)) {
347 | show();
348 | }
349 | }
350 | editor.apply();
351 | }
352 |
353 | public EasyRate setDaysDelay(int numberOfDays) {
354 | DAYS_UNTIL_PROMPT = numberOfDays;
355 | return this;
356 | }
357 |
358 | public EasyRate setLaunchesDelay(int numberOfLaunches) {
359 | LAUNCHES_UNTIL_PROMPT = numberOfLaunches;
360 | return this;
361 | }
362 |
363 | public EasyRate setMailingContact(String emailAddress, String subject, String textContent) {
364 | EMAIL_ADDRESS = emailAddress;
365 | SUBJECT = subject;
366 | TEXT_CONTENT = textContent;
367 | return this;
368 | }
369 |
370 | public static void resetDelay(Context context) {
371 | SharedPreferences.Editor editor;
372 | SharedPreferences prefs = context.getSharedPreferences("apprater", 0);
373 | editor = prefs.edit();
374 | editor.putBoolean("dontshowagain", false);
375 | editor.putLong("date_firstlaunch", 0);
376 | editor.putLong("launch_count", 0);
377 | editor.apply();
378 | }
379 |
380 | public static void dontShowAgain(Boolean dontShowAgain, Context context) {
381 | SharedPreferences.Editor editor;
382 |
383 | SharedPreferences prefs = context.getSharedPreferences("apprater", 0);
384 | editor = prefs.edit();
385 | editor.putBoolean("dontshowagain", dontShowAgain);
386 | editor.apply();
387 | }
388 |
389 | public interface OnCloseClick {
390 | void onCloseClickListener();
391 | }
392 |
393 | public interface OnFeedbackClick {
394 | void onFeedBackClickListener();
395 | }
396 |
397 | public EasyRate setOnCloseClickListener(OnCloseClick onCloseClick) {
398 | this.onCloseClick = onCloseClick;
399 | return this;
400 | }
401 |
402 | public EasyRate setOnFeedbackClickListener(OnFeedbackClick onFeedbackClick) {
403 | this.onFeedbackClick = onFeedbackClick;
404 | return this;
405 | }
406 |
407 |
408 | }
409 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/avatar_boy.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
15 |
18 |
21 |
24 |
27 |
30 |
33 |
36 |
39 |
42 |
45 |
48 |
51 |
54 |
57 |
60 |
63 |
66 |
69 |
72 |
75 |
78 |
81 |
84 |
87 |
90 |
93 |
96 |
99 |
102 |
105 |
108 |
111 |
114 |
117 |
120 |
123 |
126 |
129 |
132 |
135 |
138 |
141 |
144 |
147 |
150 |
153 |
154 |
157 |
160 |
163 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/avatar_girl.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
26 |
29 |
32 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/avatar_girl_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
15 |
18 |
21 |
24 |
27 |
30 |
33 |
34 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/avatar_man.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
24 |
27 |
30 |
31 |
34 |
37 |
38 |
41 |
42 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/avatar_man_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
26 |
29 |
32 |
35 |
38 |
39 |
42 |
45 |
46 |
49 |
50 |
53 |
56 |
57 |
58 |
61 |
64 |
67 |
70 |
71 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/bubble_coming.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
9 |
10 |
11 |
12 |
13 |
14 | -
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/emoji_angry.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
26 |
29 |
32 |
35 |
38 |
41 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/emoji_crying.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
26 |
29 |
32 |
35 |
38 |
41 |
44 |
47 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/emoji_happy.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
26 |
29 |
32 |
35 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/emoji_in_love.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
26 |
29 |
32 |
35 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/emoji_thinking.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
23 |
26 |
29 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/ic_close.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/round_corners_fill.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/drawable/round_corners_fill_gray.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/layout/view_easy_rate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
16 |
20 |
21 |
31 |
36 |
44 |
45 |
55 |
56 |
57 |
58 |
67 |
68 |
75 |
76 |
85 |
86 |
96 |
97 |
107 |
108 |
118 |
119 |
120 |
121 |
124 |
125 |
130 |
131 |
140 |
141 |
158 |
159 |
160 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3C3F41
4 | #F6F6F6
5 | #80000000
6 | #DDDDDD
7 | #ffffff
8 | #FFD164
9 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | EasyRate
3 | Rate us
4 | Love
5 | Your rating will help us to do better.
6 | That\'s not the experience we\'d like you to have. Please share your feedback below.
7 | Uh oh! Could you tell us more about what we could improve?
8 | Thanks for your Feedback, is there something specific that you think we could improve?
9 | Thank you! your feedback inspires us to improve. Would you mind giving us a 5?
10 | Thanks! Your awesome feedback just made our day! please rate us on Play Store.
11 | Write Feedback
12 | Rate
13 | DEV
14 | UI
15 | QA
16 | OP
17 | PM
18 | There are no email clients installed.
19 |
20 |
--------------------------------------------------------------------------------
/easyrate/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/easyrate/src/test/java/com/oxylabs/easyrate/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.oxylabs.easyrate;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grezzled/EasyRate/a06759351d32c9975d3b01e9b90d5d6539c7c879/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Feb 18 18:40:08 WET 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':easyrate'
2 |
--------------------------------------------------------------------------------