So now that we have an image an OCR-ed text, we have to create a place for it to be interpreted, before the interpretation can begin. Since we are focusing on business cards for this app for now, naturally the OCR-ed text should be extracted with the relevant details and then converted into a contact. For this we need a preliminary contacts page and therefore I set out to create a form that can add my details into the Android contacts.
To do this I used several resources around the net to understand the Androids’s method of creating a Contract to tap into the Contacts Provider object. In general, I created an ArrayList of ContentProviders called ‘ops’, and added each required detail as follows:
[name value here]).build());
This helps generate a valid ArrayList to be pushed into the contacts. After that it’s just a matter of:
to add the contacts into the list. Easy-peasy 🙂
So as of now, the contacts screen is as follows, and this is what will be shown to the Prof this week on October 4th. Viva la code!