10월, 2010의 게시물 표시

Samsung Galaxy S GPS Problem

Eventually I'd got a number of Samsung Galaxy S phones and test GPS function of them. But the same codes to get latitude and longitude doesn't work on about half of the devices. It makes me embarrassing. The camera, GPS are very important functional devices of smart phone, but Samsung is selling the apparently problematic product which has never been tested enough.

Android, Google~

I love Google, they're great!, their search engine, their philosophy on the open source. But I'm sorry for that I can't agree with that in the respect of Android SDK. Because First, there are too many deprecated functions, Second, the way of the generic operation of multi-something, especially asynchronous operation of Intent system. (I think they're confused with the concept of multiple task with simultaneous runs.) If you develop with Android, the Complexity could reach : the number of Android SDK Problems (mis-funtions + sdk versions + xml mis-funtions) x the number of device bugs (Samsung Galaxy might be the best bug generator) If Google don't think it seriously, people are getting to forget Android phones replacing with Windows Phone 7 and iPhone.

The orientation of Samsung Galaxy S camera bug

If you made something related with camera with Samsung Galaxy S based on Android SDK, you must meet lots of problems. (I hope you don't meet such a case ...) Changing camera parameter is one of them. If you change the orientation of the camera screen of Galaxy S. looks like; parameters.set("orientation", "portrait"); (Sure, the default orientation is completely nonsense, this is why you try to do it.) The screen is suddenly filled with noise and mispositioned. You should override onMeasure function like the below codes; // this functions is for correcting the screen position of Galaxy S. @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { WindowManager w = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); Display d = w.getDefaultDisplay(); int dwidth = d.getWidth(); int dheight = d.getHeight(); if (dwidth < dheight) { setMeasuredDimensio

MySQL of MAMP : root, root

the default password of root of MySQL installed by MAMP is root .

High Performance Server in Windows

To accomplish very high performance in the Windows server side, 1. IOCP IOCP(Input/Output Completion Port) is good to get the signals asynchronously when the unit in/out operation completes. 2. AcceptEx To set up socket structure when a huge number of users enter is too late to response, so prepare the enough number of sockets with AcceptEx. 3. Pre-Allocated Memory Don't use allocator like new or malloc without any caution in server side, it hurts the performance seriously. Allocate enough memory before you use memory. 4. Avoid Multiple Threads This is overlapped with the IOCP issue, anyway you avoid to spawn multiple threads except the necessary ones to handle each connection. Spawning threading itself needs to generate context and to accompany context switching. 5. TCP/IP TCP/IP ensures the delivery and sequence of the packet. But it doesn't ensure to match the number of reading counts with the number of sending counts, so you need to input the length information in the packe

android : change hosts in emulator

(you need to make an avd (android virtual device) by using eclipse or android tools, here "my_avd".) 1. RUN EMULATOR in avd folder (for example, " /Users/ /.android/avd/my_avd.avd" ), /Applications/android-sdk-mac_86/tools/emulator -avd my_avd -partition-size 128 (if you don't change the partition size, you must meet Out of Memory error during pushing hosts into the emulator.) 2. PULL/PUSH HOSTS in the folder " /Applications/android-sdk-mac_86/tools", adb remout adb pull /system/etc/hosts ./hosts --> Edit the hosts! adb push ./hosts /system/etc/hosts DONE!