Git Product home page Git Product logo

Comments (10)

PatilShreyas avatar PatilShreyas commented on May 24, 2024 1

@goforbg It's already implemented.

from easyupipayment-android.

goforbg avatar goforbg commented on May 24, 2024

Can I take this up @PatilShreyas ?

from easyupipayment-android.

PatilShreyas avatar PatilShreyas commented on May 24, 2024

But what you'll do to solve this issue @goforbg?

from easyupipayment-android.

PatilShreyas avatar PatilShreyas commented on May 24, 2024

As the problem mentioned in this issue. This is already expected behaviour

from easyupipayment-android.

goforbg avatar goforbg commented on May 24, 2024

@PatilShreyas I'm seeing an official list athttps://www.npci.org.in/upi-PSP%263rdpartyApps

We can maintain a list of array of packages, write a small util function see if those packages are installed using Package Manager and wrap it inside a try catch.

If we wanna go all sicko mode we can write a cron job to fetch it from the page every day and update the list dynamically too 😂

from easyupipayment-android.

mallipurna03 avatar mallipurna03 commented on May 24, 2024

yes, even it is crashing..

from easyupipayment-android.

ItzNotABug avatar ItzNotABug commented on May 24, 2024

yes, even it is crashing..

This is an expected behaviour as per the current code.

@PatilShreyas,
Maybe show an error warning in the console or maybe add one more method to the Listener when no apps are found?
Avoiding a straight-up crash can be good.

from easyupipayment-android.

adarsh45 avatar adarsh45 commented on May 24, 2024

I am facing a similar issue.
I have taken care of AppNotFoundException with log and a toast
But still, the app crashes when no payment app is available on the phone.
Please also guide me if I am doing something wrong while writing code.

EasyUpiPayment.Builder builder = null;
EasyUpiPayment easyUpiPayment = null;

try {
    builder = new EasyUpiPayment.Builder(FoldersScreen.this)
                .with(PaymentApp.ALL)
                .setPayeeVpa("upi_id@upi")
                .setPayeeName("payee_name")
                .setTransactionId(tr_td)
                .setTransactionRefId(tr_ref_id)
                .setDescription(desc)
                .setAmount(amount);
} 
catch (IllegalStateException isExc){
    Log.d(TAG, "payThroughUPI: "+ isExc.getLocalizedMessage());
    Toast.makeText(this, isExc.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
} 
finally {
        try {
            easyUpiPayment = builder.build();
        } catch (AppNotFoundException e){
            Log.d(TAG, "payThroughUPI: "+ e.getLocalizedMessage());
            Toast.makeText(this, "UPI app not found", Toast.LENGTH_SHORT).show();
        } finally {
            easyUpiPayment.startPayment();
            easyUpiPayment.setPaymentStatusListener(this);
        }
}

from easyupipayment-android.

ItzNotABug avatar ItzNotABug commented on May 24, 2024

First of, there's no need to use a try/catch block to create the builder variable.
Secondly, can you share the stack-trace?

from easyupipayment-android.

PatilShreyas avatar PatilShreyas commented on May 24, 2024

Since this is expected and working fine, closing this

from easyupipayment-android.

Related Issues (20)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.