Giter VIP home page Giter VIP logo

Comments (12)

chander-stripe avatar chander-stripe commented on August 18, 2024

Does this only happen on app upgrades or does it happen on a completely fresh install as well?

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

Can I also see how you're calling initTerminal ?

from stripe-terminal-android.

anton8900 avatar anton8900 commented on August 18, 2024

it's fail always doesn't matter app updated or intsalled after uninstall

from stripe-terminal-android.

anton8900 avatar anton8900 commented on August 18, 2024

Terminal.initTerminal(application.getApplicationContext(), LogLevel.VERBOSE, new TokenProvider(), terminalEventListener);

from stripe-terminal-android.

anton8900 avatar anton8900 commented on August 18, 2024

global variable:
private static final TerminalEventListener terminalEventListener = new TerminalEventListener();

from stripe-terminal-android.

anton8900 avatar anton8900 commented on August 18, 2024

package au.com.ticketbooth.rfid.android.service.stripe;

import com.google.common.collect.Lists;
import com.stripe.stripeterminal.callable.TerminalListener;
import com.stripe.stripeterminal.model.external.*;

import java.util.List;

import au.com.ticketbooth.rfid.android.mvp.presenter.settings.StripeReaderConnectPresenter;
import au.com.ticketbooth.rfid.android.ui.activities.settings.stripe.StripeReaderConnectActivity;

/**

  • The {@code TerminalEventListener} implements the {@link TerminalListener} interface and will

  • forward along any events to other parts of the app that register for updates.
    */
    public class TerminalEventListener implements TerminalListener {

    private static List listeners = Lists.newArrayList();

    public static ConnectionStatus currentConnectionStatus = ConnectionStatus.NOT_CONNECTED;
    public static PaymentStatus currentPaymentStatus = PaymentStatus.NOT_READY;

    @OverRide
    public void onReportReaderEvent(ReaderEvent event) {
    for (TerminalListener listener : listeners) {
    listener.onReportReaderEvent(event);
    }
    }

    @OverRide
    public void onReportLowBatteryWarning() {
    for (TerminalListener listener : listeners) {
    listener.onReportLowBatteryWarning();
    }
    }

    @OverRide
    public void onUnexpectedReaderDisconnect(Reader reader) {
    StripeReaderConnectPresenter.READER_CONNECTED = false;
    for (TerminalListener listener : listeners) {
    listener.onUnexpectedReaderDisconnect(reader);
    }
    }

    @OverRide
    public void onConnectionStatusChange(ConnectionStatus status) {
    currentConnectionStatus = status;
    if(currentConnectionStatus != ConnectionStatus.CONNECTED) {
    StripeReaderConnectPresenter.READER_CONNECTED = false;
    }
    for (TerminalListener listener : listeners) {
    listener.onConnectionStatusChange(status);
    }
    }

    @OverRide
    public void onPaymentStatusChange(PaymentStatus status) {
    currentPaymentStatus = status;
    for (TerminalListener listener : listeners) {
    listener.onPaymentStatusChange(status);
    }
    }

    /**

    • @return the current ConnectionStatus
      */
      public static ConnectionStatus getCurrentConnectionStatus() {
      return currentConnectionStatus;
      }

    /**

    • @return the current PaymentStatus
      */
      public static PaymentStatus getCurrentPaymentStatus() {
      return currentPaymentStatus;
      }
      }

from stripe-terminal-android.

anton8900 avatar anton8900 commented on August 18, 2024

this worked perfect before updating to the rc-1

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

Hmm, so the major new thing with Rc1 is that we're creating a Room database to store pending transactions and other traces to make sure that we handle any edge cases when the app is unexpectedly closed / re-opened -

Does your app meet the standard requirements for a room database?

from stripe-terminal-android.

mattjamesaus avatar mattjamesaus commented on August 18, 2024

@chander-stripe @anton8900 can we make sure we're checking this out, we're currently running dbflow in our application.

Is there any issues with us staying with beta for production until this is resolved?

from stripe-terminal-android.

mattjamesaus avatar mattjamesaus commented on August 18, 2024

@chander-stripe so we tried test application on phone and its working so the phon is 100% compatible. There must be an incompatibility with our app.

What's the standard requirements for a room database here? I did a quick google search but couldn't find any reference to a definitive list of requirements. I'm guessing it could be due to out other ORM (dbflow) but tonnes of other applications use dbflow so it would seem strange that we'd strike all those from the table.

from stripe-terminal-android.

anton8900 avatar anton8900 commented on August 18, 2024

have migrated app to the androidx and error disappear

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

Great!

from stripe-terminal-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.