Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.RuntimeException #12

Closed
moisoni97 opened this issue Apr 23, 2019 · 2 comments
Closed

java.lang.RuntimeException #12

moisoni97 opened this issue Apr 23, 2019 · 2 comments

Comments

@moisoni97
Copy link

In Google Play Console - Android vitals under "Installed from anywhere" I am getting java.lang.RuntimeException com.shashank.sony.fancytoastlib.FancyToast.a

Caused by: java.lang.RuntimeException: at android.widget.Toast$TN.<init> (Toast.java:433) at android.widget.Toast.<init> (Toast.java:118) at android.widget.Toast.<init> (Toast.java:109) at com.shashank.sony.fancytoastlib.FancyToast.a (FancyToast.java:2) at games.moisoni.evfp.MainActivity.a (MainActivity.java:13) at com.anjlab.android.iab.v3.BillingProcessor.getPurchasePayload (BillingProcessor.java) at com.anjlab.android.iab.v3.BillingProcessor.detectPurchaseTypeFromPurchaseResponseData (BillingProcessor.java) at com.anjlab.android.iab.v3.BillingProcessor.handleActivityResult (BillingProcessor.java) at com.anjlab.android.iab.v3.BillingProcessor.loadPurchasesByType (BillingProcessor.java) at com.anjlab.android.iab.v3.BillingProcessor.f (BillingProcessor.java:4) at com.anjlab.android.iab.v3.BillingProcessor$HistoryInitializationTask.doInBackground (BillingProcessor.java) at com.anjlab.android.iab.v3.BillingProcessor$HistoryInitializationTask.doInBackground (BillingProcessor.java) at android.os.AsyncTask$2.call (AsyncTask.java:333) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:245) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636) at java.lang.Thread.run (Thread.java:764)

This happens only in "Installed from anywhere" not from Play Store.
I also use in-app purchase v3 library and use this toast to confirm the purchase and eventually errors.

`@Override
public void onProductPurchased(@nonnull String productId, @nullable TransactionDetails details) {
if (productId.equalsIgnoreCase("android.test.purchased")) { //real - remove_ads_purchase |||| // test - android.test.purchased
YoYo.with(Techniques.FadeOutUp)
.duration(500)
.repeat(0)
.playOn(findViewById(R.id.relative_ads));
findViewById(R.id.no_ads_line).setVisibility(View.GONE);

        //If purchasedCounter = 1 don't show ads
        purchasedCounter = 1;

        //Save purchase
        SharedPreferences savePurchase = getSharedPreferences("MyPurchase", Context.MODE_PRIVATE);
        SharedPreferences.Editor editorPurchase = savePurchase.edit();
        editorPurchase.putInt("purchase", purchasedCounter);
        editorPurchase.apply();

        FancyToast.makeText(MainActivity.this, "Done! Thanks for your purchase!",
                FancyToast.LENGTH_LONG, FancyToast.SUCCESS, false).show();

        //Restart activity for changes to take effect
        Intent intent = new Intent(MainActivity.this, MainActivity.class);
        startActivity(intent);
        finish();
        Animatoo.animateFade(MainActivity.this);
    }
}`
@Shashank02051997
Copy link
Owner

I have no idea why this is showing this type of error. Try a new version of this lib 0.1.4 that helps u to solve ur problem.

@moisoni97
Copy link
Author

Since I've upgraded to version 0.1.6 I haven't seen any more crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants