Computer/J2ME for GSM
-
MMAPI Player 사용시 주의점Computer/J2ME for GSM 2005. 6. 16. 02:58
Most devices have a limit to the number of Player objects - or at least, to how many Player objects can be held in a PREFETCHED state at the same time. For many devices, this limit is one. "Realize" the players, but don't prefetch them - they'll be prefetched automatically when they play. I'd recommend using a PlayerListener to deallocate the players after they play, to avoid holding too many in..
-
resource 압축 방법 from Nokia forumComputer/J2ME for GSM 2005. 3. 17. 04:26
You can also save space by concatenating the files into one. You can do this in Windows from a command line, using the copy command. copy /b first.png + second.png + third.png allpngs.dat Type copy /? for details. If you load the complete file ("allpngs.dat") into a byte array, individual images can be extracted using the Image.createImage (byte [] buffer, int offset, int size) method. You will ..
-
J2ME Phone Memory TestComputer/J2ME for GSM 2005. 1. 12. 23:01
Nokia Series 40 platform 메모리 최적화 과정중에 발견한 결과들 1. Just Creating InputStream of size 9215, 5722 7210 200412 - 191180 = 9232 bytes(9215 bytes) 200412 - 194672 = 5740 bytes(5722 bytes) 6230 7647680 - 7638444 = 9236 bytes(9215 bytes) 7647680 - 7641936 = 5744 bytes(5722 bytes) ... InputStream object size is as large as the file size. 2. Creating InputStream & Image of size 442 7210 : 1968 bytes 6230 :..
-
RecordStore close 문제 해결Computer/J2ME for GSM 2004. 12. 14. 11:41
Nokia 3100 기종에서는 RecordStore를 닫지 않으면 저장이 안된다. open/close 짝이 맞아야 하고 끝나기 전에 반드시 닫아야 한다. 따라서 되도록 열고 나서 빨리 닫는 것이 좋은데 반드시 닫히는 것을 보장하기 위해서 try - catch - finally 구문을 이용하면 좋다. 예를 들면 void saveOption() { try { RecordStore optionStore = RecordStore.openRecordStore("GGoption", true); ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); dos.writeBoolean(s..
-
System.gc가 gc를 enforce하는가?Computer/J2ME for GSM 2004. 12. 14. 08:00
J2ME의 System 에서 (J2SE도 같은 정의가 있다.) public static void gc() Runs the garbage collector. Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded ..
-
Command Handling in MIDlets on T610 and Z600Computer/J2ME for GSM 2004. 11. 2. 20:01
t610은 softkey를 keyPressed에서 catch할 수 없기 때문에 Command를 이용해야 한다. 그런데 자꾸 application 에러가 나와서 다음 기사를 찾게 되었다. 요약하면 softkey를 눌러서 commandAction이 호출되는데, t610이나 z600은 key를 queue에 넣기 때문에 commandAction이 여러번 호출될지도 모른다는 이야기이다. ----------- November 2003 Command Handling in MIDlets on T610 and Z600 When deploying your MIDP application to the device and starting to test it, you may find that you sometimes get th..