[Q] Modify Gingerbread keyboard emotes? - Nexus S Q&A, Help & Troubleshooting

Has anyone found a way to modify the emotes that are standard with the Gingerbread keyboard?
In modify, I mean to edit the emotes to something else such as without the "-". For example, to make an emote a : ) instead of as I'm sure no one ever uses the latter. Further, editing the order of the emotes would be even better.
I find myself never using the emote key as a result of this and inputting the emotes myself which is a hassle - especially when there is already a dedicated key for this.
I'm sure someone can do this through some .xml editing or something.

Related

Replacing/Manipulating SmsManager class

Hi there,
I want to write an app that does some user defined manipulation on outgoing SMS. This should be something like text manipulation but it should also be possible to disallow android to send the sms so that it can be sent by some other way like the internet.
First I thought of an own SMS application but thats some sort of overhead for such a simple thing to do.
So my second thought was "What if I could just register an alternative SmsManager class for the whole system?". A look into the sources of android told me that the getDefault() function of SmsManager just creates a instance of its own so I cannot implement a new SmsManager and set it as default.
Any idea how that could be done?
Because the only other way that comes into my mind is to re-write the SmsManager class, find out in which Jar package on the system it is and replace the original with my own. But in my opinion that is a dirty hack and is not the be used for an application which I wanted to make public...
Well, anyone here who has an idea how to do that? Just implementing a function which absorbs the SMS which should be sent an manipulates it seems not be the way how it could be done...
Thanks for sharing your ideas!
PS: Well, actually, my phone doesnt start. It says something like 'you're a noob, don't use this'. Any ideas?
Sorry, had to make this joke about the not working phone

[THEME TOOL IDEA] Copy 9-patch from original files

