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

Can you add feature that image recognition #5

Open
xu6148152 opened this issue Jun 23, 2015 · 3 comments
Open

Can you add feature that image recognition #5

xu6148152 opened this issue Jun 23, 2015 · 3 comments

Comments

@xu6148152
Copy link

I saw many app have this feature, if the app have this feature, people do not input any message, it's very convenience

@vinaygaba
Copy link
Owner

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?

@GregSaintJean
Copy link
Contributor

@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..

@josefdlange
Copy link

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.

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

No branches or pull requests

4 participants