Capture part of text from image and highlight captured text - android

I am new to android. My challenge is to create an application which captures part of text from image and highlight captured text.
Ex:
Right now getting below result by using sample
But i need result as
highlight phone number, email and website and need to capture those fields from image. Is it possible to navigate website when user click on highlighted part of website?
Please help me. Thanks in advance.

If you are using the above library
then you will get below function in CaptureActivity
boolean handleOcrDecode(OcrResult ocrResult) {}
in this function you can filter the text that you want from overall text.
After filtering the data show custom dailog with mobile number and email.
And make it email clickable so it will redirect the user to website.

Related

Adding image in a text field in flutter

I want to add images in a text field/text form field in flutter. Whenever the user clicks the first button in the bottom navigation bar, the app will ask to pick an image and the image will display in the text field.
Like this:-
How Can I add one? (I am not talking about emoji)
ANY HELP OR IDEA WOULD BE APPRECIATED.
You can use RichTextEditor using rich_text_view plugin to support stylized text. Another option here is by using flutter_markdown to render images from Markdown.

How can I take the Multiple Gallery images into the Edit Text field Randomly

In my project I am try to pick the Gallery images and Emoticons into the Edit Text, I want like chat application. I need to pick the multiple Gallery images and add into the Edit Text field here with I attach my example image
You cant type messages with images inside the edittext for that fact that it wont scroll up or scroll left when editText is full.
solution:
what you need to do is create a string equivalent of the image
example:
:) = for happy face
:( = sad face
etc.
rr:)tttt:(
After you hit enter you can then parse your string and check for the emoticons in string form and delete it then replace it with picture.

webserivce messages in listview with smileys

I am working on a chat application with smileys. I have a image button that shows a pop up of smileys in grid view when clicked. I can select any smiley in that and it will get displayed in Edit Text.
My problem is : Now i have smiley image and text in my edittext. when i click on send i need to display this message with smiley in listview. Is it possible to display images with text in listview where i get mesages from webservice.
List view is used here as a place to display messages from web service. How can i work further in this.
Please guide me in this issue.
Regards,
Raghav Rajagopalan
Is it possible to display images with text in listview where i get mesages from webservice.
Yes it is possible of course. If you are using some complex way to get the messages from the webservice into the adapter, you must integrate this with sending these to the adapter.
Is it possible to send images to webservice and fetch them back in my listview. I am using .Net web service. I return XML from web service as my response.
Don not do that. Put your smileys in drawable or download them only once. Use your own tags inside text for smileys. For example when string :) occurs put a smiley.
I created a Db and added 4 fields to it: ID , Position, Special Character, URL. So i was able to display the corresponding specialcharcter when clicked. When i submit how can i convert that specialcharcter into smiley image. I tried to use functions like "Contains()" and "Replace". But nothing worked when i submited the message to listview. I get the same specialcharcter and text. I don get the image instead of specialcharcter. Please guide me
I suppose you are inserting the message inside a textView. You can use to replace the occurances of the special character with "<img src=\"the source\" />"
Use this to get the image shown setText(Html.fromHtml("hi how are you <img src=\"yourimage.png\" />"));
To replace :) with <img src=\"yourimage.png\" />.. use yourString.replaceAll(":)","<img src=\"yourimage.png\" />");

emoticons in message on Android

I am developing a chat application(like Simple Gtalk) for android mobiles. I am facing few issues in display emoji's/emoticons.
I need to replace the special character to a emojis image. How can i do this?
I select Image from grid.
Display corresponding special character of image selected into Edit Text along with message i typed.
When i click on send button i need to display emojis/ emotions instead of special character in the above list view where i display all the messages i receive from .NET web service. These images(emojis) are stored in drawable folder.
I get these messages from web service. But I want to know how can I find and replace the special character with a emojis image along with my text message coming from web service.
I need to replace the special character to a emojis image
You can refer to Emoji Picker.
Display corresponding special character of image selected into Edit Text along with message i typed.
This has already been answered on SO
But i want to know how can i find and replace the special character with a emojis image along with my text message coming from web service.
Check the Unicode chart.

smiley with text message to be displayed in list view

How can i display smiley along with text message in listview. I am developing chat screen.i type message and i need to add smileys along with text. When i press enter button i need to display text and smiley in the above list view where i display list of messages. Please guide me in this.
some thing like Gtalk chat where we type message and we have an option to select smiley. when we select smiley corresponding special charcter will be displayed. I am able to show grid with smileys and when i select smiley i am able to display specialchatcter(statically) using the position of the smiley.
how can i display these special character and smileys from database. I am i need of help in this issue. Please guide me.
Thanks.
Regards,
Raghav
you used grid view for all smiley..you refer this this link see with multiple images
Use Spannable if you want to display text and images.

Categories

Resources