I am sending FCM messages using php curl with the legacy http protocol.
https://firebase.google.com/docs/cloud-messaging/http-server-ref
I am successfully using the title_loc_key and title_loc_args fields along with the following resource strings in my android app.
<string name="fcm_msg_title">%1$s</string>
<string name="fcm_msg_body">%1$s</string>
But whatever method I use in the resource strings to make it appear RTL, it does not work.
I tried to use html with dir="rtl" and also style="direction:rtl".
I tried to use the different combinations of unicode characters as described here:
https://stackoverflow.com/a/10989502/8507634
But nothing works and the text is still showing as LTR.
Does any one know of something that can help.
Related
I am working on an Android app which supports few other locales apart from English (like PTBr). I get the text from server in PTBr (Brazilian Portuguese) and I display it as it is in a Text view. I have also set my phone's locale to PTBr but still don't see the complete text. A few characters are missing.
I am stressing on "server-data" since I don't have it locally, and thus I can't put it in res-string folders.
Thanks!
My app uses javamail to get the emails and then I use this Html android class to go through the message body and apply the html tags. But this class ignores CSS code, so if I look at an email which contains such code, it looks like this:
Basically 95% CSS code and 5% content at the bottom of it (not on picture). What are my options to solve this? I didn't really find anything useful so far. (I'm a beginner.)
The only thing native to Android that understands arbitrary HTML, like CSS, is WebView. For displaying received emails, use a WebView.
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.
I'm trying to upload my android app, but instead of my app name "Соновник" it shows question marks. I've stored all my string in the values/strings.xml file. Is there some naming convention or am I supposed to do something for my app title to support UTF characters?
it might be a problem with your browser (or google's side) that it is not showing title correctly, otherwise on device i believe it should be fine.
This is my first time using a webservice and I' trying to create a webservice that sends .xml replies (with tags) to the android device.
When I was browsing through the .xml url through my browser, all the tags are nicely presented. However when I'm browsing the same .xml url through my android devices, all tags have been removed and it is just space separated values.
Is it common for it to happen ? Is the Xml tags actually still present but just made "invisible" when viewing on android devices ? Would it make any difference when i parse it on the device ?
It depends on the viewer you're using. Some of them show XML without any information how to display it (called XSLT) the way you describe it – the tags itself are not visible, only the text inside them (similar to what happens when unknown elements are encountered in HTML). If you want to write an application for android that parses the XML, it's going to read it normally, with all the tags intact.