├── .gitignore
├── 666666.jks
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
├── release
│ └── output-metadata.json
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── viztushar
│ │ └── stickers
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-playstore.png
│ ├── java
│ │ └── com
│ │ │ └── viztushar
│ │ │ └── stickers
│ │ │ ├── FbReactions.java
│ │ │ ├── MainActivity.java
│ │ │ ├── ReactConstants.java
│ │ │ ├── Sticker.java
│ │ │ ├── StickerPack.java
│ │ │ ├── about.java
│ │ │ ├── activity
│ │ │ └── StickerDetailsActivity.java
│ │ │ ├── adapter
│ │ │ ├── StickerAdapter.java
│ │ │ └── StickerDetailsAdapter.java
│ │ │ ├── app
│ │ │ └── Application.java
│ │ │ ├── model
│ │ │ └── StickerModel.java
│ │ │ ├── provider
│ │ │ └── StickerContentProvider.java
│ │ │ ├── settings.java
│ │ │ └── task
│ │ │ └── GetStickers.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── arclayout_ic_add.xml
│ │ ├── arclayout_rogue.jpeg
│ │ ├── arclayout_rogue_logo.png
│ │ ├── btn_blue.xml
│ │ ├── cakepop.png
│ │ ├── coverimg.jpg
│ │ ├── hayabusa.jpg
│ │ ├── ic_angry.xml
│ │ ├── ic_arrow_downward.xml
│ │ ├── ic_gray_like.xml
│ │ ├── ic_happy.xml
│ │ ├── ic_heart.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_like.xml
│ │ ├── ic_notifications_none_white_24dp.png
│ │ ├── ic_sad.xml
│ │ ├── ic_surprise.xml
│ │ ├── mert.jpg
│ │ ├── react_dialog_shape.xml
│ │ ├── sticker_3rdparty_web.png
│ │ ├── sticker_error.png
│ │ ├── verified.png
│ │ └── yasin.jpg
│ │ ├── layout
│ │ ├── activity_about.xml
│ │ ├── activity_main.xml
│ │ ├── activity_settings.xml
│ │ ├── activity_sticker_details.xml
│ │ ├── arc_layout_activity.xml
│ │ ├── list_item_image.xml
│ │ └── list_item_sticker.xml
│ │ ├── menu
│ │ └── main_menu.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher_foreground.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher_foreground.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher_foreground.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher_foreground.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher_foreground.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── viztushar
│ └── stickers
│ └── ExampleUnitTest.java
├── build.gradle
├── emojis2.webp
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
├── tray_Bigmoji.png
└── yyyyyy.jks
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | *.aab
5 |
6 | # Files for the ART/Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 | out/
16 |
17 | # Gradle files
18 | .gradle/
19 | build/
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/workspace.xml
39 | .idea/tasks.xml
40 | .idea/gradle.xml
41 | .idea/assetWizardSettings.xml
42 | .idea/dictionaries
43 | .idea/libraries
44 | .idea/caches
45 |
46 | # Keystore files
47 | # Uncomment the following lines if you do not want to check your keystore files in.
48 | #*.jks
49 | #*.keystore
50 |
51 | # External native build folder generated in Android Studio 2.2 and later
52 | .externalNativeBuild
53 |
54 | # Google Services (e.g. APIs or Firebase)
55 | google-services.json
56 |
57 | # Freeline
58 | freeline.py
59 | freeline/
60 | freeline_project_description.json
61 |
62 | # fastlane
63 | fastlane/report.xml
64 | fastlane/Preview.html
65 | fastlane/screenshots
66 | fastlane/test_output
67 | fastlane/readme.md
68 |
69 |
70 | #Idea Dir
71 | .idea/
--------------------------------------------------------------------------------
/666666.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/666666.jks
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
3 | // Other plugins here if pre-existing
4 | }
5 |
6 | apply plugin: 'com.android.application'
7 |
8 | android {
9 | compileSdkVersion 31
10 | defaultConfig {
11 | applicationId "com.codermert.sticker"
12 | minSdkVersion 26
13 | targetSdkVersion 31
14 | versionCode 1
15 | versionName "1.5"
16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17 | vectorDrawables.useSupportLibrary = true
18 | def contentProviderAuthority = applicationId + ".provider.StickerContentProvider"
19 | // Creates a placeholder property to use in the manifest.
20 | manifestPlaceholders =
21 | [contentProviderAuthority: contentProviderAuthority]
22 | // Adds a new field for the authority to the BuildConfig class.
23 | buildConfigField("String",
24 | "CONTENT_PROVIDER_AUTHORITY",
25 | "\"${contentProviderAuthority}\"")
26 | }
27 | buildTypes {
28 | release {
29 | minifyEnabled false
30 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
31 | }
32 |
33 | }
34 | }
35 |
36 | dependencies {
37 |
38 | implementation 'com.github.Shashank02051997:FancyAboutPage-Android:2.8'
39 | implementation 'com.mikhaellopez:circularimageview:4.3.0'
40 | implementation 'com.github.bxute:StoryView:v1.0'
41 | implementation 'com.github.florent37:arclayout:1.0.3'
42 | implementation 'com.flaviofaria:kenburnsview:1.0.7'
43 | implementation 'com.codemybrainsout.rating:ratingdialog:1.0.8'
44 | implementation 'io.github.amrdeveloper:reactbutton:2.0.3'
45 | implementation 'nl.dionsegijn:konfetti:1.3.2'
46 | implementation 'io.github.tonnyl:spark:0.1.0-alpha'
47 | implementation 'com.varunjohn1990.libraries:iosdialogs4android:2.0.1'
48 | implementation 'com.onesignal:OneSignal:[4.0.0, 4.99.99]'
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | implementation 'androidx.recyclerview:recyclerview:1.0.0'
59 | implementation 'androidx.appcompat:appcompat:1.1.0'
60 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
61 | implementation 'androidx.browser:browser:1.0.0'
62 | implementation 'com.google.android.material:material:1.0.0'
63 | implementation 'com.google.android.gms:play-services-ads:20.5.0'
64 |
65 |
66 |
67 | implementation fileTree(include: ['*.jar'], dir: 'libs')
68 | //noinspection GradleCompatible
69 |
70 | testImplementation 'junit:junit:4.13.2'
71 | androidTestImplementation 'androidx.test:runner:1.4.0'
72 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
73 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
74 | implementation 'androidx.cardview:cardview:1.0.0'
75 | implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
76 | testImplementation 'junit:junit:4.12'
77 | //noinspection GradleCompatible
78 |
79 | //noinspection GradleCompatible
80 | implementation 'com.github.bumptech.glide:glide:4.8.0'
81 | implementation 'com.orhanobut:hawk:2.0.1'
82 | implementation 'com.android.support:multidex:1.0.3'
83 | //noinspection GradleCompatible
84 | implementation 'com.android.support:design:28.0.0'
85 | }
86 |
--------------------------------------------------------------------------------
/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 build.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/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "com.codermert.sticker",
8 | "variantName": "processReleaseResources",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "versionCode": 1,
14 | "versionName": "1.5",
15 | "outputFile": "app-release.apk"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/viztushar/stickers/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.jupiter.api.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.viztushar.stickers", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
22 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
42 |
43 |
44 |
47 |
48 |
49 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/FbReactions.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import com.amrdeveloper.reactbutton.Reaction;
4 |
5 | public class FbReactions {
6 | public static Reaction defaultReact = new Reaction(
7 | ReactConstants.LIKE,
8 | ReactConstants.DEFAULT,
9 | ReactConstants.GRAY,
10 | R.drawable.ic_heart);
11 |
12 | public static Reaction[] reactions = {
13 | new Reaction(ReactConstants.LIKE, ReactConstants.BLUE, R.drawable.ic_gray_like),
14 | new Reaction(ReactConstants.LOVE, ReactConstants.RED_LOVE, R.drawable.ic_heart),
15 | new Reaction(ReactConstants.SMILE, ReactConstants.YELLOW_WOW, R.drawable.ic_happy),
16 | new Reaction(ReactConstants.WOW, ReactConstants.YELLOW_WOW, R.drawable.ic_surprise),
17 | new Reaction(ReactConstants.SAD, ReactConstants.YELLOW_HAHA, R.drawable.ic_sad),
18 | new Reaction(ReactConstants.ANGRY, ReactConstants.RED_ANGRY, R.drawable.ic_angry),
19 | };
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import android.Manifest;
4 | import android.annotation.SuppressLint;
5 | import android.app.Activity;
6 | import android.content.Context;
7 | import android.content.Intent;
8 | import android.content.pm.PackageManager;
9 | import android.graphics.Bitmap;
10 | import android.graphics.drawable.Icon;
11 | import android.net.Uri;
12 | import android.os.Build;
13 | import android.os.Bundle;
14 |
15 | import androidx.annotation.NonNull;
16 | import androidx.annotation.RequiresApi;
17 | import androidx.appcompat.app.AppCompatActivity;
18 | import androidx.core.app.ActivityCompat;
19 | import androidx.core.content.ContextCompat;
20 | import androidx.core.content.pm.ShortcutInfoCompat;
21 | import androidx.core.content.pm.ShortcutManagerCompat;
22 | import androidx.core.graphics.drawable.IconCompat;
23 | import androidx.recyclerview.widget.LinearLayoutManager;
24 | import androidx.recyclerview.widget.RecyclerView;
25 | import androidx.appcompat.widget.Toolbar;
26 | import android.util.Log;
27 | import android.view.Menu;
28 | import android.view.MenuItem;
29 | import android.view.View;
30 | import android.widget.Toast;
31 |
32 |
33 | import com.codemybrainsout.ratingdialog.RatingDialog;
34 | import com.google.android.gms.ads.AdError;
35 | import com.google.android.gms.ads.AdRequest;
36 | import com.google.android.gms.ads.AdSize;
37 | import com.google.android.gms.ads.AdView;
38 | import com.google.android.gms.ads.FullScreenContentCallback;
39 | import com.google.android.gms.ads.LoadAdError;
40 | import com.google.android.gms.ads.MobileAds;
41 | import com.google.android.gms.ads.OnUserEarnedRewardListener;
42 | import com.google.android.gms.ads.initialization.InitializationStatus;
43 | import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
44 | import com.google.android.gms.ads.interstitial.InterstitialAd;
45 | import com.google.android.gms.ads.rewarded.RewardItem;
46 | import com.google.android.gms.ads.rewarded.RewardedAd;
47 | import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback;
48 | import com.orhanobut.hawk.Hawk;
49 | import com.viztushar.stickers.adapter.StickerAdapter;
50 | import com.viztushar.stickers.model.StickerModel;
51 | import com.viztushar.stickers.task.GetStickers;
52 | import com.onesignal.OneSignal;
53 |
54 |
55 | import org.json.JSONArray;
56 | import org.json.JSONException;
57 | import org.json.JSONObject;
58 |
59 | import java.io.File;
60 | import java.io.FileOutputStream;
61 | import java.text.ParseException;
62 | import java.text.SimpleDateFormat;
63 | import java.util.ArrayList;
64 | import java.util.List;
65 |
66 |
67 |
68 | public class MainActivity extends AppCompatActivity implements GetStickers.Callbacks {
69 |
70 |
71 | public static final String EXTRA_STICKER_PACK_ID = "sticker_pack_id";
72 | public static final String EXTRA_STICKER_PACK_AUTHORITY = "sticker_pack_authority";
73 | public static final String EXTRA_STICKER_PACK_NAME = "sticker_pack_name";
74 | public static final String EXTRA_STICKERPACK = "stickerpack";
75 | private static final String TAG = MainActivity.class.getSimpleName();
76 | private final String[] PERMISSIONS = {Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE};
77 | public static String path;
78 | ArrayList strings;
79 | StickerAdapter adapter;
80 | ArrayList stickerPacks = new ArrayList<>();
81 | List mStickers;
82 | ArrayList stickerModels = new ArrayList<>();
83 | RecyclerView recyclerView;
84 | List mEmojis,mDownloadFiles;
85 | String android_play_store_link;
86 | Toolbar toolbar;
87 | Context context;
88 | private AdView mAdView2;
89 | final Context context1 = this;
90 | final Context context2 = this;
91 | private RewardedAd mRewardedAd;
92 | private final String TAG1 = "--->AdMob";
93 | private static final String ONESIGNAL_APP_ID = "f9f24819-d4c5-479d-9532-065552e6084b";
94 |
95 |
96 |
97 | @RequiresApi(api = Build.VERSION_CODES.M)
98 | @Override
99 | protected void onCreate(Bundle savedInstanceState) {
100 | super.onCreate(savedInstanceState);
101 |
102 | @SuppressLint("RestrictedApi")
103 | ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(context1, "atm_shortcut")
104 | .setShortLabel(getString(R.string.app_name))
105 | .setLongLabel(getString(R.string.developer_name))
106 | .setIcon(IconCompat.createFromIcon(Icon.createWithResource(context1, R.drawable.cakepop)))
107 | .setIntent(new Intent(Intent.ACTION_VIEW,
108 | Uri.parse("https://twitter.com/codermert")))
109 | .build();
110 | ShortcutManagerCompat.pushDynamicShortcut(context1, shortcut);
111 | @SuppressLint("RestrictedApi")
112 | ShortcutInfoCompat shortcut2 = new ShortcutInfoCompat.Builder(context2, "atm2_shortcut")
113 | .setShortLabel(getString(R.string.app_name))
114 | .setLongLabel(getString(R.string.telegram_yonlendir))
115 | .setIcon(IconCompat.createFromIcon(Icon.createWithResource(context2, R.drawable.verified)))
116 | .setIntent(new Intent(Intent.ACTION_VIEW,
117 | Uri.parse("https://t.me/codermert")))
118 | .build();
119 | ShortcutManagerCompat.pushDynamicShortcut(context2, shortcut2);
120 |
121 |
122 | AdView adView = new AdView(this);
123 |
124 | adView.setAdSize(AdSize.BANNER);
125 |
126 | adView.setAdUnitId("ca-app-pub-3940256099942544/6300978111");
127 |
128 | OneSignal.setLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.NONE);
129 |
130 | // OneSignal Initialization
131 | OneSignal.initWithContext(this);
132 | OneSignal.setAppId(ONESIGNAL_APP_ID);
133 |
134 | mAdView2 = findViewById(R.id.adView2);
135 | AdRequest adRequest = new AdRequest.Builder().build();
136 |
137 | MobileAds.initialize(this, new OnInitializationCompleteListener() {
138 | @Override
139 | public void onInitializationComplete(InitializationStatus initializationStatus) {
140 | loadRewardedAd();
141 | }
142 | });
143 |
144 |
145 |
146 | stickerPacks = new ArrayList<>();
147 | path = getFilesDir() + "/" + "stickers_asset";
148 | mStickers = new ArrayList<>();
149 | stickerModels = new ArrayList<>();
150 | mEmojis = new ArrayList<>();
151 | mDownloadFiles = new ArrayList<>();
152 | mEmojis.add("");
153 | adapter = new StickerAdapter(this, stickerPacks);
154 | getPermissions();
155 | setContentView(R.layout.activity_main);
156 | toolbar = findViewById(R.id.toolbar);
157 | setSupportActionBar(toolbar);
158 | recyclerView = findViewById(R.id.recyclerView);
159 | RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
160 | recyclerView.setLayoutManager(layoutManager);
161 |
162 | new GetStickers(this, this, getResources().getString(R.string.json_link)).execute();
163 |
164 | }
165 |
166 | private void loadRewardedAd() {
167 |
168 | AdRequest adRequest = new AdRequest.Builder().build();
169 |
170 | RewardedAd.load(this, "ca-app-pub-6180386869505541/3716021870",
171 | adRequest, new RewardedAdLoadCallback() {
172 | @Override
173 | public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
174 | // Handle the error.
175 | Log.d(TAG1, loadAdError.getMessage());
176 | mRewardedAd = null;
177 | Log.d(TAG1, "Ad was loaded.");
178 | }
179 |
180 | @Override
181 | public void onAdLoaded(@NonNull RewardedAd rewardedAd) {
182 | mRewardedAd = rewardedAd;
183 | Log.d(TAG1, "Ad is loaded.");
184 |
185 | mRewardedAd.setFullScreenContentCallback(new FullScreenContentCallback() {
186 | @Override
187 | public void onAdShowedFullScreenContent() {
188 | // Called when ad is shown.
189 | Log.d(TAG1, "Ad was shown.");
190 | }
191 |
192 | @Override
193 | public void onAdFailedToShowFullScreenContent(AdError adError) {
194 | // Called when ad fails to show.
195 | Log.d(TAG1, "Ad failed to show.");
196 | }
197 |
198 | @Override
199 | public void onAdDismissedFullScreenContent() {
200 | // Called when ad is dismissed.
201 | // Set the ad reference to null so you don't show the ad a second time.
202 | Log.d(TAG1, "Ad was dismissed.");
203 | loadRewardedAd();
204 | }
205 | });
206 | }
207 | });
208 | }
209 |
210 |
211 | public static void SaveImage(Bitmap finalBitmap, String name, String identifier) {
212 |
213 | String root = path + "/" + identifier;
214 | File myDir = new File(root);
215 | myDir.mkdirs();
216 | String fname = name;
217 | File file = new File(myDir, fname);
218 | if (file.exists()) file.delete();
219 | try {
220 | FileOutputStream out = new FileOutputStream(file);
221 | finalBitmap.compress(Bitmap.CompressFormat.WEBP, 90, out);
222 | out.flush();
223 | out.close();
224 |
225 | } catch (Exception e) {
226 | e.printStackTrace();
227 | }
228 | }
229 |
230 | public static void SaveTryImage(Bitmap finalBitmap, String name, String identifier) {
231 |
232 | String root = path + "/" + identifier;
233 | File myDir = new File(root + "/" + "try");
234 | myDir.mkdirs();
235 | String fname = name.replace(".png","").replace(" ","_") + ".png";
236 | File file = new File(myDir, fname);
237 | if (file.exists()) file.delete();
238 | try {
239 | FileOutputStream out = new FileOutputStream(file);
240 | finalBitmap.compress(Bitmap.CompressFormat.PNG, 40, out);
241 | out.flush();
242 | out.close();
243 |
244 | } catch (Exception e) {
245 | e.printStackTrace();
246 | }
247 | }
248 |
249 |
250 | private void getPermissions() {
251 | int perm = ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
252 |
253 | if (perm != PackageManager.PERMISSION_GRANTED) {
254 | // We don't have permission so prompt the user
255 | ActivityCompat.requestPermissions(
256 | this,
257 | PERMISSIONS,
258 | 1
259 | );
260 | }
261 | }
262 |
263 |
264 | @Override
265 | public boolean onCreateOptionsMenu(Menu menu) {
266 | // Inflate the menu; this adds items to the action bar if it is present.
267 | getMenuInflater().inflate(R.menu.main_menu, menu);
268 |
269 | return super.onCreateOptionsMenu(menu);
270 | }
271 |
272 | @Override
273 | public boolean onOptionsItemSelected(MenuItem item) {
274 | switch(item.getItemId()) {
275 | case(R.id.about_me):
276 | startActivity(new Intent(MainActivity.this, about.class));
277 | break;
278 | case(R.id.action_donate):
279 | startActivity(new Intent(MainActivity.this, settings.class));
280 | break;
281 | case(R.id.discover_video):
282 | showReawardedAd();
283 | final RatingDialog ratingDialog = new RatingDialog.Builder(this)
284 | .session(1)
285 | .threshold(4)
286 | .ratingBarColor(R.color.yellow)
287 | .playstoreUrl("https://play.google.com/store/apps/details?id=com.codermert.sticker")
288 | .onRatingBarFormSumbit(new RatingDialog.Builder.RatingDialogFormListener() {
289 | @Override
290 | public void onFormSubmitted(String feedback) {
291 | Toast.makeText(getApplicationContext(), "Geri bildiriminiz için teşekkürler", Toast.LENGTH_SHORT).show();
292 | startActivity(new Intent(Intent.ACTION_VIEW,
293 | Uri.parse("https://twitter.com/codermert")));
294 | }
295 | })
296 | .build();
297 |
298 |
299 | ratingDialog.show();
300 | break;
301 | }
302 | return true;
303 | }
304 |
305 |
306 | @Override
307 | public void onListLoaded(String jsonResult, boolean jsonSwitch) {
308 | try {
309 | if (jsonResult != null) {
310 | try {
311 | JSONObject jsonResponse = new JSONObject(jsonResult);
312 | android_play_store_link = jsonResponse.getString("android_play_store_link");
313 | JSONArray jsonMainNode = jsonResponse.optJSONArray("sticker_packs");
314 | Log.d(TAG, "onListLoaded: " + jsonMainNode.length());
315 | for (int i = 0; i < jsonMainNode.length(); i++) {
316 | JSONObject jsonChildNode = jsonMainNode.getJSONObject(i);
317 | Log.d(TAG, "onListLoaded: " + jsonChildNode.getString("name"));
318 | stickerPacks.add(new StickerPack(
319 | jsonChildNode.getString("identifier"),
320 | jsonChildNode.getString("name"),
321 | jsonChildNode.getString("publisher"),
322 | getLastBitFromUrl(jsonChildNode.getString("tray_image_file")).replace(" ","_"),
323 | jsonChildNode.getString("publisher_email"),
324 | jsonChildNode.getString("publisher_website"),
325 | jsonChildNode.getString("privacy_policy_website"),
326 | jsonChildNode.getString("license_agreement_website")
327 | ));
328 | JSONArray stickers = jsonChildNode.getJSONArray("stickers");
329 | Log.d(TAG, "onListLoaded: " + stickers.length());
330 | for (int j = 0; j < stickers.length(); j++) {
331 | JSONObject jsonStickersChildNode = stickers.getJSONObject(j);
332 | mStickers.add(new Sticker(
333 | getLastBitFromUrl(jsonStickersChildNode.getString("image_file")).replace(".png",".webp"),
334 | mEmojis
335 | ));
336 | mDownloadFiles.add(jsonStickersChildNode.getString("image_file"));
337 | }
338 | Log.d(TAG, "onListLoaded: " + mStickers.size());
339 | Hawk.put(jsonChildNode.getString("identifier"), mStickers);
340 | stickerPacks.get(i).setAndroidPlayStoreLink(android_play_store_link);
341 | stickerPacks.get(i).setStickers(Hawk.get(jsonChildNode.getString("identifier"),new ArrayList()));
342 | /*stickerModels.add(new StickerModel(
343 | jsonChildNode.getString("name"),
344 | mStickers.get(0).imageFileName,
345 | mStickers.get(1).imageFileName,
346 | mStickers.get(2).imageFileName,
347 | mStickers.get(2).imageFileName,
348 | mDownloadFiles
349 | ));*/
350 | mStickers.clear();
351 | }
352 | Hawk.put("sticker_packs", stickerPacks);
353 | } catch (JSONException e) {
354 | e.printStackTrace();
355 | }
356 |
357 | adapter = new StickerAdapter(this, stickerPacks);
358 | recyclerView.setAdapter(adapter);
359 | }
360 |
361 |
362 | } catch (Exception e) {
363 | e.printStackTrace();
364 | }
365 |
366 | Log.d(TAG, "onListLoaded: " + stickerPacks.size());
367 |
368 | }
369 |
370 | private static String getLastBitFromUrl(final String url) {
371 | return url.replaceFirst(".*/([^/?]+).*", "$1");
372 | }
373 |
374 | private void showReawardedAd(){
375 | if (mRewardedAd != null) {
376 | Activity activityContext = MainActivity.this;
377 | mRewardedAd.show(activityContext, new OnUserEarnedRewardListener() {
378 | @Override
379 | public void onUserEarnedReward(@NonNull RewardItem rewardItem) {
380 | // Handle the reward.
381 | Log.d(TAG1, "The user earned the reward.");
382 | int rewardAmount = rewardItem.getAmount();
383 | String rewardType = rewardItem.getType();
384 |
385 |
386 | }
387 | });
388 | } else {
389 | Log.d(TAG1, "The rewarded ad wasn't ready yet.");
390 | }
391 | }
392 | }
393 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/ReactConstants.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | final class ReactConstants {
4 | //Color Constants
5 | static final String BLUE = "#FFFFFF";
6 | static final String RED_LOVE = "#FFFFFF";
7 | static final String RED_ANGRY = "#FFFFFF";
8 | static final String YELLOW_HAHA = "#FFFFFF";
9 | static final String YELLOW_WOW = "#FFFFFF";
10 | static final String GRAY = "#FFFFFF";
11 |
12 | //Text Constants
13 | static final String DEFAULT = "Default";
14 | static final String LIKE = "Paketi Beğendim WhatsApp'a Ekle";
15 | static final String LOVE = "Paketi Sevdim WhatsApp'a Ekle";
16 | static final String SMILE = "Paket Harika WhatsApp'a Ekle";
17 | static final String WOW = "Şahane Paket WhatsApp'a Ekle";
18 | static final String SAD = "Paketi Beğenmedim";
19 | static final String ANGRY = "Berbat Paket";
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/Sticker.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 |
6 | import java.util.List;
7 |
8 | public class Sticker implements Parcelable {
9 | public String imageFileName;
10 | public List emojis;
11 | public long size;
12 |
13 | public Sticker(String imageFileName, List emojis) {
14 | this.imageFileName = imageFileName;
15 | this.emojis = emojis;
16 | }
17 |
18 | protected Sticker(Parcel in) {
19 | imageFileName = in.readString();
20 | emojis = in.createStringArrayList();
21 | size = in.readLong();
22 | }
23 |
24 | public static final Creator CREATOR = new Creator() {
25 | @Override
26 | public Sticker createFromParcel(Parcel in) {
27 | return new Sticker(in);
28 | }
29 |
30 | @Override
31 | public Sticker[] newArray(int size) {
32 | return new Sticker[size];
33 | }
34 | };
35 |
36 | public void setSize(long size) {
37 | this.size = size;
38 | }
39 |
40 | @Override
41 | public int describeContents() {
42 | return 0;
43 | }
44 |
45 | @Override
46 | public void writeToParcel(Parcel dest, int flags) {
47 | dest.writeString(imageFileName);
48 | dest.writeStringList(emojis);
49 | dest.writeLong(size);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/StickerPack.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 |
6 | import java.util.List;
7 |
8 | public class StickerPack implements Parcelable {
9 | public String identifier;
10 | public String name;
11 | public String publisher;
12 | public String trayImageFile;
13 | public final String publisherEmail;
14 | public final String publisherWebsite;
15 | public final String privacyPolicyWebsite;
16 | public final String licenseAgreementWebsite;
17 |
18 | public String iosAppStoreLink;
19 | private List stickers;
20 | private long totalSize;
21 | public String androidPlayStoreLink;
22 | private boolean isWhitelisted;
23 |
24 | public StickerPack(String identifier, String name, String publisher, String trayImageFile, String publisherEmail, String publisherWebsite, String privacyPolicyWebsite, String licenseAgreementWebsite) {
25 | this.identifier = identifier;
26 | this.name = name;
27 | this.publisher = publisher;
28 | this.trayImageFile = trayImageFile;
29 | this.publisherEmail = publisherEmail;
30 | this.publisherWebsite = publisherWebsite;
31 | this.privacyPolicyWebsite = privacyPolicyWebsite;
32 | this.licenseAgreementWebsite = licenseAgreementWebsite;
33 | }
34 |
35 | public void setIsWhitelisted(boolean isWhitelisted) {
36 | this.isWhitelisted = isWhitelisted;
37 | }
38 |
39 | public boolean getIsWhitelisted() {
40 | return isWhitelisted;
41 | }
42 |
43 | protected StickerPack(Parcel in) {
44 | identifier = in.readString();
45 | name = in.readString();
46 | publisher = in.readString();
47 | trayImageFile = in.readString();
48 | publisherEmail = in.readString();
49 | publisherWebsite = in.readString();
50 | privacyPolicyWebsite = in.readString();
51 | licenseAgreementWebsite = in.readString();
52 | iosAppStoreLink = in.readString();
53 | stickers = in.createTypedArrayList(Sticker.CREATOR);
54 | totalSize = in.readLong();
55 | androidPlayStoreLink = in.readString();
56 | isWhitelisted = in.readByte() != 0;
57 | }
58 |
59 | public static final Creator CREATOR = new Creator() {
60 | @Override
61 | public StickerPack createFromParcel(Parcel in) {
62 | return new StickerPack(in);
63 | }
64 |
65 | @Override
66 | public StickerPack[] newArray(int size) {
67 | return new StickerPack[size];
68 | }
69 | };
70 |
71 | public void setStickers(List stickers) {
72 | this.stickers = stickers;
73 | totalSize = 0;
74 | for (Sticker sticker : stickers) {
75 | totalSize += sticker.size;
76 | }
77 | }
78 |
79 | public void setAndroidPlayStoreLink(String androidPlayStoreLink) {
80 | this.androidPlayStoreLink = androidPlayStoreLink;
81 | }
82 |
83 | public void setIosAppStoreLink(String iosAppStoreLink) {
84 | this.iosAppStoreLink = iosAppStoreLink;
85 | }
86 |
87 | public List getStickers() {
88 | return stickers;
89 | }
90 |
91 | public long getTotalSize() {
92 | return totalSize;
93 | }
94 |
95 | @Override
96 | public int describeContents() {
97 | return 0;
98 | }
99 |
100 | @Override
101 | public void writeToParcel(Parcel dest, int flags) {
102 | dest.writeString(identifier);
103 | dest.writeString(name);
104 | dest.writeString(publisher);
105 | dest.writeString(trayImageFile);
106 | dest.writeString(publisherEmail);
107 | dest.writeString(publisherWebsite);
108 | dest.writeString(privacyPolicyWebsite);
109 | dest.writeString(licenseAgreementWebsite);
110 | dest.writeString(iosAppStoreLink);
111 | dest.writeTypedList(stickers);
112 | dest.writeLong(totalSize);
113 | dest.writeString(androidPlayStoreLink);
114 | dest.writeByte((byte) (isWhitelisted ? 1 : 0));
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/about.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.os.Bundle;
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.view.View;
8 |
9 | import androidx.annotation.RequiresApi;
10 | import androidx.appcompat.app.AppCompatActivity;
11 |
12 | import com.google.android.gms.ads.AdRequest;
13 | import com.google.android.gms.ads.AdView;
14 | import com.shashank.sony.fancyaboutpagelib.FancyAboutPage;
15 |
16 |
17 |
18 | public class about extends AppCompatActivity {
19 |
20 |
21 |
22 | private AdView mAdView1;
23 |
24 | @SuppressLint("MissingPermission")
25 | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | setContentView(R.layout.activity_about);
30 |
31 |
32 |
33 |
34 | mAdView1 = findViewById(R.id.adView1);
35 | AdRequest adRequest = new AdRequest.Builder().build();
36 | mAdView1.loadAd(adRequest);
37 |
38 | setTitle("Hakkında");
39 | FancyAboutPage fancyAboutPage = findViewById(R.id.fancyaboutpage);
40 | //fancyAboutPage.setCoverTintColor(Color.BLUE); //Optional
41 | fancyAboutPage.setCover(R.drawable.coverimg);
42 | fancyAboutPage.setName("Coder Mert");
43 | fancyAboutPage.setDescription("Google Certified Android Developer");
44 | fancyAboutPage.setAppIcon(R.drawable.cakepop);
45 | fancyAboutPage.setAppName("Vizyonumuz");
46 | fancyAboutPage.setVersionNameAsAppSubTitle("Alfa\n");
47 | fancyAboutPage.setAppDescription("Harika şeyler, bireyler tarafından değil, harika bir ekip tarafından yapılır. Mütevazı bir lider ve bir aykırı değer tarafından yönetilen tutkulu bir harika ekip kurduk.\n\n" +
48 | "Biz sadece para için çalışmayan küçük, tutkulu bir ekibiz, insanların hayatlarına dokunmak ve insanlık için olumlu bir etki yaratmak için tutkuyla StickerOPS'u yaratan yaratıcılarız. Para bizim için hiçbir zaman bir cazibe olmadı. Gece yarısı yağ yakmamızı sağlayan amaçtır. Güçlü yönlerde oynamaya inanıyoruz ve herkesin oynayacak bir rolü var ve bunu mükemmel bir şekilde sunmak için birbirimize güveniyoruz ve harika bir sürecimiz var!\n\n" +
49 | "Teknolojiyi, tasarladığımız, kodladığımız, test ettiğimiz bir etki sağlamak için harika bir araç olarak kullanıyoruz. Bunu gerçekleştirmek için kan, ter ve gözyaşıyla çalışan, çılgın vizyona sahip küçük çılgın bir ekibiz!\n\nTelegram Bağış: @codermert\n\n Sevgilerle \n\nCoder Mert - Ankit - Hartawan - Yasin Tohan - Hayabusa\n\n\n\n");
50 | fancyAboutPage.addEmailLink("codermert@bk.ru");
51 | fancyAboutPage.addTwitterLink("https://twitter.com/codermert");
52 | fancyAboutPage.addLinkedinLink("https://www.linkedin.com/in/codermert/");
53 | fancyAboutPage.addGitHubLink("https://github.com/codermert");
54 |
55 |
56 |
57 |
58 | }
59 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/activity/StickerDetailsActivity.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers.activity;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.app.Activity;
5 | import android.content.ActivityNotFoundException;
6 | import android.content.Context;
7 | import android.content.Intent;
8 | import android.graphics.Color;
9 | import android.graphics.drawable.Drawable;
10 | import android.graphics.drawable.Icon;
11 | import android.media.MediaPlayer;
12 | import android.net.Uri;
13 | import android.os.Build;
14 | import android.os.Bundle;
15 |
16 | import androidx.annotation.NonNull;
17 | import androidx.annotation.RequiresApi;
18 | import androidx.annotation.Nullable;
19 | import androidx.appcompat.app.AppCompatActivity;
20 | import androidx.core.content.ContextCompat;
21 | import androidx.core.content.pm.ShortcutInfoCompat;
22 | import androidx.core.content.pm.ShortcutManagerCompat;
23 | import androidx.core.graphics.drawable.IconCompat;
24 | import androidx.recyclerview.widget.GridLayoutManager;
25 | import androidx.recyclerview.widget.RecyclerView;
26 | import androidx.appcompat.widget.Toolbar;
27 | import android.util.Log;
28 | import android.view.View;
29 | import android.widget.Button;
30 | import android.widget.Toast;
31 |
32 | import com.google.android.gms.ads.AdError;
33 | import com.google.android.gms.ads.AdRequest;
34 | import com.google.android.gms.ads.AdSize;
35 | import com.google.android.gms.ads.AdView;
36 | import com.google.android.gms.ads.FullScreenContentCallback;
37 | import com.google.android.gms.ads.LoadAdError;
38 | import com.google.android.gms.ads.MobileAds;
39 | import com.google.android.gms.ads.OnUserEarnedRewardListener;
40 | import com.google.android.gms.ads.initialization.InitializationStatus;
41 | import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
42 | import com.google.android.gms.ads.interstitial.InterstitialAd;
43 | import com.google.android.gms.ads.rewarded.RewardItem;
44 | import com.google.android.gms.ads.rewarded.RewardedAd;
45 | import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback;
46 | import com.viztushar.stickers.BuildConfig;
47 | import com.viztushar.stickers.FbReactions;
48 | import com.viztushar.stickers.MainActivity;
49 | import com.viztushar.stickers.R;
50 | import com.viztushar.stickers.Sticker;
51 | import com.viztushar.stickers.StickerPack;
52 | import com.viztushar.stickers.adapter.StickerDetailsAdapter;
53 |
54 | import java.io.File;
55 | import java.util.ArrayList;
56 | import java.util.List;
57 |
58 | import static com.viztushar.stickers.MainActivity.EXTRA_STICKER_PACK_AUTHORITY;
59 | import static com.viztushar.stickers.MainActivity.EXTRA_STICKER_PACK_ID;
60 | import static com.viztushar.stickers.MainActivity.EXTRA_STICKER_PACK_NAME;
61 |
62 | import com.amrdeveloper.reactbutton.ReactButton;
63 | import com.amrdeveloper.reactbutton.Reaction;
64 |
65 | import nl.dionsegijn.konfetti.KonfettiView;
66 | import nl.dionsegijn.konfetti.models.Shape;
67 | import nl.dionsegijn.konfetti.models.Size;
68 |
69 | public class StickerDetailsActivity extends AppCompatActivity {
70 |
71 | Context context;
72 |
73 |
74 | private static final int ADD_PACK = 200;
75 | private static final String TAG = StickerDetailsActivity.class.getSimpleName();
76 | StickerPack stickerPack;
77 | StickerDetailsAdapter adapter;
78 | Toolbar toolbar;
79 | RecyclerView recyclerView;
80 | List stickers;
81 | ArrayList strings;
82 | public static String path;
83 |
84 | final Context context1 = this;
85 | private RewardedAd mRewardedAd;
86 | private final String TAG1 = "--->AdMob";
87 | private static final String TAG2 = "MainActivity";
88 |
89 |
90 |
91 | @Override
92 | protected void onCreate(Bundle savedInstanceState) {
93 | super.onCreate(savedInstanceState);
94 | setContentView(R.layout.activity_sticker_details);
95 |
96 |
97 | final ReactButton reactButton = findViewById(R.id.add_to_whatsapp);
98 | reactButton.setReactions(FbReactions.reactions);
99 | reactButton.setDefaultReaction(FbReactions.defaultReact);
100 | reactButton.setEnableReactionTooltip(true);
101 |
102 |
103 | final Drawable drawable = ContextCompat.getDrawable(getApplicationContext(), R.drawable.ic_heart);
104 | final Shape.DrawableShape drawableShape = new Shape.DrawableShape(drawable, true);
105 |
106 | MobileAds.initialize(this, new OnInitializationCompleteListener() {
107 | @Override
108 | public void onInitializationComplete(InitializationStatus initializationStatus) {
109 | loadRewardedAd();
110 | }
111 | });
112 |
113 |
114 |
115 |
116 |
117 |
118 | stickerPack = getIntent().getParcelableExtra(MainActivity.EXTRA_STICKERPACK);
119 | toolbar = findViewById(R.id.toolbar);
120 |
121 | setSupportActionBar(toolbar);
122 | getSupportActionBar().setTitle(stickerPack.name);
123 | getSupportActionBar().setSubtitle(stickerPack.publisher);
124 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
125 | recyclerView = findViewById(R.id.recyclerView);
126 | stickers = stickerPack.getStickers();
127 | strings = new ArrayList<>();
128 | path = getFilesDir() + "/" + "stickers_asset" + "/" + stickerPack.identifier + "/";
129 | File file = new File(path + stickers.get(0).imageFileName);
130 | Log.d(TAG, "onCreate: " +path + stickers.get(0).imageFileName);
131 | for (Sticker s : stickers) {
132 | if (!file.exists()) {
133 | strings.add(s.imageFileName);
134 | } else {
135 | strings.add(path + s.imageFileName);
136 | }
137 | }
138 | adapter = new StickerDetailsAdapter(strings, this);
139 | GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 4);
140 | recyclerView.setLayoutManager(gridLayoutManager);
141 | recyclerView.setAdapter(adapter);
142 |
143 |
144 |
145 |
146 |
147 | reactButton.setOnClickListener(new View.OnClickListener() {
148 | @Override
149 | public void onClick(View view) {
150 |
151 | try {
152 |
153 | if (mRewardedAd != null) {
154 | showRewardedAd();
155 |
156 | } else {
157 | Log.d("---AdMob", "The interstitial ad wasn't ready yet.");
158 | Toast.makeText(getApplicationContext(), "Reklam yüklenmedi tekrar deneyin", Toast.LENGTH_SHORT).show();
159 | }
160 | } catch (ActivityNotFoundException e) {
161 | Toast.makeText(StickerDetailsActivity.this, "Sanırım WhatsApp yüklü değil veya paketiniz orijinal değil", Toast.LENGTH_LONG).show();
162 | }
163 | }
164 | });
165 |
166 |
167 |
168 |
169 | }
170 |
171 | private void loadRewardedAd() {
172 | AdRequest adRequest = new AdRequest.Builder().build();
173 |
174 | RewardedAd.load(this, "ca-app-pub-3940256099942544/5224354917",
175 | adRequest, new RewardedAdLoadCallback() {
176 | @Override
177 | public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
178 | // Handle the error.
179 | Log.d(TAG1, loadAdError.getMessage());
180 | mRewardedAd = null;
181 | }
182 |
183 | @Override
184 | public void onAdLoaded(@NonNull RewardedAd rewardedAd) {
185 | mRewardedAd = rewardedAd;
186 | Log.d(TAG1, "Ad was loaded.");
187 |
188 | mRewardedAd.setFullScreenContentCallback(new FullScreenContentCallback() {
189 | @Override
190 | public void onAdShowedFullScreenContent() {
191 | // Called when ad is shown.
192 | Log.d(TAG1, "Ad was shown.");
193 | }
194 |
195 | @Override
196 | public void onAdFailedToShowFullScreenContent(AdError adError) {
197 | // Called when ad fails to show.
198 | Log.d(TAG1, "Ad failed to show.");
199 | }
200 |
201 | @Override
202 | public void onAdDismissedFullScreenContent() {
203 | // Called when ad is dismissed.
204 | // Set the ad reference to null so you don't show the ad a second time.
205 | Log.d(TAG1, "Ad was dismissed.");
206 | loadRewardedAd();
207 | Intent intent = new Intent();
208 | intent.setAction("com.whatsapp.intent.action.ENABLE_STICKER_PACK");
209 | intent.putExtra(EXTRA_STICKER_PACK_ID, stickerPack.identifier);
210 | intent.putExtra(EXTRA_STICKER_PACK_AUTHORITY, BuildConfig.CONTENT_PROVIDER_AUTHORITY);
211 | intent.putExtra(EXTRA_STICKER_PACK_NAME, stickerPack.name);
212 | startActivityForResult(intent, ADD_PACK);
213 | final KonfettiView konfettiView = findViewById(R.id.konfettiView);
214 | konfettiView.build()
215 | .addColors(Color.YELLOW, Color.DKGRAY, Color.RED)
216 | .setDirection(0.0, 359.0)
217 | .setSpeed(1f, 5f)
218 | .setFadeOutEnabled(true)
219 | .setTimeToLive(2000L)
220 | .addShapes(Shape.Square.INSTANCE, Shape.Circle.INSTANCE)
221 | .addSizes(new Size(12, 5f))
222 | .setPosition(-50f, konfettiView.getWidth() + 50f, -50f, -50f)
223 | .streamFor(300, 5000L);
224 | }
225 | });
226 | }
227 | });
228 | }
229 | private void showRewardedAd(){
230 | if (mRewardedAd != null) {
231 | Activity activityContext = StickerDetailsActivity.this;
232 | mRewardedAd.show(activityContext, new OnUserEarnedRewardListener() {
233 | @Override
234 | public void onUserEarnedReward(@NonNull RewardItem rewardItem) {
235 | // Handle the reward.
236 | Log.d(TAG1, "The user earned the reward.");
237 | int rewardAmount = rewardItem.getAmount();
238 | String rewardType = rewardItem.getType();
239 | }
240 | });
241 | } else {
242 | Log.d(TAG1, "The rewarded ad wasn't ready yet.");
243 | }
244 | }
245 |
246 | }
247 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/adapter/StickerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers.adapter;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.app.Activity;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.graphics.Bitmap;
8 | import android.graphics.Canvas;
9 | import android.graphics.Color;
10 | import android.graphics.Matrix;
11 | import androidx.annotation.NonNull;
12 | import androidx.annotation.Nullable;
13 | import androidx.core.app.ActivityOptionsCompat;
14 | import androidx.cardview.widget.CardView;
15 | import androidx.recyclerview.widget.RecyclerView;
16 |
17 | import android.util.Log;
18 | import android.view.LayoutInflater;
19 | import android.view.View;
20 | import android.view.ViewGroup;
21 | import android.widget.ImageView;
22 | import android.widget.ProgressBar;
23 | import android.widget.RelativeLayout;
24 | import android.widget.TextView;
25 | import android.widget.Toast;
26 |
27 | import com.bumptech.glide.Glide;
28 | import com.bumptech.glide.load.DataSource;
29 | import com.bumptech.glide.load.engine.GlideException;
30 | import com.bumptech.glide.request.RequestListener;
31 | import com.bumptech.glide.request.RequestOptions;
32 | import com.bumptech.glide.request.target.Target;
33 | import com.varunjohn1990.iosdialogs4android.IOSDialog;
34 | import com.viztushar.stickers.MainActivity;
35 | import com.viztushar.stickers.R;
36 | import com.viztushar.stickers.Sticker;
37 | import com.viztushar.stickers.StickerPack;
38 | import com.viztushar.stickers.activity.StickerDetailsActivity;
39 |
40 | import java.io.File;
41 | import java.util.ArrayList;
42 | import java.util.List;
43 |
44 | import static com.viztushar.stickers.MainActivity.EXTRA_STICKERPACK;
45 |
46 | public class StickerAdapter extends RecyclerView.Adapter {
47 |
48 | Context context;
49 | ArrayList StickerPack;
50 |
51 | public StickerAdapter(Context context, ArrayList StickerPack) {
52 | this.context = context;
53 | this.StickerPack = StickerPack;
54 | }
55 |
56 | @NonNull
57 | @Override
58 | public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
59 | View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.list_item_sticker, viewGroup, false);
60 | return new ViewHolder(view);
61 | }
62 |
63 | @Override
64 | public void onBindViewHolder(@NonNull final ViewHolder viewHolder, @SuppressLint("RecyclerView") final int i) {
65 | final List models = StickerPack.get(i).getStickers();
66 | viewHolder.name.setText(StickerPack.get(i).name);
67 | final String url = "https://raw.githubusercontent.com/codermert/image-name-changer/master/stickers/";
68 | Glide.with(context)
69 | .load(url + models.get(0).imageFileName.replace(".webp",".png"))
70 | .into(viewHolder.imone);
71 |
72 | Glide.with(context)
73 | .load(url + models.get(1).imageFileName.replace(".webp",".png"))
74 | .into(viewHolder.imtwo);
75 |
76 | Glide.with(context)
77 | .load(url + models.get(2).imageFileName.replace(".webp",".png"))
78 | .into(viewHolder.imthree);
79 |
80 | if (models.size() > 3) {
81 | Glide.with(context)
82 | .load(url + models.get(3).imageFileName.replace(".webp",".png"))
83 | .into(viewHolder.imfour);
84 | } else {
85 | viewHolder.imfour.setVisibility(View.INVISIBLE);
86 | }
87 |
88 | Glide.with(context)
89 | .asBitmap()
90 | .load("https://googlechrome.github.io/samples/picture-element/images/" + StickerPack.get(i).trayImageFile.replace("_"," "))
91 | .addListener(new RequestListener() {
92 | @Override
93 | public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) {
94 | return false;
95 | }
96 |
97 | @Override
98 | public boolean onResourceReady(Bitmap resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) {
99 | Bitmap bitmap1 = Bitmap.createBitmap(96, 96, Bitmap.Config.ARGB_8888);
100 | Matrix matrix = new Matrix();
101 | Canvas canvas = new Canvas(bitmap1);
102 | canvas.drawColor(Color.TRANSPARENT);
103 | matrix.postTranslate(
104 | canvas.getWidth() / 2 - resource.getWidth() / 2,
105 | canvas.getHeight() / 2 - resource.getHeight() / 2
106 | );
107 | canvas.drawBitmap(resource, matrix, null);
108 | MainActivity.SaveTryImage(bitmap1,StickerPack.get(i).trayImageFile,StickerPack.get(i).identifier);
109 | return false;
110 | }
111 | })
112 | .submit();
113 | viewHolder.cardView.setOnClickListener(new View.OnClickListener() {
114 | @Override
115 | public void onClick(View v) {
116 | context.startActivity(new Intent(context, StickerDetailsActivity.class)
117 | .putExtra(EXTRA_STICKERPACK, StickerPack.get(viewHolder.getAdapterPosition())),
118 | ActivityOptionsCompat.makeScaleUpAnimation(v, (int) v.getX(), (int) v.getY(), v.getWidth(),
119 | v.getHeight()).toBundle());
120 | }
121 | });
122 |
123 | File file = new File(MainActivity.path + "/" + StickerPack.get(i).identifier + "/" + models.get(0).imageFileName);
124 | if (!file.exists()) {
125 | viewHolder.rl.setOnClickListener(new View.OnClickListener() {
126 | @Override
127 | public void onClick(View view) {
128 | Log.d("adapter", "onClick: " + StickerPack.get(viewHolder.getAdapterPosition()).getStickers().size());
129 | ((Activity) context).runOnUiThread(
130 | new Runnable() {
131 | @Override
132 | public void run() {
133 | viewHolder.download.setVisibility(View.VISIBLE);
134 | viewHolder.bar.setVisibility(View.VISIBLE);
135 | Toast.makeText(context.getApplicationContext(), "Lütfen bekleyin", Toast.LENGTH_SHORT).show();
136 | for (final Sticker s : StickerPack.get(viewHolder.getAdapterPosition()).getStickers()) {
137 | Log.d("adapter", "onClick: " + s.imageFileName);
138 | Glide.with(context)
139 | .asBitmap()
140 | .apply(new RequestOptions().override(512, 512))
141 | .load(url + s.imageFileName.replace(".webp",".png"))
142 | .addListener(new RequestListener() {
143 | @Override
144 | public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) {
145 | return false;
146 | }
147 |
148 | @Override
149 | public boolean onResourceReady(Bitmap resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) {
150 | Bitmap bitmap1 = Bitmap.createBitmap(512, 512, Bitmap.Config.ARGB_8888);
151 | Matrix matrix = new Matrix();
152 | Canvas canvas = new Canvas(bitmap1);
153 | canvas.drawColor(Color.TRANSPARENT);
154 | matrix.postTranslate(
155 | canvas.getWidth() / 2 - resource.getWidth() / 2,
156 | canvas.getHeight() / 2 - resource.getHeight() / 2
157 | );
158 | canvas.drawBitmap(resource, matrix, null);
159 | MainActivity.SaveImage(bitmap1, s.imageFileName, StickerPack.get(viewHolder.getAdapterPosition()).identifier);
160 | return true;
161 | }
162 | }).submit();
163 | }
164 | viewHolder.download.setVisibility(View.VISIBLE);
165 | viewHolder.bar.setVisibility(View.INVISIBLE);
166 | new IOSDialog.Builder(context.getApplicationContext())
167 | .message("Hey! Çıkartma paketi indirildi şimdi de paketi WhatsApp'a ekle\nArkadaşlarına sticker gönder tadını yaşa\uD83C\uDF89") // String or String Resource ID
168 | .build()
169 | .show();
170 | }
171 | }
172 | );
173 |
174 | }
175 | });
176 | } else {
177 | viewHolder.rl.setVisibility(View.VISIBLE);
178 | }
179 |
180 | }
181 |
182 | @Override
183 | public int getItemCount() {
184 | return StickerPack.size();
185 | }
186 |
187 | public class ViewHolder extends RecyclerView.ViewHolder {
188 |
189 | TextView name;
190 | ImageView imone, imtwo, imthree, imfour, download;
191 | CardView cardView;
192 | ProgressBar bar;
193 | RelativeLayout rl;
194 |
195 | public ViewHolder(@NonNull View itemView) {
196 | super(itemView);
197 |
198 | name = itemView.findViewById(R.id.rv_sticker_name);
199 | imone = itemView.findViewById(R.id.sticker_one);
200 | imtwo = itemView.findViewById(R.id.sticker_two);
201 | imthree = itemView.findViewById(R.id.sticker_three);
202 | imfour = itemView.findViewById(R.id.sticker_four);
203 | download = itemView.findViewById(R.id.download);
204 | cardView = itemView.findViewById(R.id.card_view);
205 | bar = itemView.findViewById(R.id.progressBar);
206 | rl = itemView.findViewById(R.id.download_layout);
207 | }
208 | }
209 | }
210 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/adapter/StickerDetailsAdapter.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers.adapter;
2 |
3 | import android.content.Context;
4 | import android.net.Uri;
5 | import androidx.annotation.NonNull;
6 | import androidx.recyclerview.widget.RecyclerView;
7 | import android.util.Log;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.ImageView;
12 |
13 | import com.bumptech.glide.Glide;
14 | import com.bumptech.glide.Priority;
15 | import com.bumptech.glide.load.engine.DiskCacheStrategy;
16 | import com.bumptech.glide.request.RequestOptions;
17 | import com.viztushar.stickers.R;
18 |
19 | import java.io.ByteArrayOutputStream;
20 | import java.io.FileInputStream;
21 | import java.io.IOException;
22 | import java.io.InputStream;
23 | import java.util.ArrayList;
24 |
25 | public class StickerDetailsAdapter extends RecyclerView.Adapter {
26 |
27 | ArrayList strings;
28 | Context context;
29 | String id;
30 |
31 | public StickerDetailsAdapter(ArrayList strings, Context context) {
32 | this.strings = strings;
33 | this.context = context;
34 | }
35 |
36 | @NonNull
37 | @Override
38 | public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
39 | View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.list_item_image, viewGroup, false);
40 | return new ViewHolder(view);
41 | }
42 |
43 | @Override
44 | public void onBindViewHolder(@NonNull ViewHolder viewHolder, final int i) {
45 |
46 | InputStream iStream = null;
47 | RequestOptions options = new RequestOptions()
48 | .centerCrop()
49 | .placeholder(R.drawable.sticker_error)
50 | .diskCacheStrategy(DiskCacheStrategy.ALL)
51 | .priority(Priority.HIGH)
52 | .dontAnimate()
53 | .dontTransform();
54 | try {
55 | Log.d("adapter 2", "onBindViewHolder: " + strings.get(i));
56 | if (strings.get(i).endsWith(".jpg")) {
57 | Glide.with(context)
58 | .asBitmap()
59 | .load(Uri.parse(strings.get(i)))
60 | .apply(new RequestOptions().override(512, 512))
61 | .into(viewHolder.imageView);
62 | } else {
63 | if (!strings.get(i).endsWith(".png")) {
64 | iStream = new FileInputStream( strings.get(i));
65 | Glide.with(context)
66 | .asBitmap()
67 | .load(getBytes(iStream))
68 | .into(viewHolder.imageView);
69 | }
70 | }
71 | } catch (IOException e) {
72 | e.printStackTrace();
73 | }
74 |
75 |
76 | }
77 |
78 | @Override
79 | public int getItemCount() {
80 | return strings.size();
81 | }
82 |
83 | public class ViewHolder extends RecyclerView.ViewHolder {
84 | ImageView imageView;
85 |
86 | public ViewHolder(@NonNull View itemView) {
87 | super(itemView);
88 | imageView = itemView.findViewById(R.id.sticker_image);
89 | }
90 | }
91 |
92 | public byte[] getBytes(InputStream inputStream) throws IOException {
93 | ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
94 | int bufferSize = 1024;
95 | byte[] buffer = new byte[bufferSize];
96 |
97 | int len = 0;
98 | while ((len = inputStream.read(buffer)) != -1) {
99 | byteBuffer.write(buffer, 0, len);
100 | }
101 | return byteBuffer.toByteArray();
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/app/Application.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers.app;
2 |
3 | import androidx.multidex.MultiDexApplication;
4 |
5 |
6 | import com.orhanobut.hawk.Hawk;
7 |
8 | public class Application extends MultiDexApplication {
9 |
10 | @Override
11 | public void onCreate() {
12 | super.onCreate();
13 | Hawk.init(this).build();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/model/StickerModel.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers.model;
2 |
3 | import java.util.List;
4 |
5 | public class StickerModel {
6 |
7 | public String stickerName;
8 | public String image_one;
9 | public String image_two;
10 | public String image_three;
11 | public String image_four;
12 | public List downloadFile;
13 |
14 | public StickerModel(String stickerName, String image_one, String image_two, String image_three, String image_four, List downloadFile) {
15 | this.stickerName = stickerName;
16 | this.image_one = image_one;
17 | this.image_two = image_two;
18 | this.image_three = image_three;
19 | this.image_four = image_four;
20 | this.downloadFile = downloadFile;
21 | }
22 |
23 | public String getStickerName() {
24 | return stickerName;
25 | }
26 |
27 | public void setStickerName(String stickerName) {
28 | this.stickerName = stickerName;
29 | }
30 |
31 | public String getImage_one() {
32 | return image_one;
33 | }
34 |
35 | public void setImage_one(String image_one) {
36 | this.image_one = image_one;
37 | }
38 |
39 | public String getImage_two() {
40 | return image_two;
41 | }
42 |
43 | public void setImage_two(String image_two) {
44 | this.image_two = image_two;
45 | }
46 |
47 | public String getImage_three() {
48 | return image_three;
49 | }
50 |
51 | public void setImage_three(String image_three) {
52 | this.image_three = image_three;
53 | }
54 |
55 | public String getImage_four() {
56 | return image_four;
57 | }
58 |
59 | public void setImage_four(String image_four) {
60 | this.image_four = image_four;
61 | }
62 |
63 | public List getDownloadFile() {
64 | return downloadFile;
65 | }
66 |
67 | public void setDownloadFile(List downloadFile) {
68 | this.downloadFile = downloadFile;
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/provider/StickerContentProvider.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers.provider;
2 |
3 | import android.content.ContentProvider;
4 | import android.content.ContentValues;
5 | import android.content.Context;
6 | import android.content.UriMatcher;
7 | import android.content.res.AssetFileDescriptor;
8 | import android.content.res.AssetManager;
9 | import android.database.Cursor;
10 | import android.database.MatrixCursor;
11 | import android.net.Uri;
12 | import android.os.Build;
13 | import android.os.ParcelFileDescriptor;
14 | import androidx.annotation.NonNull;
15 | import androidx.annotation.Nullable;
16 | import androidx.annotation.RequiresApi;
17 | import android.text.TextUtils;
18 | import android.util.Log;
19 |
20 | import com.orhanobut.hawk.Hawk;
21 | import com.viztushar.stickers.BuildConfig;
22 | import com.viztushar.stickers.Sticker;
23 | import com.viztushar.stickers.StickerPack;
24 |
25 | import java.io.File;
26 | import java.io.FileNotFoundException;
27 | import java.io.IOException;
28 | import java.util.ArrayList;
29 | import java.util.Collections;
30 | import java.util.List;
31 | import java.util.Objects;
32 |
33 | @RequiresApi(api = Build.VERSION_CODES.KITKAT)
34 | public class StickerContentProvider extends ContentProvider {
35 |
36 |
37 | /**
38 | * Do not change the strings listed below, as these are used by WhatsApp. And changing these will break the interface between sticker app and WhatsApp.
39 | */
40 | public static final String STICKER_PACK_IDENTIFIER_IN_QUERY = "sticker_pack_identifier";
41 | public static final String STICKER_PACK_NAME_IN_QUERY = "sticker_pack_name";
42 | public static final String STICKER_PACK_PUBLISHER_IN_QUERY = "sticker_pack_publisher";
43 | public static final String STICKER_PACK_ICON_IN_QUERY = "sticker_pack_icon";
44 | public static final String ANDROID_APP_DOWNLOAD_LINK_IN_QUERY = "android_play_store_link";
45 | public static final String IOS_APP_DOWNLOAD_LINK_IN_QUERY = "ios_app_download_link";
46 | public static final String PUBLISHER_EMAIL = "sticker_pack_publisher_email";
47 | public static final String PUBLISHER_WEBSITE = "sticker_pack_publisher_website";
48 | public static final String PRIVACY_POLICY_WEBSITE = "sticker_pack_privacy_policy_website";
49 | public static final String LICENSE_AGREENMENT_WEBSITE = "sticker_pack_license_agreement_website";
50 |
51 | public static final String STICKER_FILE_NAME_IN_QUERY = "sticker_file_name";
52 | public static final String STICKER_FILE_EMOJI_IN_QUERY = "sticker_emoji";
53 | public static final String CONTENT_FILE_NAME = "contents.json";
54 |
55 | public static final String CONTENT_SCHEME = "content";
56 | private static final String TAG = StickerContentProvider.class.getSimpleName();
57 | public static Uri AUTHORITY_URI = new Uri.Builder().scheme(StickerContentProvider.CONTENT_SCHEME).authority(BuildConfig.CONTENT_PROVIDER_AUTHORITY).appendPath(StickerContentProvider.METADATA).build();
58 |
59 | /**
60 | * Do not change the values in the UriMatcher because otherwise, WhatsApp will not be able to fetch the stickers from the ContentProvider.
61 | */
62 | private static final UriMatcher MATCHER = new UriMatcher(UriMatcher.NO_MATCH);
63 | static final String METADATA = "metadata";
64 | private static final int METADATA_CODE = 1;
65 |
66 | private static final int METADATA_CODE_FOR_SINGLE_PACK = 2;
67 |
68 | static final String STICKERS = "stickers";
69 | private static final int STICKERS_CODE = 3;
70 |
71 | static final String STICKERS_ASSET = "stickers_asset";
72 | private static final int STICKERS_ASSET_CODE = 4;
73 |
74 | private static final int STICKER_PACK_TRAY_ICON_CODE = 5;
75 |
76 | private List stickerPackList = new ArrayList<>();
77 |
78 |
79 | @Override
80 | public boolean onCreate() {
81 | Hawk.init(getContext()).build();
82 | final String authority = BuildConfig.CONTENT_PROVIDER_AUTHORITY;
83 | if (!authority.startsWith(Objects.requireNonNull(getContext()).getPackageName())) {
84 | throw new IllegalStateException("your authority (" + authority + ") for the content provider should start with your package name: " + getContext().getPackageName());
85 | }
86 |
87 | //the call to get the metadata for the sticker packs.
88 | MATCHER.addURI(authority, METADATA, METADATA_CODE);
89 |
90 | //the call to get the metadata for single sticker pack. * represent the identifier
91 | MATCHER.addURI(authority, METADATA + "/*", METADATA_CODE_FOR_SINGLE_PACK);
92 |
93 | //gets the list of stickers for a sticker pack, * respresent the identifier.
94 | MATCHER.addURI(authority, STICKERS + "/*", STICKERS_CODE);
95 |
96 | for (StickerPack stickerPack : getStickerPackList()) {
97 | Log.e(TAG, "onCreate: " + stickerPack.identifier);
98 | MATCHER.addURI(authority, STICKERS_ASSET + "/" + stickerPack.identifier + "/" + stickerPack.trayImageFile, STICKER_PACK_TRAY_ICON_CODE);
99 | if (stickerPack.getStickers() != null) {
100 | for (Sticker sticker : stickerPack.getStickers()) {
101 | MATCHER.addURI(authority, STICKERS_ASSET + "/" + stickerPack.identifier + "/" + sticker.imageFileName, STICKERS_ASSET_CODE);
102 | }
103 |
104 | }
105 | }
106 |
107 | return true;
108 | }
109 |
110 | @Override
111 | public Cursor query(@NonNull Uri uri, @Nullable String[] projection, String selection,
112 | String[] selectionArgs, String sortOrder) {
113 | final int code = MATCHER.match(uri);
114 | Log.d(TAG, "query: " + code + uri);
115 | if (code == METADATA_CODE) {
116 | return getPackForAllStickerPacks(uri);
117 | } else if (code == METADATA_CODE_FOR_SINGLE_PACK) {
118 | return getCursorForSingleStickerPack(uri);
119 | } else if (code == STICKERS_CODE) {
120 | return getStickersForAStickerPack(uri);
121 | } else {
122 | throw new IllegalArgumentException("Unknown URI: " + uri);
123 | }
124 | }
125 |
126 | @Nullable
127 | @Override
128 | public AssetFileDescriptor openAssetFile(@NonNull Uri uri, @NonNull String mode) throws FileNotFoundException {
129 | MATCHER.match(uri);
130 | final int matchCode = MATCHER.match(uri);
131 | final List pathSegments = uri.getPathSegments();
132 | Log.d(TAG, "openFile: " + matchCode + uri + "\n" + uri.getAuthority()
133 | + "\n" + pathSegments.get(pathSegments.size() - 3) + "/"
134 | + "\n" + pathSegments.get(pathSegments.size() - 2) + "/"
135 | + "\n" + pathSegments.get(pathSegments.size() - 1));
136 |
137 | return getImageAsset(uri);
138 | }
139 |
140 |
141 | private AssetFileDescriptor getImageAsset(Uri uri) throws IllegalArgumentException {
142 | AssetManager am = Objects.requireNonNull(getContext()).getAssets();
143 | final List pathSegments = uri.getPathSegments();
144 | if (pathSegments.size() != 3) {
145 | throw new IllegalArgumentException("path segments should be 3, uri is: " + uri);
146 | }
147 | String fileName = pathSegments.get(pathSegments.size() - 1);
148 | final String identifier = pathSegments.get(pathSegments.size() - 2);
149 | if (TextUtils.isEmpty(identifier)) {
150 | throw new IllegalArgumentException("identifier is empty, uri: " + uri);
151 | }
152 | if (TextUtils.isEmpty(fileName)) {
153 | throw new IllegalArgumentException("file name is empty, uri: " + uri);
154 | }
155 | //making sure the file that is trying to be fetched is in the list of stickers.
156 | for (StickerPack stickerPack : getStickerPackList()) {
157 | if (identifier.equals(stickerPack.identifier)) {
158 | if (fileName.equals(stickerPack.trayImageFile)) {
159 | return fetchFile(uri, am, fileName, identifier);
160 | } else {
161 | for (Sticker sticker : stickerPack.getStickers()) {
162 | if (fileName.equals(sticker.imageFileName)) {
163 | return fetchFile(uri, am, fileName, identifier);
164 | }
165 | }
166 | }
167 | }
168 | }
169 | return null;
170 | }
171 |
172 | private AssetFileDescriptor fetchFile(@NonNull Uri uri, @NonNull AssetManager am, @NonNull String fileName, @NonNull String identifier) {
173 | try {
174 | File file;
175 | if(fileName.endsWith(".png")){
176 | file = new File(getContext().getFilesDir()+ "/" + "stickers_asset" + "/" + identifier + "/try/", fileName);
177 | } else {
178 | file = new File(getContext().getFilesDir()+ "/" + "stickers_asset" + "/" + identifier + "/", fileName);
179 | }
180 | if (!file.exists()) {
181 | Log.d("fetFile", "StickerPack dir not found");
182 | }
183 | Log.d("fetchFile", "StickerPack " + file.getPath());
184 | return new AssetFileDescriptor(ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY), 0L, -1L);
185 | } catch (IOException e) {
186 | Log.e(Objects.requireNonNull(getContext()).getPackageName(), "IOException when getting asset file, uri:" + uri, e);
187 | return null;
188 | }
189 | }
190 |
191 |
192 | @Override
193 | public String getType(@NonNull Uri uri) {
194 | final int matchCode = MATCHER.match(uri);
195 | switch (matchCode) {
196 | case METADATA_CODE:
197 | return "vnd.android.cursor.dir/vnd." + BuildConfig.CONTENT_PROVIDER_AUTHORITY + "." + METADATA;
198 | case METADATA_CODE_FOR_SINGLE_PACK:
199 | return "vnd.android.cursor.item/vnd." + BuildConfig.CONTENT_PROVIDER_AUTHORITY + "." + METADATA;
200 | case STICKERS_CODE:
201 | return "vnd.android.cursor.dir/vnd." + BuildConfig.CONTENT_PROVIDER_AUTHORITY + "." + STICKERS;
202 | case STICKERS_ASSET_CODE:
203 | return "image/webp";
204 | case STICKER_PACK_TRAY_ICON_CODE:
205 | return "image/png";
206 | default:
207 | throw new IllegalArgumentException("Unknown URI: " + uri);
208 | }
209 | }
210 |
211 | private synchronized void readContentFile(@NonNull Context context) {
212 | if (Hawk.get("sticker_pack", new ArrayList()) != null) {
213 | stickerPackList.addAll(Hawk.get("sticker_pack", new ArrayList()));
214 | }
215 | }
216 |
217 | public List getStickerPackList() {
218 | /* if (stickerPackList == null) {
219 | readContentFile(Objects.requireNonNull(getContext()));
220 | }*/
221 | return (List)Hawk.get("sticker_packs",new ArrayList());
222 | }
223 |
224 | private Cursor getPackForAllStickerPacks(@NonNull Uri uri) {
225 | return getStickerPackInfo(uri, getStickerPackList());
226 | }
227 |
228 | private Cursor getCursorForSingleStickerPack(@NonNull Uri uri) {
229 | final String identifier = uri.getLastPathSegment();
230 | for (StickerPack stickerPack : getStickerPackList()) {
231 | if (identifier.equals(stickerPack.identifier)) {
232 | return getStickerPackInfo(uri, Collections.singletonList(stickerPack));
233 | }
234 | }
235 |
236 | return getStickerPackInfo(uri, new ArrayList());
237 | }
238 |
239 | @NonNull
240 | private Cursor getStickerPackInfo(@NonNull Uri uri, @NonNull List stickerPackList) {
241 | MatrixCursor cursor = new MatrixCursor(
242 | new String[]{
243 | STICKER_PACK_IDENTIFIER_IN_QUERY,
244 | STICKER_PACK_NAME_IN_QUERY,
245 | STICKER_PACK_PUBLISHER_IN_QUERY,
246 | STICKER_PACK_ICON_IN_QUERY,
247 | ANDROID_APP_DOWNLOAD_LINK_IN_QUERY,
248 | IOS_APP_DOWNLOAD_LINK_IN_QUERY,
249 | PUBLISHER_EMAIL,
250 | PUBLISHER_WEBSITE,
251 | PRIVACY_POLICY_WEBSITE,
252 | LICENSE_AGREENMENT_WEBSITE
253 | });
254 | for (StickerPack stickerPack : stickerPackList) {
255 | MatrixCursor.RowBuilder builder = cursor.newRow();
256 | builder.add(stickerPack.identifier);
257 | builder.add(stickerPack.name);
258 | builder.add(stickerPack.publisher);
259 | builder.add(stickerPack.trayImageFile);
260 | builder.add(stickerPack.androidPlayStoreLink);
261 | builder.add(stickerPack.iosAppStoreLink);
262 | builder.add(stickerPack.publisherEmail);
263 | builder.add(stickerPack.publisherWebsite);
264 | builder.add(stickerPack.privacyPolicyWebsite);
265 | builder.add(stickerPack.licenseAgreementWebsite);
266 | }
267 | Log.d(TAG, "getStickerPackInfo: " + stickerPackList.size());
268 | cursor.setNotificationUri(Objects.requireNonNull(getContext()).getContentResolver(), uri);
269 | return cursor;
270 | }
271 |
272 | @NonNull
273 | private Cursor getStickersForAStickerPack(@NonNull Uri uri) {
274 | final String identifier = uri.getLastPathSegment();
275 | MatrixCursor cursor = new MatrixCursor(new String[]{STICKER_FILE_NAME_IN_QUERY, STICKER_FILE_EMOJI_IN_QUERY});
276 | for (StickerPack stickerPack : getStickerPackList()) {
277 | if (identifier.equals(stickerPack.identifier)) {
278 | for (Sticker sticker : stickerPack.getStickers()) {
279 | cursor.addRow(new Object[]{sticker.imageFileName, TextUtils.join(",", sticker.emojis)});
280 | }
281 | }
282 | }
283 | cursor.setNotificationUri(Objects.requireNonNull(getContext()).getContentResolver(), uri);
284 | return cursor;
285 | }
286 |
287 |
288 | @Override
289 | public int delete(@NonNull Uri uri, @Nullable String selection, String[] selectionArgs) {
290 | throw new UnsupportedOperationException("Not supported");
291 | }
292 |
293 | @Override
294 | public Uri insert(@NonNull Uri uri, ContentValues values) {
295 | throw new UnsupportedOperationException("Not supported");
296 | }
297 |
298 | @Override
299 | public int update(@NonNull Uri uri, ContentValues values, String selection,
300 | String[] selectionArgs) {
301 | throw new UnsupportedOperationException("Not supported");
302 | }
303 | }
304 |
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/settings.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.annotation.SuppressLint;
6 | import android.os.Bundle;
7 |
8 | import com.google.android.gms.ads.AdRequest;
9 |
10 | import java.util.ArrayList;
11 | import xute.storyview.StoryModel;
12 | import xute.storyview.StoryView;
13 | import com.google.android.gms.ads.AdRequest;
14 | import com.google.android.gms.ads.AdView;
15 |
16 |
17 |
18 |
19 | public class settings extends AppCompatActivity {
20 |
21 |
22 |
23 |
24 | StoryView storyView;
25 | StoryView storyView1;
26 | StoryView storyView2;
27 | StoryView storyView3;
28 | StoryView storyView4;
29 | StoryView storyView5;
30 | StoryView storyView6;
31 |
32 |
33 | private AdView mAdView2;
34 | @SuppressLint("MissingPermission")
35 | @Override
36 | protected void onCreate(Bundle savedInstanceState) {
37 | super.onCreate(savedInstanceState);
38 | setContentView(R.layout.activity_settings);
39 |
40 |
41 |
42 |
43 | mAdView2 = findViewById(R.id.adView2);
44 | AdRequest adRequest = new AdRequest.Builder().build();
45 | mAdView2.loadAd(adRequest);
46 |
47 | storyView = findViewById(R.id.storyView); // find the XML view using findViewById
48 | storyView.resetStoryVisits(); // reset the storyview
49 |
50 | storyView1 = findViewById(R.id.storyView1); // find the XML view using findViewById
51 | storyView1.resetStoryVisits(); // reset the storyview
52 |
53 | storyView2 = findViewById(R.id.storyView2); // find the XML view using findViewById
54 | storyView2.resetStoryVisits();// reset the storyview
55 |
56 | storyView3 = findViewById(R.id.storyView3); // find the XML view using findViewById
57 | storyView3.resetStoryVisits();// reset the storyview
58 |
59 | storyView4 = findViewById(R.id.storyView4); // find the XML view using findViewById
60 | storyView4.resetStoryVisits();// reset the storyview
61 |
62 | storyView5 = findViewById(R.id.storyView5); // find the XML view using findViewById
63 | storyView5.resetStoryVisits();// reset the storyview
64 |
65 | storyView6 = findViewById(R.id.storyView6); // find the XML view using findViewById
66 | storyView6.resetStoryVisits();// reset the storyview
67 |
68 | ArrayList StoriesList = new ArrayList<>(); // create a Array list of Stories
69 | StoriesList.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/ZYR2/8tqpbmkN6","Coder Mert","Turkey"));
70 | storyView.setImageUris(StoriesList); // finally set the stories to storyview
71 |
72 | ArrayList StoriesList1 = new ArrayList<>(); // create a Array list of Stories
73 | StoriesList1.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/FBJi/Hdk79sSzS","Yasin Tohan","Turkey"));
74 | storyView1.setImageUris(StoriesList1); // finally set the stories to storyview
75 |
76 | ArrayList StoriesList5 = new ArrayList<>(); // create a Array list of Stories
77 | StoriesList5.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/dFok/wYeoYC6oL","Advertisement","Popüler"));
78 | storyView5.setImageUris(StoriesList5); // finally set the stories to storyview
79 |
80 | ArrayList StoriesList6 = new ArrayList<>(); // create a Array list of Stories
81 | StoriesList6.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/HDCQ/pVmALsVBk","Ankit Patwa","India"));
82 | storyView6.setImageUris(StoriesList6); // finally set the stories to storyview
83 |
84 | ArrayList StoriesList2 = new ArrayList<>(); // create a Array list of Stories
85 | StoriesList2.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/7gH7/S9JPxT1Wy","ibrahim AKBULUT","Turkey"));
86 | StoriesList2.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/F3iD/Xkm2FD1RJ","ibrahim AKBULUT","Turkey"));
87 | StoriesList2.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/KqSX/XT6tJvRbx","ibrahim AKBULUT","Turkey"));
88 | storyView2.setImageUris(StoriesList2); // finally set the stories to storyview
89 |
90 |
91 | ArrayList StoriesList3 = new ArrayList<>(); // create a Array list of Stories
92 | StoriesList3.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/omq3/7cdceRTWz","Hartawan Bahari","Indonesia"));
93 | storyView3.setImageUris(StoriesList3); // finally set the stories to storyview
94 |
95 |
96 | ArrayList StoriesList4 = new ArrayList<>(); // create a Array list of Stories
97 | StoriesList4.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/JXrK/djAGt2p3U","Sticker Bot","Everywhere"));
98 | StoriesList4.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/3Rni/gpkvqQoo2","Sticker Bot","Everywhere"));
99 | StoriesList4.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/V78E/7idLVzUXe","Sticker Bot","Everywhere"));
100 | StoriesList4.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/2gnw/yh9Uz7wSd","Sticker Bot","Everywhere"));
101 | StoriesList4.add(new StoryModel("https://thumb.cloud.mail.ru/weblink/thumb/xw1/8MhD/q4eLER8Y1","Sticker Bot","Everywhere"));
102 | storyView4.setImageUris(StoriesList4); // finally set the stories to storyview
103 |
104 |
105 |
106 | }
107 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/viztushar/stickers/task/GetStickers.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers.task;
2 |
3 | import android.content.Context;
4 | import android.os.AsyncTask;
5 | import android.util.Log;
6 |
7 | import java.io.BufferedReader;
8 | import java.io.File;
9 | import java.io.FileOutputStream;
10 | import java.io.IOException;
11 | import java.io.InputStream;
12 | import java.io.InputStreamReader;
13 | import java.net.HttpURLConnection;
14 | import java.net.URL;
15 |
16 | public class GetStickers extends AsyncTask {
17 |
18 | private String url, jsonResult;
19 | FileOutputStream outputStream;
20 | Context contexxt;
21 | boolean newstickerpacks = false;
22 | private Callbacks callbacks;
23 |
24 | public GetStickers(Context context, Callbacks callbacks,String url) {
25 | this.callbacks = callbacks;
26 | contexxt = context;
27 | this.url = url;
28 | }
29 |
30 | @Override
31 | protected Void doInBackground(Void... z) {
32 | try {
33 | URL urll = new URL(url);
34 | HttpURLConnection connection = (HttpURLConnection) urll.openConnection();
35 |
36 | jsonResult = inputStreamToString(connection.getInputStream())
37 | .toString();
38 | Log.i("response", "doInBackground: " + jsonResult);
39 |
40 | } catch (IOException e){
41 | e.printStackTrace();
42 | }
43 | try {
44 | if (fileExistance("sticker_packs")) {
45 | InputStream is = contexxt.openFileInput("sticker_packs");
46 | String lastWallsFile;
47 | lastWallsFile = inputStreamToString(is).toString();
48 | Log.e("LastWallsFile:", lastWallsFile);
49 | newstickerpacks = !lastWallsFile.equals(jsonResult);
50 | writeWallFile();
51 | } else {
52 | try {
53 | writeWallFile();
54 | } catch (Exception e) {
55 | //Do nothing because something is wrong! Oh well this feature just wont work on whatever device.
56 | }
57 | }
58 | } catch (Exception ex) {
59 | //Do nothing because something is wrong! Oh well this feature just wont work on whatever device.
60 | }
61 |
62 | return null;
63 | }
64 |
65 | private boolean fileExistance(String fname) {
66 | File file = contexxt.getFileStreamPath(fname);
67 | return file.exists();
68 | }
69 |
70 | private void writeWallFile() {
71 | try {
72 | outputStream = contexxt.openFileOutput("sticker_packs", Context.MODE_PRIVATE);
73 | outputStream.write(jsonResult.getBytes());
74 | outputStream.close();
75 | } catch (Exception ex) {
76 | //Do nothing because something is wrong! Oh well this feature just wont work on whatever device.
77 | }
78 | }
79 |
80 | private StringBuilder inputStreamToString(InputStream is) {
81 | String rLine = "";
82 | StringBuilder answer = new StringBuilder();
83 | BufferedReader rd = new BufferedReader(new InputStreamReader(is));
84 |
85 | try {
86 | while ((rLine = rd.readLine()) != null) {
87 | answer.append(rLine);
88 | }
89 | } catch (IOException e) {
90 | e.printStackTrace();
91 | }
92 | return answer;
93 | }
94 |
95 | @Override
96 | protected void onPostExecute(Void aVoid) {
97 | super.onPostExecute(aVoid);
98 | if (callbacks != null)
99 | callbacks.onListLoaded(jsonResult, newstickerpacks);
100 | }
101 |
102 | public interface Callbacks {
103 | void onListLoaded(String jsonResult, boolean jsonSwitch);
104 | }
105 |
106 | }
107 |
--------------------------------------------------------------------------------
/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/arclayout_ic_add.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/arclayout_rogue.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/arclayout_rogue.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/arclayout_rogue_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/arclayout_rogue_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/btn_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cakepop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/cakepop.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/coverimg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/coverimg.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/hayabusa.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/hayabusa.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_angry.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_downward.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_gray_like.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_happy.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_heart.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/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/drawable/ic_like.xml:
--------------------------------------------------------------------------------
1 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_notifications_none_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/ic_notifications_none_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_sad.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_surprise.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mert.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/mert.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/react_dialog_shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sticker_3rdparty_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/sticker_3rdparty_web.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sticker_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/sticker_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/verified.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/verified.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/yasin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/drawable/yasin.jpg
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
17 |
18 |
22 |
23 |
33 |
34 |
44 |
45 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
27 |
28 |
29 |
30 |
40 |
41 |
42 |
46 |
47 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
19 |
28 |
29 |
30 |
31 |
35 |
44 |
48 |
52 |
61 |
62 |
69 |
70 |
78 |
79 |
80 |
81 |
82 |
83 |
87 |
96 |
100 |
104 |
113 |
114 |
115 |
123 |
124 |
125 |
126 |
127 |
128 |
132 |
141 |
145 |
149 |
158 |
159 |
160 |
168 |
169 |
170 |
171 |
172 |
176 |
185 |
189 |
193 |
202 |
209 |
210 |
211 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
231 |
240 |
244 |
248 |
257 |
258 |
259 |
267 |
268 |
269 |
270 |
271 |
272 |
276 |
285 |
289 |
293 |
302 |
309 |
310 |
311 |
312 |
320 |
321 |
322 |
323 |
324 |
325 |
329 |
338 |
342 |
346 |
355 |
356 |
357 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
377 |
378 |
386 |
387 |
388 |
389 |
390 |
391 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_sticker_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
24 |
25 |
29 |
30 |
31 |
32 |
44 |
45 |
46 |
47 |
48 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/arc_layout_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
30 |
31 |
37 |
38 |
42 |
43 |
51 |
52 |
53 |
54 |
55 |
56 |
67 |
68 |
76 |
77 |
87 |
88 |
97 |
98 |
108 |
109 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item_sticker.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
23 |
24 |
32 |
33 |
34 |
35 |
44 |
45 |
51 |
52 |
64 |
65 |
72 |
73 |
80 |
81 |
87 |
88 |
89 |
90 |
91 |
92 |
98 |
99 |
100 |
113 |
114 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/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_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #33b5e5
4 | #33b5e5
5 | #D81B60
6 | #fff
7 | #DBCA13
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 80dp
6 | 8dp
7 | 8dp
8 | 50dp
9 | 4dp
10 | 4dp
11 |
12 | 24dp
13 | 20dp
14 | 24dp
15 | 16dp
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3DD7DC
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | StickerOPS
3 |
4 | Hata Bildir
5 | Paket Başvurusu
6 |
7 | After the formation of the Galactic Em
8 | In February 2013, The Walt Disney Company CEO Bob Iger confirmed the development of
9 |
10 |
11 |
12 | https://raw.githubusercontent.com/codermert/image-name-changer/main/content.json
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/test/java/com/viztushar/stickers/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.viztushar.stickers;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import org.junit.jupiter.api.Test;
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 |
5 | repositories {
6 | google()
7 | mavenCentral()
8 | gradlePluginPortal()
9 | jcenter()
10 | }
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:4.1.3'
13 | classpath 'com.google.gms:google-services:4.3.10'
14 | classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
15 | classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
16 |
17 |
18 | // NOTE: Do not place your application dependencies here; they belong
19 | // in the individual module build.gradle files
20 | }
21 | }
22 |
23 | allprojects {
24 | repositories {
25 | maven { url 'https://jitpack.io' }
26 | google()
27 | mavenCentral()
28 | jcenter()
29 | }
30 | }
31 |
32 | task clean(type: Delete) {
33 | delete rootProject.buildDir
34 | }
35 |
--------------------------------------------------------------------------------
/emojis2.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/emojis2.webp
--------------------------------------------------------------------------------
/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 |
15 |
16 | android.enableJetifier=true
17 | android.useAndroidX=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Dec 16 23:20:46 TRT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
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'
2 |
--------------------------------------------------------------------------------
/tray_Bigmoji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/tray_Bigmoji.png
--------------------------------------------------------------------------------
/yyyyyy.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codermert/mertstickerbetaaa/d05a41ebf06dc4295c45dc4aa8cde8df5ef2dcb5/yyyyyy.jks
--------------------------------------------------------------------------------