Json parsing and greek - Java for Android App Development

Hello, i'm trying to develop my first android app. It's a simple application that will parse a json file with some info and list these items. I've finished doing all that stuff and the app is running very well. But the problem is that i cant parse greek language.
If i use UTF-8 without BOM it shows me some weird stuff (ii?? something like this) and if i use UTF-8 encoding the app shows nothing.
I've tried some suggested changes that i found online (about eclipse encoding etc) but they didn't work.
Thanks!

Related

Exporting SMS Message Content from Windows CE PocketPC

Hi,
I'm currently doing a project and i'm using a xdaII.
Platform: PocketPC xdaII Intel(R) PXA263 400Mhz
Memory: 128 MB
ROM version: 1.60.00WWE
Protocol version: 1337.18
ExtROM version: 1.60.44
Connection: USB ActiveSync Version 3.7 (Build 3083)
Host PC: Microsoft Window XP Professional 2002 With Service Pack 1
What I have done so far:
I have create a application using VB.NET for the xdaII fone. the application is suppose to send and receive sms. I have successfully sent sms out of the phone,
Problem/Question:
1.
However, I am stuck at the interception of the received sms. I've read through the MSDN website but some of the API functions have been depreciated and further more there isn't any samples or good VB.NET reference on reading SMS.
Where is the location of the sms messages that is stored (from what I know/read, the sms is from the inbox), but how do I retrieve it from it and display it on the VB.NET application?
2.
Is it that I have used the wrong language? I've tried using j2me midlet to send/receive sms. But I need to know how to use the push registry and the sms port number.
3.
Upon receiving a message from a certain sender, how do i auto-acknowledge it?
----
Hope somebody can help. I'm rushing for time. Your help will be greatly appreciated.
I am not sure if this is the answer you want as you are talking about VB.NET. However I have sent and received SMS using Embedded C
The send sms is easy, as you have found out.
Receiving SMS is slightly harder as it seems that only one sms receive program can be active, normally that is the Inbox program. If you do a warm reset and then you can create a handle to a SmsRead. This action blocks Inbox. Inbox also blocks SmsRead getting a handle, that is why a warm reset is required.
The SmsRead function must be run as a seperate thread since it blocks waiting for an Sms Message. All the main thread does is it checks if ReceiveSmsMessage.SmsFlag is set true, if it is then it checks what the message was, does any necessary action and finally sets the SmsFlag to False again.
The SendSms function is used like
SendSMS( TEXT("+44123456789"),TEXT("Message Text") )
The Read function just works in a seperate thread and populates it's ReceiveSmsMessage structure
I would of thought you could translate the ideas here into VB.NET most of the functionality is with API functions anyway.
As to auto-acknowledge all you do there is send an sms message when the main thead finds one has been received, the telephone number to send back to is already in ReceiveSmsMessage.SmsPhone, so you simply do
SendSMS( ReceiveSmsMessage.SmsPhone, TEXT("Received") )
Isit that i have to apply both
#include <sms.h>
#include <tapi.h>
to activate ReadSms?
Is there anyway that I can translate it to VB.NET language?
No, you don't need Tapi.h, Tapi was for another function in the code that I cut these procedures out of.
Sorry I should of not included that when I copy and pasted from my code.
I have edited my attachment above and removed tapi.h. The code would of still compiled OK, it was simply a header file present that was unnecessary.
You only need sms.h, but thinking about it that would only be for the code when in C.
I can't help you with translating this into VB.NET. I have only used normal VB6 and to be truthfull I have never understood how to apply .NET, The important question is can VB.NET run a seperate thead as that is crucial due to the blocking function to wait for an Sms Message. I don't think multithreaded applications sharing data are possible under VB, but I am sure that has been added under .NET.
Assuming threads are possible then I would of thought you could compare my SendSms routine to your VB method to see how C API calls translate into VB.NET.
If anybody sorts the translation into VB.NET then please copy the answer back to this message thread as I would like to see how it is done.
Did you manage to read sms on a QTek 1010 / pocket PC 2002 ?
When I tried it, it said that the function is not supported.
I read somewhere that you have to use cemapi to be able to read
sms on PPC 2002, is that true?
thanks
awni
The code was written and run on an XDA, that is PPC2002 and is the same Original Wallaby device as yours.
When you compile the SMS functions you need to include sms.lib in the linking. Maybe that is your problem, check under Project -> Settings -> Link in eMVC that you sms.lib included in the object/library modules.
I was using it in a .NET environment(C#), there aren't any .h files in C#
and I was able to use SmsOpen in SEND mode without a problem. When I try to use SmsOpen in RECEIVE mode, I get an "Invalid argument" error.
I tried typecasting, and I got "Not supported error".
I've never used eVC, I just downloaded it yesterday. I've used VC++ 6.0
and 7.0, so I still need to figure out how to get eVC working..
awni
I think my problem is with the last argument to SmsOpen, I was sending
NULL/0 instead of using CreateEvent like you're doing.
HANDLE hRead = CreateEvent (NULL, FALSE, FALSE, NULL);
// Open an SMS Handle
HRESULT hr = SmsOpen (SMS_MSGTYPE_TEXT, SMS_MODE_RECEIVE,
&smshHandle, &hRead);
I'll try it as soon as I figure out how to create the thread...
thank for the code.
awni
Has someone got the reading SMS working ??? I checked the sample code out however i always get the error message to do warm reset !!! I read that this is due to the handle that is already used.
Any solutions here ??

More International Encoding on WM5

Universal is very nice device, but only focused to Major Language and some languages were un supported their encoding on Inbox and IE.
so i made wince.nls with more national language encoding support last year,
I forgot to tell you all and i will do now
the Regional supports are
@WWE version Default Supported Languages,plus
(some of follows already in WWE version, sorry i forgot what was in Default OS)
@Japanese / Korean
@Chinese(Traditional/Simples)
@RUssian(supported by default?)
@Romania @Croatian
@Makedinia @Czech
@Arabic @Dutch
@Azeri(Cyrille) @Estonia
@Azeri(Latin) @Faeroes
@Basque @Finnish
@Belarusian @Fyro
@Bulgarian @Greek
@Catalan @Hebrew
@Hungarian @Iceland
@Latvian @Polish
@Prtuguese @Rommania
@Serbian(Cyrille/Latin)
@Slovak @Solovenia
@Swahilli @Tatatr
@Turkish @Ukraina
@Thai @Urudu(pakisitan)
@Uzbek(Cyllile/Latain)
@add Encoding on IE and Inbox
All of aboves and also
@vietanmese
@Central Europe
@Eastern Europe
@Arabic
@Hindi
@Baltic
@Turkish
@Thai
@Korean / Jpana
@ChineseHebrew
@Cyrillic
@and more.......
But i dont have all fonts for them. you must install your fonts
onto windows folder or \windows\Fonts folder.
ANd another way,
you can create and install on the \Storage Card\Fonts folder with
small application FontsOnSTorage by mr.homing
http://www.yetanotherhomepage.com/j7xx/software/util/fontonstorage.html
i htinks those fonts can be work on your devoce, but not tested by myself all of them
http://www.alanwood.net/unicode/fonts.html
Any way, this is the Strikes Back by Forgotten Nations by WM5 WWE.
PLS enjyoy it friends!
Allahhhhhhhhhh h akbarrrrrr!
Thank you Asukal!
Thanks once more...
Cooked ROM with this patch
**QTEK 130 ROM based****2006-Aplir-23 uploaded*****
Fogotten Nations ROM ---following reginal "wince.nls" and "font"
http://www.asukal.jp/ROMs/Qtek_Forgotten_130.rar (53MB)
hindi, hebrew,Arabic,Thai, Chinese,Korean, Japan, Easteren and Central Europe,
Greek,Vietnamese fonts and encodeing in this ROM,,,,,,already
But i can not confirm they are correct or not,,,,,,
Allahhhhhhhhhhhhhhhhhhhhh h akbarrrrrrrrrrrrrrrrrrrrrrrrrrr again!!!!!!!!!!
Nam Amida-butsu!
shamilsh said:
Allahhhhhhhhhhhhhhhhhhhhh h akbarrrrrrrrrrrrrrrrrrrrrrrrrrr again!!!!!!!!!!
Nam Amida-butsu!
Click to expand...
Click to collapse
thanks Camrade Shamil......
but seems only you need this... ?
Asukal said:
shamilsh said:
Allahhhhhhhhhhhhhhhhhhhhh h akbarrrrrrrrrrrrrrrrrrrrrrrrrrr again!!!!!!!!!!
Nam Amida-butsu!
Click to expand...
Click to collapse
thanks Camrade Shamil......
but seems only you need this... ?
Click to expand...
Click to collapse
Not at all, nice and god job , Asukal
I install to my BA it working very well
Text messages?
It seems like I can't get this to work with text messages (the encoding option in my text message inbox is disabled). Does anyone know how I can get around this problem?
whats language you want to get?
using this rom or CAB files with English ROM?
Is your font in your Device or ROM?
i tried text message in Japanese, Chinese, Korean. Thai Languages in this ROM
How about with check the unicode option?.
Also encoding of IE and e-mail enabled?
SMS doesnt need some encoding if the SMS service center support that.
<but almost of them suport it, within my knowledge>
Asukal said:
whats language you want to get?
using this rom or CAB files with English ROM?
Is your font in your Device or ROM?
i tried text message in Japanese, Chinese, Korean. Thai Languages in this ROM
How about with check the unicode option?.
Also encoding of IE and e-mail enabled?
SMS doesnt need some encoding if the SMS service center support that.
<but almost of them suport it, within my knowledge>
Click to expand...
Click to collapse
I want to get Traditional Chinese on my Vodafone V1640. I also have a T-Mobile SDA (on O2 UK) which has nina.ttf installed but it doesn't show all the characters (i.e. I still get some squares) which is why I want to try to get Chinese on my V1640.
The ROM is the latest i-mate WWE ROM.
I have a T-Chinese font (don't know the actual name of the font but it is definitely no included in the Chinese Windows) placed in the Windows/Font folder, but does it have to be a specific font (like MingLiu? it's quite big though)?
I forgot where the unicode option is. Encoding options in IE and E-mail are available (I can choose the language), but IE still can't display Chinese, despite the change in the encoding option.
Please help.
1; used my CAB right?
this can install wince.nls and enabler for the nls files.
Text message need the sytem font to discribe your languages.
so it means chinese font should be register as "System font"
you have never done that., i guess so.
Ok following the sample of font registry for Mingliu font.
1;way 1 <with the cab in this page>
import this with registry editor and put the Mingliu into windows folder.
and make soft reset, then you can solve all problem.
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\FontLink\SystemLink]
"MingLiu="\\windows\\tahoma.ttf,Tahoma"
"PMingLiu"="\\windows\\tahoma.ttf,Tahoma"
"Courier New"="\\windows\\mingliu.ac3,PMingLiu"
"Tahoma"="\\windows\\mingliu.ac3,PMingLiu"
2:way 2 <without the cab in this page>
Or you install my chinese enabler CAB.
(but you must uninstall previouse cab befor install thia\s)
http://www.asukal.jp/English/LocalizeCABS.htm
PLS go to the bottom of above page, then dl for the cab you wantt.
cab should be "for the WM5"
those were included registry and font. not mingliuy but chinese font in it.
I don't know any hebrew.
But I think the display hebrew on last pic is not correct,because there are so many same character in one line.
Asukal said:
1; used my CAB right?
this can install wince.nls and enabler for the nls files.
Text message need the sytem font to discribe your languages.
so it means chinese font should be register as "System font"
you have never done that., i guess so.
Ok following the sample of font registry for Mingliu font.
1;way 1 <with the cab in this page>
import this with registry editor and put the Mingliu into windows folder.
and make soft reset, then you can solve all problem.
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\FontLink\SystemLink]
"MingLiu="\\windows\\tahoma.ttf,Tahoma"
"PMingLiu"="\\windows\\tahoma.ttf,Tahoma"
"Courier New"="\\windows\\mingliu.ac3,PMingLiu"
"Tahoma"="\\windows\\mingliu.ac3,PMingLiu"
Click to expand...
Click to collapse
I use the PHM Registry Editor. Do I just create new "String" values? Also, do I have to create the location in the registry as it isn't there?
The font file is named HDZB_74.TTF by the way.
arabic doesn't seem correct from the screen shot... the right to left encoding isn't enabled which is making each word to print on it's own instead of getting merged
ady> Arabic "right to left", can it solve by registry tweak?
if so can you let me know??? i can not read Arabic acutualy
or the problem of font???
ft1860> i also can not know hebrew, so no way to know about the problem also.
also the problem came from Font or registry???
any way this ROM or cab just gives you wince.nls for encoding.
Hope each languages Experts tweak for detail and font link to discribe
correctly. i just put uni-code font to the demo fro other language which i couldnt read
richardrai>
yes you make new valu. if you think it is troublesum.
1:write your registry with text editor and save it as xxxxxx.reg file.
the head of registry need "REGEDIT 4"
2;use the TRE free registry editre;
http://www2r.biglobe.ne.jp/~tascal/download/pocketpc/tre_e.htm
and use import command from menu, them import the reg you saved.
then make soft reset.
if your registry is correct, your font can use as system font
3
Good luck.
Thank you for your effort. Finally there is a solution.
ady> Arabic "right to left", can it solve by registry tweak?
if so can you let me know??? i can not read Arabic acutualy Crying or Very sad
or the problem of font???
Click to expand...
Click to collapse
It may be solved by a registry tweak.
It is an old issue between the customers and the sponsor of I-mate. We have been seeking a convenient free solution to the right-to-left problem for a long time.
Anyway, I don't think the problem is from the font.
There is an example of a left-to-right text on the following link (the flash on the right side). http://www.imaginet-software.net/index.aspx?p=arabizer
Asukal said:
1:write your registry with text editor and save it as xxxxxx.reg file.
the head of registry need "REGEDIT 4"
Click to expand...
Click to collapse
Sorry just want to make sure whether there should be a space between "REGEDIT" and "4"?
No need Space. REGEDIT4 is ok. sorry make you confuse.
Arabic. ;;if some boday help me discribe the Registry, i will make a patch CAb for that.
too difficult to understand me that language
It works on WM5 already?! Hmmm.. the last time I checked it doesn't. Will check it out this weekend finger cross
I think it's font problem. Because even my device does not support display from left to right, my display of Arabic is perfectly correct. I use a font called DFHeiMedium from Dynalab. It is a unicode font.
Asukal said:
ady> Arabic "right to left", can it solve by registry tweak?
if so can you let me know??? i can not read Arabic acutualy
or the problem of font???
ft1860> i also can not know hebrew, so no way to know about the problem also.
also the problem came from Font or registry???
any way this ROM or cab just gives you wince.nls for encoding.
Hope each languages Experts tweak for detail and font link to discribe
correctly. i just put uni-code font to the demo fro other language which i couldnt read
richardrai>
yes you make new valu. if you think it is troublesum.
1:write your registry with text editor and save it as xxxxxx.reg file.
the head of registry need "REGEDIT 4"
2;use the TRE free registry editre;
http://www2r.biglobe.ne.jp/~tascal/download/pocketpc/tre_e.htm
and use import command from menu, them import the reg you saved.
then make soft reset.
if your registry is correct, your font can use as system font
3
Good luck.
Click to expand...
Click to collapse

