Archive for March, 2012

ตอนนี้เทรนที่เห็นได้ชัดเลยคือการใช้อินเตอร์เน็ตผ่านมือถือ โดยที่ตัวเลขล่าสุดของผู้ใช้อินเตอร์เน็ตบนมือถือในเมืองไทยตอนนี้อยู่ที่ประมาณ 18 ล้านคน (เพิ่มจากปีที่แล้วที่ 12 ล้านคน) และมีท่าทีว่าจะเพิ่มขึ้นเรื่อยๆ ไม่ว่าจะเป็นเพราะราคาของโทรศัพท์สมาร์ทโฟนที่ต่ำลง ทำให้การเข้าถึงตัวฮาร์ดแวร์ขยายกว้างมากขึ้น หรือจะเป็นราคาค่าบริการอินเตอร์เน็ตบนมือถือที่มีให้เลือกสำหรับหลากหลายความต้องการมากขึ้น


Internet usage is sky-rocketing throughout the Asia-Pacific region, obviously making the growth of social media the fastest in the world, as you’ll see, it’s not all about Facebook, but it still leads the way across the region, at least for now. This is a nice collective Infographic from Burson-Marsteller.

Comparison of location estimation accuracy in Wi-Fi – indoor positioning system
1. Introduction:

Indoor positioning technology is an important issue to be addressed for providing any kind of location based services. There were lot of approaches for this technology by the user of active sensors like active badge, active bat, etc. (Hightower and Borriello, 2001), and some approaches use the in-building Wi-Fi networks for indoor positioning. The use of Wi-Fi signals as a potential positioning system within buildings has opened doors for many applications. Lot of research is being undertaken in this domain to find a more viable solution of location positioning using the Wi-Fi signals within the building with higher accuracy. This is because of the ubiquitous availability of Wi-Fi signals in almost all the buildings, so no additional hardware is required to install a positioning system in the buildings.


This is a post by iOS Tutorial Team member Matthijs Hollemans, an experienced iOS developer and designer.

In iOS, apps can’t do a lot in the background. Apps are only allowed to do limited set of activities so battery life is conserved.

But what if something interesting happens and you wish to let the user know about this, even if they’re not currently using your app?

For example, maybe the user received a new tweet, their favorite team won the game, or their dinner is ready. Since the app isn’t currently running, it cannot check for these events.

Luckily, Apple has provided a solution to this. Instead of your app continuously checking for events or doing work in the background, you can write a server-side component to do this instead.

And when an event of interest occurs, the server-side component can send the app a push notification! There are three things a push notification can do:

  • Display a short text message
  • Play a brief sound
  • Set a number in a badge on the app’s icon

You can combine these however you see fit; for example, play a sound and set the badge but not display a message.

In this 2-part tutorial series, you’ll get to try this out for yourself by making a simple app that uses APNS!

In this first part, you’ll learn how to configure your app to receive push notifications and receive a test message.

This tutorial is for intermediate or advanced iOS developers. If you are still a beginner to iOS, you should check out some of the other tutorials on this site first. Also, it’s highly recommended that you review these two tutorials first (or have equivalent knowledge):


To use the database API you have to configure your WebView to accept HTML5 database calls:

WebSettings settings = webView.getSettings();  

You may also override the onExceededDatabaseQuota method of your WebChromeClient if you want to control your storage quota:

public void onExceededDatabaseQuota(String url, String
databaseIdentifier, long currentQuota, long estimatedSize, long
totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {

iOS File System Basics

Posted: March 4, 2012 in iPhone Dev

The file systems in Mac OS X and iOS handle the persistent storage of data files, apps, and the files associated with the operating system itself. Therefore, the file system is one of the fundamental resources used by all processes.

The file systems in Mac OS X and iOS are both based on the UNIX file system. All of the disks attached to the computer—whether they are physically plugged into the computer or are connected indirectly through the network—contribute space to create a single collection of files. Because the number of files can easily be many millions, the file system uses directories to create a hierarchical organization. Although the basic directory structures are similar for iOS and Mac OS X, there are differences in the way each system organizes apps and user data.

Before you begin writing code that interacts with the file system, you should first understand a little about the organization of file system and the rules that apply to your code. Aside from the basic tenet that you cannot write files to directories for which you do not have appropriate security privileges, apps are also expected to be good citizens and put files in appropriate places. Precisely where you put files depends on the platform, but the overarching goal is to make sure that the user’s files remain easily discoverable and that the files your code uses internally are kept out of the user’s way.


Open Website in Android

Posted: March 4, 2012 in Android Dev

To open a URL/website you do the following:

String url = "";
Intent i = new Intent(Intent.ACTION_VIEW);

Here’s the documentation of Intent.ACTION_VIEW.