How to show iOS style Emoji characters in Android's EditText? - android

First, the Emoji characters on Android look different then they are in iOS device. In Android, the Emoji characters are black and white, but in iOS, they look much better.
Some input methods support typing Emoji characters directly in Android devices. For this kind of input method, in Facebook, if I type an Emoji character, then the character is still displayed as the one in Android. But in WeChat, the Emoji character looks the same as iOS.
So my question is, how to implement the same function as WeChat? Please see below two snapshots, the first one is WeChat, then the second one is Facebook.
Thanks a lot.
WeChat:
Facebook:

You need to download all Emoji images, keep it local in your application and replace the unicodes of smileys with Emoji images in your EditText/TextView.
This link shows one of the ways to add images inline with text in an EditText/TextView.

Finally I found out the method to replace the unicode character with corresponding Emoji image. Here is the github link of my library/sample project. Enjoy. :-)
https://github.com/IPL/iOSStyleEditText

Related

Google Play Store Description Size & Color [duplicate]

I've made an Android application that is available on Google Play. Now I want to add some more formatting to my app description (eg. indent, links, lists..). But I cannot find any website where possible formatting is listed. Google Help pages cannot help me either on this subject. There exists a lot of different formats and I don't really know which one to use (eg. HTML or wiki formatting..)
I could test it with trial and error, but that would take some time, because Google Play only refreshes after 2-3 hours. And while I'm testing, my app description would be rather ugly if the wrong format was used.
tl;dr Is there a list of all possible formatting I could use in the app description for Google Play?
Experimentally, I've discovered that you can provide:
Single line breaks are ignored; double line breaks open a new paragraph.
Single line breaks can be enforced by ending a line with two spaces (similar to Markdown).
A limited set of HTML tags (optionally nested), specifically:
<b>…</b> for boldface,
<i>…</i> for italics,
<u>…</u> for underline,
<br /> to enforce a single line break,
I could not find any way to get strikethrough working (neither HTML or Markdown style).
A fully-formatted URL such as http://google.com; this appears as a hyperlink.
(Beware that trying to use an HTML <a> tag for a custom description does not work and breaks the formatting.)
HTML character entities are supported, such as → (→), ™ (™) and ® (®); consult this W3 reference for the exhaustive list.
UTF-8 encoded characters are supported, such as é, €, £, ‘, ’, ★ and ☆.
Indentation isn't strictly possible, but using a bullet and em space character looks reasonable (•  yields "• ").
Emoji are also supported (though on the website depends on the user's OS & browser).
Special notes concerning only Google Play app:
Some HTML tags only work in the app:
<blockquote>…</blockquote> to indent a paragraph of text,
<small>…</small> for slightly smaller text,
<big>…</big> for slightly larger text,
<sup>…</sup> and <sub>…</sub> for super- and subscripts.
<font color="#a32345">…</font> for setting font colors in HEX code.
Some symbols do not appear correctly, such as ‣.
All these notes also apply to the app's "What's New" section.
Special notes concerning only Google Play website:
All HTML formatting appears as plain text in the website's "What's New" section (i.e. users will see the HTML source).
Currently (July 2015), HTML escape sequences (• •) do not work in browser version of Play Store, they're displayed as text. Though, Play Store app handles them as expected.
So, if you're after the unicode bullet point in your app/update description [that's what's got you here, most likely], just copy-paste the bullet character
•
PS You can also use unicode input combo to get the character
Linux: CtrlShiftu 2022 Enter or Space
Mac: Hold ⌥ 2022 release ⌥
Windows: Hold Alt 2022 release Alt
Mac and Windows require some setup, read on Wikipedia
PPS If you're feeling creative, here's a good link with more copypastable symbols, but don't go too crazy, nobody likes clutter in what they read.
As a matter of fact, HTML character entites also work : http://www.w3.org/TR/html4/sgml/entities.html.
It lets you insert special characters like bullets '•' (•), '™' (™), ... the HTML way.
Note that you can also (and probably should) type special characters directly in the form fields if you can enter international characters.
=> one consideration here is whether or not you care about third-party sites that collect data on your app from Google Play : some might simply take it as HTML content, others might insert it in a native application that just understand plain Unicode...
This is not bullet but you can consider it. As there is nothing like big dot.
I used below symbol in the description and its working fine.
⚫ Black Circle
🌑 New Moon
🌕 Full Moon
💠 Diamond With a Dot
🔸 Small Orange Diamond
⚙ Gear
🏴 Black Flag
🏳 White Flag
▶ Play Button
⏩ Fast-Forward Button
⭕ Heavy Large Circle
✴ Eight-Pointed Star
◼ Black Medium Square
◽ White Medium-Small Square
◾ Black Medium-Small Square
⬛ Black Large Square
You just need to copy and paste it over description. Below is the result.
Currently (June 2016) typing in the link as http://www.example.com will only produce plain text.
You can now however put in an html anchor :
My Example Site
Title, Short Description and Developer Name
HTML formatting is not supported in these fields, but you can include UTF-8 symbols and Emoji: ✓☆👍
Full Description and What’s New:
For the Long Description and What’s New Section, there is a wider variety of HTML codes you can apply to format and structure your text. However, they will look slightly different in Google Play Store app and web.
Here is a table with codes that you can use for formatting Description and What’s New fields for your app on Google Play (originally appeared on ASO Stack blog):
Also you can refer this..
https://thetool.io/2020/html-emoji-google-play
Include emojis; copy and paste them to the description:
http://getemoji.com
<br> seems to be the best and only way that currently works on the app version to create a new line break. I have tried it successfully in a review, as well as unsuccessfully tried all other Unicode/HTML newline-related characters that the Wikipedia page for newlines would tell me.
I used <br> with | immediately on either side, using no closing tag, and it magically created a single line break without revealing the source or screwing anything up.
TLDR: <br> lets you successfully utilize single line breaks in Google Play app -- unlike everything else I tried (a lot).
P.S. I have no clue how to make the thing show source instead of being used as source. !^( Now I do, and I know it works on both the desktop and mobile sites. !!
Additionally, upon searching for how to make it show the source, I stumbled upon this. <del></del>

How do the Unicode control characters work?

What I'm doing now is to show the phone number correctly under right-to-left layout. I want +111111111 but it appears like 111111111+ now. I found a solution that using LRM(left-to-right mark), which is a Unicode control character '\u200E'.
There may be several formats for phone numbers in different place of world like XXX-XXX-XXXX. To prevent further bugs, I have to understand how those control characters work, especially which changes the direction of strings.
In my understanding, for common characters:
strings are stored as bytes in memory.
the editor/textview loads the bytes and look them up in
Unicode.
the editor/textview shows those Unicode in the form of
fonts.
So, when or which step do those control characters like LRM work? How to make sure that using them does not cause further bugs?
I wish I had made it clear for you.

#font-face do not work unicode Malayalam in android Cordova

In android #font-face do not work for UTF character.(Webpage hosted in web control using cordova)
The code works on chrome browser both on android as well as desktop.
It do not apply the changes in the application.
Observed that if there are no UTF characters then font styling was applied. Also observed that only the lines that has got UTF it is not applied with the web font style.
It was an indication that the path provided in font-face was correct.
Tried changing the UTF character to the encoded hex value and it did not help.
The Problem
In Android 4.3 the character " ്ര "details about this issue and work around is given here
I require this for Android app developed using cordova(phonegap) and hence rooting and installing is not an option.
I tried to do web view with embedded font (#font-face) and strangely, it is not working for web view in android, but works perfectly in browser of the same device.
The Solution
Got a hint from this stack over flow and this was pointing to this Solution, and thank you for that
Basically We need to get an ASCII based font and convert the unicode to mapping ASCII.
The solution provided was using JAVA and always a chance of missing some characters. Another problem that i faced using this solution was, if there is a mix of English and Malayalam character then the solution give undesirable results.
So I created this jquery plugin
Basically It does the following.
Identify the longest possible Malayalam character sequence and wrap them using tag with configurable class name.This process separate English and non English groups.
Each grouped Malayalam character sequence then converted to ASCII using a configurable mapping w.r.t the font.
The problem of Mix of English and Malayalam is solved, problem of missing some character is fixed, and also #font-face is working. I was able to create 2 fonts mapping.
So far the solution is working for me.
I feel some level of optimization can be done.

Disable unicode replacement emoji in Android Chrome?

Certain unicode characters in the Miscellaneous range would be nice to use, but most phones display them as emoji and that is unwanted because then they can't be styled by CSS font declarations. I know there's a fix for iOS, but I have not found a solution for Android. Is it possible to disable them?
Example: http://jsbin.com/qopiyori/1/
Had the same problem, found the answer on another stack overflow question which worked for me:
add ︎ at the end of the string with the Unicode characters you do not want to be replaced with emoji icons.
How to prevent Unicode characters from rendering as emoji in HTML from JavaScript?
Google Chrome, desktop version 75, seems to disambiguate its approach to rendering Unicode characters based on the first Unicode escape it encounters while loading a page. For instance, when parsed as the first HTML Unicode escape in a page source, and having no emoji equivalent, ⏷ seems to clarify to Chrome that the page contains escapes not to be rendered as emoji. I have not tried this in Android Chrome.

Replace default smileys menu

I want to replace the default smileys menu (the one that shows up when the smiley button on the virtual keyboard is pressed) with a custom one with own drawables. Is this even possible?
If not, is there any way to get access to the smartphone's default smiley drawables so I can show them in my textview?
I'd love to use my own ones though. Any suggestions?
No. Not without making your own keyboard. Which you can do of course. Part of the reason that this is a no is that each keyboard does smilies on its own, so they all have different ones.
You can put any image you want in a textview - just use an ImageSpan. Android doesn't really have default emoticons (although an OEM may use a consistent set across pre-installed apps). Either keyboards will insert their own emoticons via image spans, or apps will see a familiar pattern like :-) in the text and convert it into an image span. If you want the images from the default android keyboard you can find those in the AOSP somewhere, or by unzipping the apk file.

Categories

Resources