While working on a ROM (for the hero), I have recently tried to do some theming by small changes (i.e. color changes) to the drawables in the framework-res.apk.
It appears the both for me, and the fellow that is helping me (floomat), these 9-patch files are giving a headache. We prefer editing them in some normal app (i.e. photoshop) but this seems to mess up the 9-patch "code".
I have written a very small program to apply the changes to a 9-patch image without disturbing the 9-patch itself. Note that this program is mainly meant as a "proof of concept" and hopefully one of the apk managing tools will pick up the ball and integrate it. In the meantime it might be useful even as it is (with some scripting around it most likely). Or it might be just a way to prove I am fool and there is simpler way to get around this I am not familiar with
"Program" and source: http://www.sendspace.com/file/sw4atc
(its really too small and simple to be called a program)
Usage:
Code:
java copy9patch original.9.png changed.png
Will copy the changes made to the changed.png over to the original.9.png but keep the 9-patch data of the original.9.png.
Its code (also included) and the way it works is very simple: It takes the size of the original image (i.e. 19x27), without the 1 pixel border with the 9-patch codes - so in our example it will be 17x25. Now it just copied the center 17x25 pixels from the changed.png over the original's center pixels. It has some very basic boundary conditions if the image sizes do not match but this could probably be handled better, possibly just by issuing an error in these cases.
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
NOTE: I feel a bit uncomfortable posting this in the "G1 development" section but I see both apktool and apk manager are here....
erasmux said:
While working on a ROM (for the hero), I have recently tried to do some theming by small changes (i.e. color changes) to the drawables in the framework-res.apk.
It appears the both for me, and the fellow that is helping me (floomat), these 9-patch files are giving a headache. We prefer editing them in some normal app (i.e. photoshop) but this seems to mess up the 9-patch "code".
I have written a very small program to apply the changes to a 9-patch image without disturbing the 9-patch itself. Note that this program is mainly meant as a "proof of concept" and hopefully one of the apk managing tools will pick up the ball and integrate it. In the meantime it might be useful even as it is (with some scripting around it most likely). Or it might be just a way to prove I am fool and there is simpler way to get around this I am not familiar with
"Program" and source: http://www.sendspace.com/file/sw4atc
(its really too small and simple to be called a program)
Usage:
Code:
java copy9patch original.9.png changed.png
Will copy the changes made to the changed.png over to the original.9.png but keep the 9-patch data of the original.9.png.
Its code (also included) and the way it works is very simple: It takes the size of the original image (i.e. 19x27), without the 1 pixel border with the 9-patch codes - so in our example it will be 17x25. Now it just copied the center 17x25 pixels from the changed.png over the original's center pixels. It has some very basic boundary conditions if the image sizes do not match but this could probably be handled better, possibly just by issuing an error in these cases.
NOTE: I feel a bit uncomfortable posting this in the "G1 development" section but I see both apktool and apk manager are here....
Click to expand...
Click to collapse
Huh. I've been wondering if this was possible. I haven't tried this yet but if it works, nicely done! I think that this would be a huge improvement and addition to the themeporter programs that are out there. There is a high demand for this in that area and in the area of HDPI>MDPI/MDPI>HDPI conversion. I'm certainly bookmarking this!
Awesome, just checked out ur source, so simple but effective
Anyway wanted to ask if ur ok with me incorporating it into theme-porter ? Link
Wht im thinking is perhaps when "Hdpi to mdpi" is on, it would resize the .9.pngs by 66%, after which it would transfer the .9 data using this program so (9-patch) code is preserved.
Let me know. Thnx
FYI : Just gave it a whirl, works perfectly.
Daneshm90 said:
Awesome, just checked out ur source, so simple but effective
Anyway wanted to ask if ur ok with me incorporating it into theme-porter ? Link
Wht im thinking is perhaps when "Hdpi to mdpi" is on, it would resize the .9.pngs by 66%, after which it would transfer the .9 data using this program so (9-patch) code is preserved.
Let me know. Thnx
FYI : Just gave it a whirl, works perfectly.
Click to expand...
Click to collapse
Maybe my original post wasn't blunt enough, my code is just "proof of concept" because I am bit lazy in this department (themeing tools) - I'd rather spend my time compiling kernels (go figure ).
So my main goal for this post is for developers of apk managing tools and etc. to pick up the ball and go forward with this
And to be even clearer:
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
(am also adding this to the main post)
Regarding your actual resizing idea, you might want to resize it with the 9-patch "codes" (in the 1-pixel border) because you want the codes from your original HDMI files just resized. This should work, just be careful with resizing algorithms which average pixels and such. If I understand correctly the edge pixels should be either white or black (defining stretchable and context areas). Need to play around with this until it works well.
Let me know if I can be of any further assistance.
erasmux said:
Maybe my original post wasn't blunt enough, my code is just "proof of concept" because I am bit lazy in this department (themeing tools) - I'd rather spend my time compiling kernels (go figure ).
So my main goal for this post is for developers of apk managing tools and etc. to pick up the ball and go forward with this
And to be even clearer:
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
(am also adding this to the main post)
Regarding your actual resizing idea, you might want to resize it with the 9-patch "codes" (in the 1-pixel border) because you want the codes from your original HDMI files just resized. This should work, just be careful with resizing algorithms which average pixels and such. If I understand correctly the edge pixels should be either white or black (defining stretchable and context areas). Need to play around with this until it works well.
Let me know if I can be of any further assistance.
Click to expand...
Click to collapse
Hmm k i'll spend more time with it, perhaps the resizing program im using causes mishaps. Currently when i resize it completely messes stuff up even though the resolution corresponds to a mdpi device.
I'll do the good ol' trial/error n let u know. Thanks for the (proof of concept)
Edit :
Ok so upon using ur code for transferring images of diff sizes u can obviously tell whts up
So one improvement im thinking off, is if the images differ in size, it could draw the border and eliminate anything outside it. Ugh gotta brush up on my java though :S
bump
10 del al char har
bump
I tested it out and it works great! Thanks!
I really hope someone takes this idea and runs with it! If I knew how to code, I would certainly look into this. Maybe I can get one of the Vibrant Devs to look at this....
erasmux said:
While working on a ROM (for the hero), I have recently tried to do some theming by small changes (i.e. color changes) to the drawables in the framework-res.apk.
It appears the both for me, and the fellow that is helping me (floomat), these 9-patch files are giving a headache. We prefer editing them in some normal app (i.e. photoshop) but this seems to mess up the 9-patch "code".
I have written a very small program to apply the changes to a 9-patch image without disturbing the 9-patch itself. Note that this program is mainly meant as a "proof of concept" and hopefully one of the apk managing tools will pick up the ball and integrate it. In the meantime it might be useful even as it is (with some scripting around it most likely). Or it might be just a way to prove I am fool and there is simpler way to get around this I am not familiar with
"Program" and source: http://www.sendspace.com/file/sw4atc
(its really too small and simple to be called a program)
Usage:
Code:
java copy9patch original.9.png changed.png
Will copy the changes made to the changed.png over to the original.9.png but keep the 9-patch data of the original.9.png.
Its code (also included) and the way it works is very simple: It takes the size of the original image (i.e. 19x27), without the 1 pixel border with the 9-patch codes - so in our example it will be 17x25. Now it just copied the center 17x25 pixels from the changed.png over the original's center pixels. It has some very basic boundary conditions if the image sizes do not match but this could probably be handled better, possibly just by issuing an error in these cases.
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
NOTE: I feel a bit uncomfortable posting this in the "G1 development" section but I see both apktool and apk manager are here....
Click to expand...
Click to collapse
Can U just tell how to use this code for bulk images?????
pratyush.creed said:
Can U just tell how to use this code for bulk images?????
Click to expand...
Click to collapse
Hmm, haven't used this for a very long time and don't really remember whats going on here.
Still attached is the version which I have on my HD, and it does support bulk images if all the images are in a folder.
If I remember correctly (mostly going by the help that is displayed by running the program without argument):
Code:
fixResPngs drawable-mdpi drawable-mdpi.org
Will go over all drawable-mdpi/*.png files (possibly also sub dirs?! I really have no idea, sorry), and "fix" each such file. If I am not mistaken it needs a "reference" file only for 9 patch files which are identified by their ".9.png" suffix (regular pngs I think are just rewritten without any change which I found improves compatibility). In case of a 9 patch file, the original file with exactly the same name should be found under the directory given in the second argument. For example: If drawable-mdpi/aaa.9.png is processed the 9-patch data will be copied from drawable-mdpi.org/aaa.9.png.
Obviously it also still works on single files. It does *not* work on lists of files or lists of directories.
If anyone is interested in the code, I am sure I have it somewhere (I hope)....
erasmux said:
Hmm, haven't used this for a very long time and don't really remember whats going on here.
Still attached is the version which I have on my HD, and it does support bulk images if all the images are in a folder.
If I remember correctly (mostly going by the help that is displayed by running the program without argument):
Code:
fixResPngs drawable-mdpi drawable-mdpi.org
Will go over all drawable-mdpi/*.png files (possibly also sub dirs?! I really have no idea, sorry), and "fix" each such file. If I am not mistaken it needs a "reference" file only for 9 patch files which are identified by their ".9.png" suffix (regular pngs I think are just rewritten without any change which I found improves compatibility). In case of a 9 patch file, the original file with exactly the same name should be found under the directory given in the second argument. For example: If drawable-mdpi/aaa.9.png is processed the 9-patch data will be copied from drawable-mdpi.org/aaa.9.png.
Obviously it also still works on single files. It does *not* work on lists of files or lists of directories.
If anyone is interested in the code, I am sure I have it somewhere (I hope)....
Click to expand...
Click to collapse
Gr8 work...u made themin a kid's job
Sent from my GT-S5670 using XDA Premium App
???
does the original still work cause im on windows 7 64 bit and i was able to copy the changes to original but not it makes no changes at all, so the original file doesnt get the changes...
please help!!

[Q] Switch between keyboard layouts

Hi,
I already read about the option to remap some keys by editing the keyboard layout file. Is it also possible to switch between keyboard layouts as you type (using a hotkey) - e.g. I need to be able to quickly change between Cyrilic and Latin keyboards.
Thanks.
I think you're talking about hardware keyboard.... But keyboard apps like swiftkey allow for 3 allow for 3 languages simultaneously.
Sent from my ICS Splashed MT4GS using xda premium
Oops haha double post
Hi indeed, I was talking about the hardware keyboard, if it is not possible to use both cyrillic & latin keys and quickly switch between them, this would decrease the benefit of the keyboard for me and I might decide to go with a non qwerty phone in the end.
Thanks for you insight though.
nickexel said:
Hi indeed, I was talking about the hardware keyboard, if it is not possible to use both cyrillic & latin keys and quickly switch between them, this would decrease the benefit of the keyboard for me and I might decide to go with a non qwerty phone in the end.
Thanks for you insight though.
Click to expand...
Click to collapse
In this dev thread: Hardware Key Mapping | Flashable zips & Requests
...user Paitor has come up with and explained how to implement swedish language support for the hardware keyboard.
Given what Paitor has figured out how to do, it is absolutely within our ability to sit down and make exactly what you are asking.
All it takes is someone willing to sit down and invest the time into actually making it happen.
I would volunteer, but I have a lot on my plate already and realistically it's just not feasable for me to do this and keep up with my other projects on this device.
I will however be willing to take a finished keymapping and turn it into a flashable zip file and update the first posting of the key mapping thread with the result.
(and I always credit the author both in the installer package and thread post)
We still have to write in hardware keyboard language support for other languages, and I invite anyone else who wants to use alternative languages to read that thread and see about putting some time into helping us make that available for everyone. What you want to do is not exactly a small project, but pushing what we know to the next level is the reason for XDA's existence.
So, short answer is yes, what you are asking for is completely possible - you can make a key map file that has all of the keys in the languages you would want.
This is XDA, where you can get exactly what you need right down to the last little detail - if you want to put the time into making it happen. We'll be glad to help out where we can along the way.
--------
Edit:
If I were to tackle this project - this would be my approach:
Some apps, like Drocap2 or soundhound, pop up in the list when you have the Genius key remapped to 'search' and long press it. If there is nothing else that utilizes this shortcut function it will default to the only app that does ( in the case of a stock installation or on my ROM, voice search ).
So what I would do is write in each hardware keyboard layout that I wanted, then design an app that utilizes that Genius shortcut function to run - and the sole purpose of the app would be to switch between hardware keyboard layouts.
To me, that seems like the most elegant and refined approach to your problem without making one monstrously cumbersome key-mapping.
You could just press the Genius button to access the app wherever you happened to be, and then have it just show a menu as an overlay to swap between whatever keymappings you wrote in.
--------
My time is being invested in my ROM - then once that's set to my satisfaction, on to kernel work on overclock/undervolt leading into GPU work in conjunction with TV-out, and then on to bluetooth work for controller support on a Sense device.
These are big projects and very time consuming undertakings, so as you can see a project like this keylayout issue is a long time coming before I can get to it - but i'm happy to help where I can for anyone who wants to dive in and do.
Figured i'd throw out what my approach would be to give someone an idea on where to start - and while certainly not the only solution, is something to consider.
I think I have very good news for you!
There's a keyboard called "AnySoftKeyboard" (search for it in the Market and click Dev Website if you want more info) which supports hard kbd mapping (and switching bet layouts by pressing Alt + Space), they have a Russian language pack (Cyrillic & Phonetic), and it is all free.
I have never used it, but remembered coming accross it a while back and decided to check it out for you.
Hope it works
Hey guys, thanks for your replies!
I will definitely check this application - i am not sure it supports all hardware keyboards in general (or just the g1/droid as written in the description), but I will give it a try if I get this phone
And yes, I will gladly help in creating a layout for a Bulgarian keyboard. Unfortunately I cannot create an application for switching between the layouts myself, as I am not a developer.
thanks again.
AnySoft does work
Got my phone and installed AnySoftKeyboard. It does allow for switching bet layouts on the MT4Gs, but does seem a bit quirky so far... (that's with Hebrew & English, you might want to experiment yourself)

[Q] [IDEA] Am I the only one having the idea of this app?

Well, now that you have opened this thread, please have a look at what I want to say.
I am new to HTC Sensation and I have tried some apps which claim to add words from text file to Custom Dictionary. But there are some devices on which it does not work, and, unfortunately this does not work on Sensation either. So, I am having idea of an app which does the task in a new way:
All it should do is to 'read' words one by one from our given text file and then 'type' it in a text editor like New Message. But before it presses 'space', it should touch the first suggestion given above the keyboard. First suggestion is always the word that we originally type, no matter whether it is in dictionary or not. Touching it will add the word to dictionary. I believe that this is easier to apply as this is a manual method and does not require editing database file.
Second method (a bit more technical):
Open given text in a text editor like New Message or New Gmail email (gmail, because it also underlines words which are not in dictionary and supports big number of words). Then touch every word one by one. If a pop-up menu appears on a word then it must select the 'second-last' option. This is 'add to dictionary' button.
I am not a developer, if I were, I would have made this app myself. So I can only give theory.
If this can be applied, it can be useful for many users who use transliteration method to type in their languages.

Extract UI strings from firmware / device

Hi.
Before I start with my question, just a little background. I work in a user guide development firm, and mainly work on Galaxy devices.
One of the most time-consuming process in my work is to match all UI strings (app names, menu text, labels, etc) of the actual device with the user guide.
This is currently being done with human power, with a staff looking at the user guide, check the device if this is correct, and annotate the draft PDF if the UI strings don't match.
If this was for just one language, it's doable. But with 40 or so languages (including Arabic, Cyrillic, Chinese), it definitely makes me want to puke.
This is a very tiring, eye-straining work that I'm trying to resolve, for everyone's sake.
I tried decompressing the Galaxy firmware myself, but the XML data is encoded into binary(for what reason I have no idea), and is not readable.
So now I'm turning to the masters and hope for any luck.
What I would like to know is ...
Hack the Galaxy firmware(md5), and extract UI strings for all language and save in spreadsheet or something, or
Mirror the device's screen on the desktop, copy the desired UI string, and paste it to a desktop application(e.g. Adobe Acrobat).
If the first option is possible, then I can utilize the data for some sort of automation, and would be the best.
If the second option is possible, then I would no longer have to type all kinds of foreign characters(this is also a very time-consuming work), and make some progress in timeline.
If all options are not possible, and there's absolutely no way of automating this process, then well... I guess I'll go see the eye doctor more often than now.
Any ideas or helps would be great.
Thank you.

Categories

Resources