\000 <or \0x00> in dll on latest WM5

PLS some boday help!
to edit dll / mui / exe in Universal latest ROM, such like V1.30,
they have the \000 at the end of each Strings Tables` sentence line.
also instmsgrresources.dll in old version ROM has that.
But once i edited or transrate those strings table, \000 were missed and couldnt inject this again into Strings Tables.
Used Resource Hacker.exe---PE Explore,,VS2005. all of them were same,
couldnt.
Do anyboday have a solituions?
exaples from Insantmessage dll
----------------------------------------------------------------------------------
STRINGTABLE
BEGIN
65 "%s may not reply because his or her status is set to Away.\000"
67 "%s can't reply because he or she is not in your Allow List.\000"
68 "Your block of %s is not in effect for this conversation.\000"
70 "%s may not reply because his or her status is set to On The Phone.\000"
71 "%s may not reply because his or her status is set to Be Right Back.\000"
72 "%s may not reply because his or her status is set to Away.\000"
73 "%s may not reply because his or her status is set to Out To Lunch.\000"
Hello Asukal!
I noticed those too, but I usually use Platform Builder or one of the IDEs (Visual Studio or eVC) to edit the resources.
There the \000 are not shown for every string (at least not in coredll.dll and such) but they are preserved where present. Also I try to avoid deleting them in the first place, just type the translation in.
Worked fine so far.
I am still wondering why there are 3 zeros. In C\C++ string end is symbolized by the zero value character '\0', but why the extra '00'.
Any way, try a different resource editor, and good luck.
Hope this helps.
thanks for your replay.
On PE Explore<resource hunter also> discribed \0x00
VS5 discribed \000.
different something.
some of dll didnt have it.
but new dll i need edit has it
Any way,i will keep on trying to use another tool. but i already used out what i know.
Serching again!
My suggestion is evaluation version of Platform Builder 5. It is free, but takes a long time to download (about 2.5 gigs for minimum installation).
But I know for a fact that it will produce usable MUIs after you edit the resources.
The 0x00 and 000 are the same thing, I am pretty sure they are just two different representations of the 0 character PE explorer choosing to display the values in hex. the 0x is just for esthetics.
Also see if the resulting MUIs work, even if you can't see the \000. It is possible that the character is still there and the editor just won't display it because it 'realized' it means 'end of string'.
thanks again
i have Plat form Builder also.
But ..
you mean Build OS with wrokable MUI with PB, then use those MUI to WM5 device?
or i can edit dll with PBuilder?
thanks again
Just like you can open a DLL with Visual studio to see resources, same can be done with Platform builder, no need to build an image.
Just drag and drop.
thanks again, ya tried it.
1;edit with PB and did not lost \000 as you said.
but another problems
2;edeted dll <to mui> can not be signed.
3;Japanese Chalactors were not discrbed correctly on device.
but open it again with PB, it was correctly discribed.....
so i addapted those String Tables to another living empty dll,
then i can sign....
but the chlactor problems were not solved yet!
i will try to edit chinese mui to japanese.
it also 2 bytes chalactor,.....
You may need to replace wince.nls and add a code page to it. I don't know what code pages are needed for Japanese or Chinese, but try this:
Create a new platform for pocket PC with PB and make sure to add Japanese and all possible code pages to the platform.
(sorry, I don't remember where exactly that menu is but it's there somewhere).
Do 'sysgen' on the project. Then search the project directory and all sub-directories. You will fined a proper wince.nls.
I think you will need 'usemynls.exe' you once told me about, to swhitch the original nls with this one.
Hope that helps.
thanks. but i meant it is not problem of OS code page.
i already made wince.nls and injected into ROM,
and worked fine. also all of dll and exe had changed japanese and wroked well.
@Asian Languages Supported QTEK 1.30 ROM with A2DP+Push Mail
http://forum.xda-developers.com/viewtopic.php?t=46644&highlight=
@80% T-chinese i-mate 13 ROM
http://forum.xda-developers.com/viewtopic.php?t=43606&highlight=
@Way to make your Language OS for Universla
http://forum.xda-developers.com/viewtopic.php?t=48093&highlight=
Only dll for MSN messenger was not finished.
also i want to use latest shellress.dll and tshres.dll on my localized one.
those two have some defferent resource with previouse versions.
<but with old resources, lates one also work exept Password Function>
just i meant was chalactors were broken if i transrate with PB.
i guess it should be the English word to say it. but i can know how to say.
seems to be some non-word chalactores.
But if Open with PB again, it can read JP.
i guess Chalactor code of PB is not correct for our Language??
<our language means not Alphabet chalactores>
i am using PB Japanese interface version.
now i got solution!
1;change Country ID from Engllish and Japanese for all resources in target dll which i want to transrate.
2:then open with PB and edit to japanese.
3;save it as mui
4;addapt all resources i need to living empty dll
5;then make it signature.
finaly japanese are correctry discibed without missing \000 !
now i am procceeding to transrate Instant messenger dll!!
i dont know why japanese Instant messenger was not existing!
on SDK, Chinese, Korean and the other languages' instant messenger were eixinsing, but only Japanese OS and SDK also doesnt have it!!
wandering that! but any way, i will finis it!
Thanks a lot! :wink:
31/8/2008
Two years after, I found this thread reaaaaallllyy USEFUL.
Thanks masters!
LEO

Help with reg/app hack?

Hey everyone,
I am currently writing code that parses sites into a mobile compatible format. It makes the links mms:// format. I set TCPMP to be the default player for what I am doing. The issue I am having is I always get the error 'this link may be unsafe' from PIE due to the mms:// link. Is there a reg edit / application fix that can resolve this issue?
-Anthony

Windows Mobile Localization

I need to deploy an application that have arabic text to the end user without the need of installing an arabizer software (cab file).
Is there a way to deploy certain files [i.e font file] or adding some registry keys to accomplish this?
Knowing that the CF 2.0 throws "UnSupported Exception" when trying to encode arabic text in "windows-1256" encoding. how can I avoid this too?
Or is there a work around to avoid using this encoding and still display arabic text?
To cut it short, I need to display an arabic text on a WM phone that doesn't have an arabizer installed, Is that possible?
Thanks

Categories

Resources