Coder Social home page Coder Social logo

Comments (3)

vinaygaba avatar vinaygaba commented on July 4, 2024

Hi,
I am looking into using the Card.io SDK to implement this feature. Do you have any suggestions on how the camera should be called to recognize the content on the cards?

from creditcardview.

GregSaintJean avatar GregSaintJean commented on July 4, 2024

@vinaygaba I don't think it's possible to do this at least with the Card.IO SDK. The CreditCardView is an extended object of a View. You could grab the context that the view is in, but it is only guaranteed to be an activity from the Android framework.

If you take a look at the sample app for the Card.IO SDK, you will see that the activity that uses Card.IO needs to have "onActivityResult" overridden to get the results of the image recognition.

I'm pretty sure that you can not override a method on an object that was already created. You would need to write an activity class that has the appropriate method overridden..

from creditcardview.

josefdlange avatar josefdlange commented on July 4, 2024

This could be an opt-in feature (and one with little effort on your part) whose entry point is to just call some method on your view that takes the activity result as a parameters and knows how to dissect it. A consuming developer would have to know to call:

creditCardView.updateFromCardIOResult(data);

where 'data' is the Intent object from onActivityResult(...). Definitely could not have the view listen for the result or any kind of notification given the volatile nature of any activities in the backstack -- the view may not exist anymore if the OS has killed it.

from creditcardview.

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.