Android 4.0 아이스크림 샌드위치 버전이 공개되면서 저 같이 안드로이드 개발에 관심이 많거나 직업으로 있으신 분들은 굉장히 큰 관심을 가지고 있을 듯 합니다.
전체적으로 보니, 안드로이드 4.0은 굉장히 중요한 플랫폼인데, API Level은 14입니다. 또한 Social API 가 적용이 되네요. 아마도 앱제작할 때 요런 Social API가 바로 적용이 될 듯 보입니다.
Invite intent는 이러한 소셜을 통해 친구들을 초대할 수 있는 기능으로 보입니다. 그 외에도 Large Photo(이 기술은 연락처 등에 있는 작은 사진을 클릭하면 큰 사진으로 보여지는 기술이라 생각됩니다) Calendar Provider, Voicemail Provider, Media types에는 https/http live streaming, AAC audio encoding, WEBP image 등이 지원이 됩니다.
Camera 기능은 가장 마음에 들고 앞으로 기대되는 기술이 Face Detection 이란 기술입니다. 아마 이 기술이 안면인식을 통해 잠금이 풀리는 기술인 것 같은데, 이 외에도 인식 기술을 다른 앱에서도 응용할 수 있으리라 보입니다.
Camera
The Camera
class now includes APIs for detecting faces and controlling focus and metering areas.
Face detection
Camera apps can now enhance their abilities with Android’s face detection APIs, which not only detect the face of a subject, but also specific facial features, such as the eyes and mouth.
To detect faces in your camera application, you must register a Camera.FaceDetectionListener
by calling setFaceDetectionListener()
. You can then start your camera surface and start detecting faces by calling startFaceDetection()
.
When the system detects one or more faces in the camera scene, it calls the onFaceDetection()
callback in your implementation of Camera.FaceDetectionListener
, including an array ofCamera.Face
objects.
An instance of the Camera.Face
class provides various information about the face detected, including:
- A
Rect
that specifies the bounds of the face, relative to the camera's current field of view - An integer betwen 1 and 100 that indicates how confident the system is that the object is a human face
- A unique ID so you can track multiple faces
- Several
Point
objects that indicate where the eyes and mouth are located
Note: Face detection may not be supported on some devices, so you should check by calling getMaxNumDetectedFaces()
and ensure the return value is greater than zero. Also, some devices may not support identification of eyes and mouth, in which case, those fields in the Camera.Face
object will be null.
또 이전 포스팅에서 말씀드렸던 NFC 안드로이드 빔 기술 부분은,
Android Beam (NDEF Push with NFC)
Android Beam is a new NFC feature that allows you to send NDEF messages from one device to another (a process also known as “NDEF Push"). The data transfer is initiated when two Android-powered devices that support Android Beam are in close proximity (about 4 cm), usually with their backs touching. The data inside the NDEF message can contain any data that you wish to share between devices. For example, the People app shares contacts, YouTube shares videos, and Browser shares URLs using Android Beam.
To transmit data between devices using Android Beam, you need to create an NdefMessage
that contains the information you want to share while your activity is in the foreground. You must then pass the NdefMessage
to the system in one of two ways:
- Define a single
NdefMessage
to push while in the activity:Call
setNdefPushMessage()
at any time to set the message you want to send. For instance, you might call this method and pass it yourNdefMessage
during your activity’sonCreate()
method. Then, whenever Android Beam is activated with another device while the activity is in the foreground, the system sends theNdefMessage
to the other device. - Define the
NdefMessage
to push at the time that Android Beam is initiated:Implement
NfcAdapter.CreateNdefMessageCallback
, in which your implementation of thecreateNdefMessage()
method returns theNdefMessage
you want to send. Then pass theNfcAdapter.CreateNdefMessageCallback
implementation tosetNdefPushMessageCallback()
.In this case, when Android Beam is activated with another device while your activity is in the foreground, the system calls
createNdefMessage()
to retrieve theNdefMessage
you want to send. This allows you to define theNdefMessage
to deliver only once Android Beam is initiated, in case the contents of the message might vary throughout the life of the activity.
In case you want to run some specific code once the system has successfully delivered your NDEF message to the other device, you can implement NfcAdapter.OnNdefPushCompleteCallback
and set it with setNdefPushCompleteCallback()
. The system will then call onNdefPushComplete()
when the message is delivered.
On the receiving device, the system dispatches NDEF Push messages in a similar way to regular NFC tags. The system invokes an intent with the ACTION_NDEF_DISCOVERED
action to start an activity, with either a URL or a MIME type set according to the first NdefRecord
in the NdefMessage
. For the activity you want to respond, you can declare intent filters for the URLs or MIME types your app cares about. For more information about Tag Dispatch see the NFC developer guide.
If you want your NdefMessage
to carry a URI, you can now use the convenience method createUri
to construct a new NdefRecord
based on either a string or a Uri
object. If the URI is a special format that you want your application to also receive during an Android Beam event, you should create an intent filter for your activity using the same URI scheme in order to receive the incoming NDEF message.
You should also pass an “Android application record" with your NdefMessage
in order to guarantee that your application handles the incoming NDEF message, even if other applications filter for the same intent action. You can create an Android application record by calling createApplicationRecord()
, passing it your application’s package name. When the other device receives the NDEF message with the application record and multiple applications contain activities that handle the specified intent, the system always delivers the message to the activity in your application (based on the matching application record). If the target device does not currently have your application installed, the system uses the Android application record to launch Android Market and take the user to the application in order to install it.
If your application doesn’t use NFC APIs to perform NDEF Push messaging, then Android provides a default behavior: When your application is in the foreground on one device and Android Beam is invoked with another Android-powered device, then the other device receives an NDEF message with an Android application record that identifies your application. If the receiving device has the application installed, the system launches it; if it’s not installed, Android Market opens and takes the user to your application in order to install it.
You can read more about Android Beam and other NFC features in the NFC Basics developer guide. For some example code using Android Beam, see the Android Beam Demo.
이부분도 얼굴인식 만큼이나 기대되는 기술입니다. NFC는 AR기술의 하나로 예를 들면 교통카드같이 가까이 대면 서로간에 데이터를 송수신할 수 있는 기술입니다. 이 외는 많이 비슷한 것 같습니다.
궁금한 점은 기존 개발방법대로 그대로 가고, 라이브러리만 추가되는건지가 궁금해지네요. 조만간 해보고 포스팅해보겠습니다~!
'옛글 > 모바일 이야기' 카테고리의 다른 글
2G 피쳐폰 사용자들 KT는 왜 폐지를 시킬까? (2) | 2011.10.24 |
---|---|
망고폰을 분석해보다 '포커스' (0) | 2011.10.20 |
안드로이드 4.0(아이스크림 샌드위치) 달라진 점은? (0) | 2011.10.19 |
iOS 업데이트 방법과 GM torrent & itunes 10.5 파일 다운 (2) | 2011.10.14 |
카카오톡 2.5.0 업데이트 겁나빠른황소엔진의 정체 (0) | 2011.10.13 |