[a3]deview 2012 network binder
DESCRIPTION
TRANSCRIPT
2.1����������� ������������������ ����������� ������������������ Motives����������� ������������������
2.2����������� ������������������ ����������� ������������������ Service����������� ������������������ Requirements����������� ������������������
3.1����������� ������������������ ����������� ������������������ It����������� ������������������ Should����������� ������������������ Be����������� ������������������ …⋯����������� ������������������
3.2����������� ������������������ ����������� ������������������ Key����������� ������������������ Technical����������� ������������������ Ideas����������� ������������������
3.3����������� ������������������ Technical����������� ������������������ Issues����������� ������������������
3.4����������� ������������������ ����������� ������������������ Future����������� ������������������ Works����������� ������������������
4.1����������� ������������������ ����������� ������������������ Remote����������� ������������������ Content����������� ������������������ Provider����������� ������������������
4.2����������� ������������������ ����������� ������������������ Remote����������� ������������������ Intent����������� ������������������
■ 플랫폼����������� ������������������ Biz����������� ������������������ 영역에서����������� ������������������ 고객에게����������� ������������������ 새로운����������� ������������������ 가치를����������� ������������������ 제공하고����������� ������������������ 세계적����������� ������������������ 수준의����������� ������������������ 경쟁력을����������� ������������������ 가진����������� ������������������ 플랫폼����������� ������������������ 사업을����������� ������������������ 수행하고자����������� ������������������ 2011년����������� ������������������ 10월����������� ������������������ SK텔레콤으로부터����������� ������������������ 분할하여����������� ������������������ 신설한����������� ������������������ 회사����������� ������������������
■ Contents����������� ������������������ Delivery����������� ������������������ /����������� ������������������ LBS����������� ������������������ /����������� ������������������ New����������� ������������������ Media����������� ������������������ /����������� ������������������ Commerce����������� ������������������ &����������� ������������������ Ad����������� ������������������ /����������� ������������������ Communication����������� ������������������ &����������� ������������������ SNS����������� ������������������ /����������� ������������������
Music����������� ������������������ /����������� ������������������ Internet����������� ������������������ &����������� ������������������ Finance����������� ������������������ Portal����������� ������������������ /����������� ������������������ R&D����������� ������������������ 등����������� ������������������ 다양한����������� ������������������ 사업����������� ������������������ 영역에서����������� ������������������ 가치를����������� ������������������ 창출����������� ������������������
■ 대표적����������� ������������������ 서비스는…⋯����������� ������������������
■ 더����������� ������������������ 많은����������� ������������������ 정보는…⋯����������� ������������������ • 홈����������� ������������������ 페이지:����������� ������������������ ����������� ������������������ http://www.skplanet.co.kr/����������� ������������������
• 인재����������� ������������������ 채용:����������� ������������������ http://www.skplanet.co.kr/Recruit/Vision.aspx����������� ������������������
■ Binder����������� ������������������ -����������� ������������������ The����������� ������������������ facility����������� ������������������ to����������� ������������������ provide����������� ������������������ bindings����������� ������������������ to����������� ������������������ functions����������� ������������������ and����������� ������������������ data����������� ������������������ from����������� ������������������ one����������� ������������������ execution����������� ������������������ environment����������� ������������������ to����������� ������������������ another����������� ������������������
■ Basic����������� ������������������ Usage����������� ������������������ • Create����������� ������������������ AIDL����������� ������������������
• Implement����������� ������������������ Remote����������� ������������������ Interface����������� ������������������ (Method)����������� ������������������
• Create����������� ������������������ and����������� ������������������ return����������� ������������������ Stub����������� ������������������ Object����������� ������������������ in����������� ������������������ onBind()����������� ������������������ method����������� ������������������ in����������� ������������������ Service����������� ������������������
• Request����������� ������������������ bindService()����������� ������������������ and����������� ������������������ get����������� ������������������ Remote����������� ������������������ Interface����������� ������������������ through����������� ������������������ onServiceConnected()����������� ������������������ callback����������� ������������������
• Use����������� ������������������ Remote����������� ������������������ Interface����������� ������������������ just����������� ������������������ like����������� ������������������ local����������� ������������������ Interface����������� ������������������
■ Basic����������� ������������������ Concept����������� ������������������ • Communication����������� ������������������ Model����������� ������������������
- Cllient/Server����������� ������������������
- Proxy/Stub����������� ������������������
• Transaction����������� ������������������
- Request����������� ������������������ and����������� ������������������ reply����������� ������������������
• Parcel����������� ������������������ and����������� ������������������ marshalling/unmarshalling����������� ������������������
Client����������� ������������������ Service����������� ������������������ Proxy����������� ������������������ Stub����������� ������������������
IRemoteSvc.Stub����������� ������������������
IRemoteSvc.aidl����������� ������������������
interface IRemoteSvc { void foo();
}����������� ������������������
public����������� ������������������ interface����������� ������������������ IRemoteSvc����������� ������������������ extends����������� ������������������ android.os.Iinterface����������� ������������������ {����������� ������������������
����������� ������������������ public����������� ������������������ static����������� ������������������ abstract����������� ������������������ class����������� ������������������ Stub����������� ������������������ extends����������� ������������������ android.os.Binder����������� ������������������ implements����������� ������������������ IRemoteSvc����������� ������������������ {����������� ������������������
����������� ������������������ ����������� ������������������ public����������� ������������������ static����������� ������������������ IRemoteSvc����������� ������������������ asInterface(android.os.IBinder����������� ������������������ obj)����������� ������������������ {����������� ������������������ …⋯����������� ������������������ }����������� ������������������
����������� ������������������ ����������� ������������������ public����������� ������������������ boolean����������� ������������������ onTransact(int����������� ������������������ code,����������� ������������������ Parcel����������� ������������������ data,����������� ������������������ Parcel����������� ������������������ reply,����������� ������������������ int����������� ������������������ flags)����������� ������������������ {����������� ������������������ …⋯����������� ������������������ }����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ private����������� ������������������ static����������� ������������������ class����������� ������������������ Proxy����������� ������������������ implements����������� ������������������ IRemoteSvc����������� ������������������ {����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ public����������� ������������������ void����������� ������������������ foo()����������� ������������������ {����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ //����������� ������������������ mRemote����������� ������������������ ==����������� ������������������ IBinder����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ mRemote.transact();����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ }����������� ������������������
����������� ������������������ ����������� ������������������ }����������� ������������������
����������� ������������������ }����������� ������������������
}����������� ������������������
IRemoteSvc.java����������� ������������������
public����������� ������������������ void����������� ������������������ foo()����������� ������������������ {����������� ������������������ ����������� ������������������ //����������� ������������������ …⋯����������� ������������������
}����������� ������������������
implements����������� ������������������ IRemoteSvc.Stub.Proxy����������� ������������������
public����������� ������������������ void����������� ������������������ foo()����������� ������������������ {����������� ������������������ ����������� ������������������ mRemote.transact();����������� ������������������
}����������� ������������������
IActivityManager����������� ������������������ IServiceConnection����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������ Thread����������� ������������������
Binder����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������
Main����������� ������������������ Thread����������� ������������������
Client����������� ������������������ Service����������� ������������������ Proxy����������� ������������������ Stub����������� ������������������
Activity����������� ������������������ Manager����������� ������������������ Service����������� ������������������
①����������� ������������������ bindService(“IRemoteSvc”)����������� ������������������
③����������� ������������������ PKGMgr����������� ������������������ Lookup����������� ������������������
⑥����������� ������������������ return����������� ������������������ IRemoteService.Stub����������� ������������������ (Binder)����������� ������������������
②����������� ������������������ IActivityManager.bindService()����������� ������������������
⑦����������� ������������������ return����������� ������������������ IBinder����������� ������������������ (BinderProxy)����������� ������������������
Kernel����������� ������������������ Space����������� ������������������
User����������� ������������������ Space����������� ������������������
IRemoteSvc.Stub.Proxy����������� ������������������
⑧����������� ������������������ new����������� ������������������ IRemoteSvc.Stub.Proxy����������� ������������������ ④����������� ������������������ execute����������� ������������������ &����������� ������������������ attach����������� ������������������
⑤����������� ������������������ Create����������� ������������������ &����������� ������������������ Bind����������� ������������������ Service����������� ������������������
IRemoteSvc.Stub����������� ������������������ public����������� ������������������ void����������� ������������������ foo()����������� ������������������ {����������� ������������������ ����������� ������������������ //����������� ������������������ …⋯����������� ������������������
}����������� ������������������
implements����������� ������������������
IActivityManager����������� ������������������ IServiceConnection����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������ Thread����������� ������������������
Binder����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������
Main����������� ������������������ Thread����������� ������������������
Client����������� ������������������ Service����������� ������������������ Proxy����������� ������������������ Stub����������� ������������������
Activity����������� ������������������ Manager����������� ������������������ Service����������� ������������������
①����������� ������������������ call����������� ������������������ foo()����������� ������������������
③����������� ������������������ Call����������� ������������������ BinderProxy.transact()����������� ������������������
⑥����������� ������������������ Call����������� ������������������ foo()’s����������� ������������������ Implementation����������� ������������������
Kernel����������� ������������������ Space����������� ������������������
User����������� ������������������ Space����������� ������������������
IRemoteSvc.Stub.Proxy.foo()����������� ������������������
IRemoteSvc.Stub.onTransact()����������� ������������������
public����������� ������������������ void����������� ������������������ foo()����������� ������������������ {����������� ������������������ ����������� ������������������ //����������� ������������������ …⋯����������� ������������������
}����������� ������������������ ②����������� ������������������ Parcelizing����������� ������������������
public����������� ������������������ void����������� ������������������ foo����������� ������������������ ()����������� ������������������ {����������� ������������������ ����������� ������������������ Parcel����������� ������������������ _data����������� ������������������ =����������� ������������������ Parcel.obtain();����������� ������������������ ����������� ������������������ Parcel����������� ������������������ _reply����������� ������������������ =����������� ������������������ Parcel.obtain();����������� ������������������ ����������� ������������������ _data.writeInterfaceToken(DESCRIPTOR);����������� ������������������ ����������� ������������������ mRemote.transact(Stub.TRANSACTION_foo,����������� ������������������ _data,����������� ������������������ _reply,����������� ������������������ 0);����������� ������������������
}����������� ������������������
⑤����������� ������������������ De-Parcelizing����������� ������������������
④����������� ������������������ Binder.onTransact()����������� ������������������
public����������� ������������������ boolean����������� ������������������ onTransact(int����������� ������������������ code,����������� ������������������ Parcel����������� ������������������ data,����������� ������������������ Parcel����������� ������������������ reply,����������� ������������������ int����������� ������������������ flags)����������� ������������������ {����������� ������������������ ����������� ������������������ switch(code)����������� ������������������ {����������� ������������������ ����������� ������������������ case����������� ������������������ TRANSACTION_foo:����������� ������������������ ����������� ������������������ ����������� ������������������ data.enforceInterface(DESCRIPTOR);����������� ������������������ ����������� ������������������ ����������� ������������������ this.foo();����������� ������������������ ����������� ������������������ }����������� ������������������
}����������� ������������������
■ Binder는����������� ������������������ 단말����������� ������������������ 서비스����������� ������������������ 간����������� ������������������ 연동의����������� ������������������ 핵심이����������� ������������������ 되는����������� ������������������ 기술임����������� ������������������ ■ Binder를����������� ������������������ 통해����������� ������������������ 서로����������� ������������������ 다른����������� ������������������ App.들이����������� ������������������ 자신의����������� ������������������ Local����������� ������������������ Interface에����������� ������������������ 접근하듯이����������� ������������������ 서로간에����������� ������������������ 서비스����������� ������������������
연동을����������� ������������������ 할����������� ������������������ 수����������� ������������������ 있음����������� ������������������
■ 그러나,����������� ������������������ 만약����������� ������������������ 다른����������� ������������������ 디바이스에����������� ������������������ 있는����������� ������������������ 서비스와����������� ������������������ 연동하고자����������� ������������������ 한다면...����������� ������������������ • 일단����������� ������������������ 서버를����������� ������������������ 만들고...����������� ������������������
• 서로����������� ������������������ 다른����������� ������������������ 디바이스가����������� ������������������ 서버에����������� ������������������ 특정����������� ������������������ ID를����������� ������������������ 만들어����������� ������������������ 등록하여����������� ������������������ 서로를����������� ������������������ 찾을����������� ������������������ 수����������� ������������������ 있도록����������� ������������������ 해줘야����������� ������������������ 하고...����������� ������������������
• 서버와����������� ������������������ 단말����������� ������������������ 간,����������� ������������������ 단말과����������� ������������������ 단말����������� ������������������ 간����������� ������������������ 프로토콜을����������� ������������������ 설계해야����������� ������������������ 하고...����������� ������������������
• 또����������� ������������������ 배터리����������� ������������������ 문제가����������� ������������������ 있을지도����������� ������������������ 모르니,����������� ������������������ 서비스를����������� ������������������ 제공하는����������� ������������������ 디바이스����������� ������������������ 상의����������� ������������������ 서비스는����������� ������������������ Push를����������� ������������������ 받도록����������� ������������������ 해야����������� ������������������ 할����������� ������������������ 듯����������� ������������������ 하고...����������� ������������������
• 등등...����������� ������������������
■ 복잡하다!!����������� ������������������ ■ 서로����������� ������������������ 다른����������� ������������������ 디바이스����������� ������������������ 상에서도����������� ������������������ Binder를����������� ������������������ 이용����������� ������������������ 할����������� ������������������ 수����������� ������������������ 있으면����������� ������������������ 편하겠네����������� ������������������
Network����������� ������������������ Binder����������� ������������������
■ 네트워크����������� ������������������ 의존성����������� ������������������ 최소화����������� ������������������ • 모든����������� ������������������ 네트워크����������� ������������������ 환경(Cellular����������� ������������������ /����������� ������������������ WiFi,����������� ������������������ Behind����������� ������������������ the����������� ������������������ Firewall����������� ������������������ /����������� ������������������ Router,����������� ������������������ Private����������� ������������������ IP,����������� ������������������ etc)에서����������� ������������������ 서비스����������� ������������������
제공����������� ������������������ 가능해야����������� ������������������ 함����������� ������������������
■ 모든����������� ������������������ Android����������� ������������������ 디바이스����������� ������������������ 지원(주1)����������� ������������������
• 기����������� ������������������ 출시된����������� ������������������ Android����������� ������������������ 디바이스에서도,����������� ������������������ Android����������� ������������������ Framework����������� ������������������ 변경����������� ������������������ 없이����������� ������������������ 서비스����������� ������������������ 제공����������� ������������������ 가능해야����������� ������������������ 함����������� ������������������
■ 원격����������� ������������������ 서비스����������� ������������������ 검색����������� ������������������ 방법����������� ������������������ 제공����������� ������������������ • 원격����������� ������������������ 디바이스를����������� ������������������ Identify하고,����������� ������������������ 또한����������� ������������������ 원격����������� ������������������ 디바이스����������� ������������������ 내의����������� ������������������ 서비스를����������� ������������������ Identify����������� ������������������ 할����������� ������������������ 수����������� ������������������ 있는����������� ������������������ 방법����������� ������������������ 제공����������� ������������������
■ 개발����������� ������������������ 환경의����������� ������������������ 투명성����������� ������������������ 보장����������� ������������������ • 기존����������� ������������������ Binder����������� ������������������ 개발����������� ������������������ 환경(AIDL,����������� ������������������ Auto-generated����������� ������������������ Proxy/Stub����������� ������������������ code,����������� ������������������ Binder-related����������� ������������������ API)을����������� ������������������ 그대로
����������� ������������������ 이용할����������� ������������������ 수����������� ������������������ 있어야����������� ������������������ 함����������� ������������������
■ 최소����������� ������������������ 노력,����������� ������������������ 최대����������� ������������������ 효과����������� ������������������ • Network����������� ������������������ Binder를����������� ������������������ 위한����������� ������������������ 추가����������� ������������������ 개발����������� ������������������ 환경은����������� ������������������ One����������� ������������������ Package로����������� ������������������ 제공되어����������� ������������������ 적용이����������� ������������������ 최대한����������� ������������������ 간단해야����������� ������������������ 함����������� ������������������
■ 보안����������� ������������������ • 자기����������� ������������������ 단말����������� ������������������ 접근����������� ������������������ /����������� ������������������ 타인����������� ������������������ 단말����������� ������������������ 접근에����������� ������������������ 대한����������� ������������������ 보안����������� ������������������ 정책����������� ������������������ 제공����������� ������������������ 가능해야����������� ������������������ 함����������� ������������������
(주1)����������� ������������������ 전화번호를����������� ������������������ 가지는����������� ������������������ 단말에����������� ������������������ 국한함����������� ������������������
■ Security����������� ������������������ • 자기����������� ������������������ 단말����������� ������������������ 접근����������� ������������������
- 자기����������� ������������������ 단말����������� ������������������ 등록����������� ������������������ (SMS����������� ������������������ 인증)����������� ������������������
• 타인����������� ������������������ 단말����������� ������������������ 접근����������� ������������������
- Remote����������� ������������������ Binding����������� ������������������ 요청����������� ������������������ 시����������� ������������������ 서비스����������� ������������������ 제공����������� ������������������ 관련����������� ������������������ 사용자����������� ������������������ 동의����������� ������������������ 얻도록����������� ������������������ 함����������� ������������������
■ Device����������� ������������������ Look-up����������� ������������������
• 전화����������� ������������������ 번호에����������� ������������������ 기반����������� ������������������
• URI����������� ������������������ Scheme����������� ������������������ 이용하여����������� ������������������ 원격����������� ������������������ 디바이스����������� ������������������ 표현����������� ������������������
• URI����������� ������������������ Scheme����������� ������������������
- Scheme����������� ������������������ name:����������� ������������������ binder����������� ������������������
- Authority����������� ������������������
• userInfo:����������� ������������������ 전화����������� ������������������ 번호����������� ������������������
• Hostname:����������� ������������������ @skplanet.co.kr����������� ������������������
• Ex)����������� ������������������ binder://[email protected]����������� ������������������
■ Service����������� ������������������ Look-up����������� ������������������ • 기존����������� ������������������ Inteface(����������� ������������������ bindService()����������� ������������������ API)와����������� ������������������ 최대한����������� ������������������ 유사해야����������� ������������������ 함����������� ������������������
■ Remote����������� ������������������ Service����������� ������������������ Binding����������� ������������������ Request����������� ������������������ • Client����������� ������������������
■ Remote����������� ������������������ Service����������� ������������������ Export����������� ������������������ • AndroidManifest.xml����������� ������������������
■ Remote����������� ������������������ Service����������� ������������������ Creation����������� ������������������ • Server����������� ������������������
■ Remote����������� ������������������ Service����������� ������������������ Call����������� ������������������ • Client����������� ������������������
■ Hooking����������� ������������������ Binding����������� ������������������ Request����������� ������������������ &����������� ������������������ Serializing����������� ������������������ Remote����������� ������������������ Method����������� ������������������ Call����������� ������������������ • IRemoteSvc.Stub.Proxy����������� ������������������ 를����������� ������������������ 통한����������� ������������������ 원격����������� ������������������ 메소드����������� ������������������ 호출은����������� ������������������ 결국,����������� ������������������ 호출����������� ������������������ 시����������� ������������������ 전달된����������� ������������������ 인자를����������� ������������������ Parcel은����������� ������������������ 담은����������� ������������������ 후����������� ������������������ 시스템에서����������� ������������������ 생
성해����������� ������������������ 준(onServiceConnected)����������� ������������������ IBinder����������� ������������������ 객체(mRemote)의����������� ������������������ transact()����������� ������������������ 메소드를����������� ������������������ 호출하여����������� ������������������ Binder에����������� ������������������ 전달하는����������� ������������������ 것임
����������� ������������������ ����������� ������������������ 시스템이����������� ������������������ 반환하는����������� ������������������ IBinder����������� ������������������ 객체를����������� ������������������ My����������� ������������������ Own����������� ������������������ Implementation으로����������� ������������������ 바꿔����������� ������������������ 줄����������� ������������������ 수����������� ������������������ 있다면,����������� ������������������ transact()로����������� ������������������ 들어오는����������� ������������������
인자(code,����������� ������������������ data,����������� ������������������ reply,����������� ������������������ flags)를����������� ������������������ 직접����������� ������������������ Serialize하여����������� ������������������ 원격����������� ������������������ 디바이스에����������� ������������������ 네트워크로����������� ������������������ 전송����������� ������������������ 가능����������� ������������������ ����������� ������������������ Custom����������� ������������������ Binder����������� ������������������ 개
발����������� ������������������ /����������� ������������������ Custom����������� ������������������ Bind����������� ������������������ 기능����������� ������������������ 제공����������� ������������������
• 원격����������� ������������������ 디바이스에서는����������� ������������������ AIDL이����������� ������������������ 생성해준����������� ������������������ Stub����������� ������������������ 상의����������� ������������������ onTransact()����������� ������������������ 메소드가����������� ������������������ 클라이언트의����������� ������������������ IBinder.transact()����������� ������������������ 에����������� ������������������ 전달
된����������� ������������������ 인자를����������� ������������������ 동일하게����������� ������������������ 받아����������� ������������������ De-Parcelizing����������� ������������������ 하여����������� ������������������ 실제����������� ������������������ foo()����������� ������������������ 함수를����������� ������������������ 호출해����������� ������������������ 줌����������� ������������������ ����������� ������������������ 클라이언트에서����������� ������������������ 전달받은����������� ������������������ transact(
)����������� ������������������ 인자(code,����������� ������������������ data,����������� ������������������ reply,����������� ������������������ flags)만����������� ������������������ 그대로����������� ������������������ Input으로����������� ������������������ 넣어서����������� ������������������ IRemoveSvc.Stub.onTransact()����������� ������������������ 에����������� ������������������ 넣어주면����������� ������������������ 그냥����������� ������������������ 실
행되지����������� ������������������ 않을까?����������� ������������������
Binder����������� ������������������ Thread����������� ������������������
Client����������� ������������������ Service����������� ������������������ Proxy����������� ������������������ Stub����������� ������������������
①����������� ������������������ call����������� ������������������ foo()����������� ������������������ ③����������� ������������������ Call����������� ������������������ BinderProxy.transact()����������� ������������������
④����������� ������������������ Binder.onTransact()����������� ������������������
②����������� ������������������ Parcelizing����������� ������������������
⑤����������� ������������������ De-Parcelizing����������� ������������������
⑥����������� ������������������ Call����������� ������������������ foo()’s����������� ������������������ Implementation����������� ������������������ IRemoteSvc.Stub.Proxy.foo()����������� ������������������
IRemoteSvc.Stub.onTransact()����������� ������������������
public����������� ������������������ void����������� ������������������ foo()����������� ������������������ {����������� ������������������ ����������� ������������������ //����������� ������������������ …⋯����������� ������������������
}����������� ������������������
public����������� ������������������ void����������� ������������������ foo����������� ������������������ ()����������� ������������������ {����������� ������������������ ����������� ������������������ Parcel����������� ������������������ _data����������� ������������������ =����������� ������������������ Parcel.obtain();����������� ������������������ ����������� ������������������ Parcel����������� ������������������ _reply����������� ������������������ =����������� ������������������ Parcel.obtain();����������� ������������������ ����������� ������������������ _data.writeInterfaceToken(DESCRIPTOR);����������� ������������������ ����������� ������������������ mRemote.transact(Stub.TRANSACTION_foo,����������� ������������������ _data,����������� ������������������ _reply,����������� ������������������ 0);����������� ������������������
}����������� ������������������
public����������� ������������������ boolean����������� ������������������ onTransact(int����������� ������������������ code,����������� ������������������ Parcel����������� ������������������ data,����������� ������������������ Parcel����������� ������������������ reply,����������� ������������������ int����������� ������������������ flags)����������� ������������������ {����������� ������������������ ����������� ������������������ switch(code)����������� ������������������ {����������� ������������������ ����������� ������������������ case����������� ������������������ TRANSACTION_foo:����������� ������������������ ����������� ������������������ ����������� ������������������ data.enforceInterface(DESCRIPTOR);����������� ������������������ ����������� ������������������ ����������� ������������������ this.foo();����������� ������������������ ����������� ������������������ }����������� ������������������
}����������� ������������������
IActivityManager����������� ������������������ IServiceConnection����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������
Client����������� ������������������ Service����������� ������������������ Proxy����������� ������������������ Stub����������� ������������������
Remote����������� ������������������ Binder����������� ������������������ Relay����������� ������������������ Server����������� ������������������
RemoteBinderFactory����������� ������������������ RemoteBinder����������� ������������������
■ Overall����������� ������������������ Architecture����������� ������������������
IRemoteBinderService.Stub����������� ������������������ IRemoteBinderService.Stub.Proxy����������� ������������������
IRemoteBinderCallback.Stub.Proxy����������� ������������������ IRemoteBinderCallback.Stub����������� ������������������
Binder����������� ������������������
RemoteBinderServer����������� ������������������
EventMonitor����������� ������������������
Remote����������� ������������������ Activity����������� ������������������ Manager����������� ������������������ Service����������� ������������������
Remote����������� ������������������ Activity����������� ������������������ Manager����������� ������������������ Service����������� ������������������
IRemoteBinderService.aidl����������� ������������������ ����������� ������������������ interface����������� ������������������ IRemoteBinderService����������� ������������������ {����������� ������������������ ����������� ������������������ void����������� ������������������ doConnect(String����������� ������������������ uri,����������� ������������������ IRemoteBinderCallback����������� ������������������ cb);����������� ������������������ ����������� ������������������ void����������� ������������������ doRequest(in����������� ������������������ byte[]����������� ������������������ input,����������� ������������������ IRemoteBinderCallback����������� ������������������ cb);����������� ������������������
}����������� ������������������ ����������� ������������������ IRemoteBinderCallback.aidl����������� ������������������ ����������� ������������������ interface����������� ������������������ IRemoteBinderCallback����������� ������������������ {����������� ������������������ ����������� ������������������ void����������� ������������������ onReponse(int����������� ������������������ fnCode,����������� ������������������ byte[]����������� ������������������ param);����������� ������������������
}����������� ������������������
EventMonitor����������� ������������������ extends����������� ������������������ BroadcastReceiver����������� ������������������ ����������� ������������������ android.intent.action.BOOT_COMPLETED����������� ������������������ android.intent.action.PACKAGE_ADDED����������� ������������������ ����������� ������������������ RemoteBinderServer����������� ������������������ ����������� ������������������ Connect����������� ������������������ and����������� ������������������ Register����������� ������������������ to����������� ������������������ Server����������� ������������������ whenBOOT_COMPLETED����������� ������������������ Relay����������� ������������������ Remote����������� ������������������ Bind����������� ������������������ Request����������� ������������������ and����������� ������������������ Remote����������� ������������������ Method����������� ������������������ Call����������� ������������������
Client����������� ������������������ Device����������� ������������������ Server����������� ������������������ Device����������� ������������������
IActivityManager����������� ������������������ IServiceConnection����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������ Thread����������� ������������������
Binder����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������
Main����������� ������������������ Thread����������� ������������������
Client����������� ������������������ Service����������� ������������������
Proxy����������� ������������������ Stub����������� ������������������
■ Binding����������� ������������������ Request����������� ������������������ Hooking����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ Man
ager����������� ������������������ Service����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ Manager����������� ������������������ Service����������� ������������������
Binder����������� ������������������
Remote����������� ������������������ Binder����������� ������������������ Relay����������� ������������������ Server����������� ������������������
Network����������� ������������������ Binde
r����������� ������������������ Plug-in����������� ������������������ RemoteBinderFactory����������� ������������������
②����������� ������������������ RemoteBinderFactory.bindService����������� ������������������ ()����������� ������������������
③����������� ������������������ Bind����������� ������������������ to����������� ������������������ RAMS����������� ������������������
⑥����������� ������������������ doConnect()����������� ������������������ Impl.:����������� ������������������ Device����������� ������������������ /����������� ������������������ Service����������� ������������������ Look-up����������� ������������������ &����������� ������������������ Bind����������� ������������������ Request����������� ������������������
①����������� ������������������ IP����������� ������������������ /����������� ������������������ Phone����������� ������������������ Number����������� ������������������ /����������� ������������������ Service����������� ������������������ Register����������� ������������������
⑦����������� ������������������ Look-up����������� ������������������
⑧����������� ������������������ Request����������� ������������������ Bind����������� ������������������ ����������� ������������������ (w/����������� ������������������ Service����������� ������������������ Name)����������� ������������������
④����������� ������������������ Return����������� ������������������ RAMS’s����������� ������������������ Stub����������� ������������������
RAMS’s����������� ������������������ Stub����������� ������������������
⑤����������� ������������������ doConnect()����������� ������������������ to����������� ������������������ Remote����������� ������������������ Device����������� ������������������
RAMS’s����������� ������������������ Proxy����������� ������������������
⑨����������� ������������������ call����������� ������������������ bindService()����������� ������������������ with����������� ������������������ Service����������� ������������������ Name����������� ������������������
Service’s����������� ������������������ Stub����������� ������������������
⑫����������� ������������������ ACK����������� ������������������
⑩����������� ������������������ return����������� ������������������ Binder����������� ������������������ Stub����������� ������������������
⑪����������� ������������������ Save����������� ������������������ Binder����������� ������������������ locally����������� ������������������ ⑮����������� ������������������ Return����������� ������������������ RemoteBinder����������� ������������������ through����������� ������������������ onServiceConnected()����������� ������������������ call����������� ������������������
RemoteBinder����������� ������������������
⑬����������� ������������������ doConnectCallback����������� ������������������
⑭����������� ������������������ Create����������� ������������������ RemoteBinder����������� ������������������
IActivityManager����������� ������������������ IServiceConnection����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������ Thread����������� ������������������
Binder����������� ������������������
Android����������� ������������������ Framework����������� ������������������
Binder����������� ������������������
Main����������� ������������������ Thread����������� ������������������
Client����������� ������������������ Service����������� ������������������
Proxy����������� ������������������ Stub����������� ������������������
■ Binder����������� ������������������ Transaction����������� ������������������ Hooking����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ Man
ager����������� ������������������ Service����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ Manager����������� ������������������ Service����������� ������������������
Binder����������� ������������������
Remote����������� ������������������ Binder����������� ������������������ Relay����������� ������������������ Server����������� ������������������
Network����������� ������������������ Binde
r����������� ������������������ Plug-in����������� ������������������ RemoteBinderFactory����������� ������������������ RemoteBinder����������� ������������������
⑥����������� ������������������ Packetizing����������� ������������������ and����������� ������������������ send����������� ������������������ Serialized����������� ������������������ method����������� ������������������ call����������� ������������������ to����������� ������������������ Remote����������� ������������������ Device����������� ������������������
⑦����������� ������������������ Relay����������� ������������������ Serialized����������� ������������������ method����������� ������������������ call����������� ������������������
RAMS’s����������� ������������������ Stub����������� ������������������ RAMS’s����������� ������������������ Proxy����������� ������������������
⑩����������� ������������������ de-Parcelizing����������� ������������������
⑨����������� ������������������ call����������� ������������������ original����������� ������������������ binder’s����������� ������������������ onTransact()����������� ������������������
Service’s����������� ������������������ Stub����������� ������������������
①����������� ������������������ call����������� ������������������ foo()����������� ������������������
②����������� ������������������ Parcelizing����������� ������������������
③����������� ������������������ Call����������� ������������������ RemoteBinder’s����������� ������������������ transact()����������� ������������������
⑤����������� ������������������ call����������� ������������������ RAMS’s����������� ������������������ doRequest()����������� ������������������ ����������� ������������������
⑪����������� ������������������ Call����������� ������������������ foo()’s����������� ������������������ Implementation����������� ������������������
④����������� ������������������ Serializing����������� ������������������ transact()����������� ������������������ call����������� ������������������ and����������� ������������������ call����������� ������������������ RAMS’s����������� ������������������ doRequest()����������� ������������������ ����������� ������������������
RemoteBinder의����������� ������������������ transact()����������� ������������������ 에서����������� ������������������ 인자로����������� ������������������ 들어오는����������� ������������������ 모든����������� ������������������ 데이터(code,����������� ������������������ data,����������� ������������������ reply,����������� ������������������ flags)를����������� ������������������ 바이트배열에����������� ������������������ Seri
alize����������� ������������������ 함����������� ������������������
⑧����������� ������������������ Deserialize����������� ������������������ remote����������� ������������������ method����������� ������������������ call����������� ������������������
바이트배열����������� ������������������ 형태로����������� ������������������ 전달받은����������� ������������������ Serialized된����������� ������������������ method����������� ������������������ call을����������� ������������������ code,����������� ������������������ data,����������� ������������������ reply,����������� ������������������ flags로����������� ������������������ 원복한����������� ������������������ 후,����������� ������������������ Service에����������� ������������������ bind����������� ������������������ 후����������� ������������������ 받은����������� ������������������ 원본����������� ������������������ binder.onTran
sact()����������� ������������������ 호출����������� ������������������
■ Parcelable����������� ������������������ vs.����������� ������������������ Serializable����������� ������������������ • IBinder.transact()����������� ������������������ 메소드����������� ������������������ 호출을����������� ������������������ Serialization����������� ������������������ 해야����������� ������������������ 함����������� ������������������
• transact()����������� ������������������ 메소드는����������� ������������������ int����������� ������������������ code,����������� ������������������ Parcel����������� ������������������ data/reply,����������� ������������������ int����������� ������������������ flags를����������� ������������������ 인자로����������� ������������������ 가짐����������� ������������������
• Parcel����������� ������������������
- Binder����������� ������������������ 사용을����������� ������������������ 위해����������� ������������������ 특별히����������� ������������������ 고안됨����������� ������������������
- Native����������� ������������������ 단에서����������� ������������������ 관리되며,����������� ������������������ 공유����������� ������������������ 메모리/Binder와����������� ������������������ 밀접한����������� ������������������ 연관����������� ������������������ 있음����������� ������������������
- It's����������� ������������������ not����������� ������������������ Serializable����������� ������������������ /����������� ������������������ Parcelable!!����������� ������������������
• Parcelable����������� ������������������
- Serializable과����������� ������������������ 유사하며,����������� ������������������ 오직����������� ������������������ 객체를����������� ������������������ Parcel에����������� ������������������ 직렬화����������� ������������������ 하기����������� ������������������ 위한����������� ������������������ 용도로만����������� ������������������ 이용됨����������� ������������������
- It's����������� ������������������ different����������� ������������������ from����������� ������������������ Serializable����������� ������������������
• Serializing����������� ������������������ Parcel����������� ������������������
- Parcel.marshall()����������� ������������������ /����������� ������������������ Parcel.unmarshall()����������� ������������������
• Issue����������� ������������������
- Parcel의����������� ������������������ 값����������� ������������������ 중����������� ������������������ interface는����������� ������������������ Serializable하지����������� ������������������ 않음����������� ������������������ (Local����������� ������������������ thread와����������� ������������������ 바인딩)����������� ������������������ ����������� ������������������ Callback����������� ������������������ 구현����������� ������������������ 시����������� ������������������ 이슈됨����������� ������������������
(주1)����������� ������������������ 전화번호를����������� ������������������ 가지는����������� ������������������ 단말에����������� ������������������ 국한함����������� ������������������
■ Notification����������� ������������������ vs.����������� ������������������ Polling����������� ������������������ • Remote����������� ������������������ Binding����������� ������������������ 요청����������� ������������������ 시,����������� ������������������ Remote����������� ������������������ Service에����������� ������������������ Bind����������� ������������������ 요청을����������� ������������������ 어떤����������� ������������������ 방식으로����������� ������������������ 알릴����������� ������������������ 것인가����������� ������������������
• 기본����������� ������������������ 사항����������� ������������������
- Network����������� ������������������ Binder����������� ������������������ 지원����������� ������������������ APK����������� ������������������ 설치����������� ������������������ 시����������� ������������������ 서버에����������� ������������������ 등록����������� ������������������ (Phone����������� ������������������ Number����������� ������������������ /����������� ������������������ Service����������� ������������������ Name)����������� ������������������
• Notification����������� ������������������
- SKT����������� ������������������ AOM,����������� ������������������ Google����������� ������������������ C2DM/Cloud����������� ������������������ Message����������� ������������������
- 빠른����������� ������������������ 이벤트����������� ������������������ 전달이����������� ������������������ 안될����������� ������������������ 수����������� ������������������ 있음����������� ������������������ ����������� ������������������ Client����������� ������������������ 대기����������� ������������������ 시간����������� ������������������ 증가����������� ������������������
• Polling����������� ������������������
- Remote����������� ������������������ Activity����������� ������������������ Manager가����������� ������������������ 주기적으로����������� ������������������ Binding����������� ������������������ Request/Binder����������� ������������������ Transaction����������� ������������������ 요청����������� ������������������ 모니터링����������� ������������������
- 모니터링����������� ������������������ 주기����������� ������������������ 제어를����������� ������������������ 통해����������� ������������������ 대기����������� ������������������ 시간����������� ������������������ 줄일����������� ������������������ 수����������� ������������������ 있지만,����������� ������������������ 배터리����������� ������������������ 소모/네트워크����������� ������������������ 대역폭����������� ������������������ 낭비의����������� ������������������ 이슈����������� ������������������ 있음����������� ������������������
• Pilot����������� ������������������ 구현은����������� ������������������ Polling����������� ������������������ 방식����������� ������������������ 이용����������� ������������������ ==>����������� ������������������ 향후����������� ������������������ Push����������� ������������������ Service로����������� ������������������ 전환����������� ������������������ 예정(Future����������� ������������������ work)����������� ������������������
(주1)����������� ������������������ 전화번호를����������� ������������������ 가지는����������� ������������������ 단말에����������� ������������������ 국한함����������� ������������������
■ Callbacks����������� ������������������ • 다음����������� ������������������ 두����������� ������������������ 가지����������� ������������������ 이슈로����������� ������������������ 구현이����������� ������������������ 어려움����������� ������������������
• How����������� ������������������ to����������� ������������������ detect����������� ������������������ callback����������� ������������������ remote����������� ������������������ interface����������� ������������������ in����������� ������������������ a����������� ������������������ Parcel����������� ������������������
- IRemoteService.foo(int����������� ������������������ a,����������� ������������������ Callback����������� ������������������ cb)����������� ������������������ ����������� ������������������ IRemoteService.Proxy.foo(int����������� ������������������ a,����������� ������������������ Callback����������� ������������������ cb)����������� ������������������ ����������� ������������������ foo()����������� ������������������ 의����������� ������������������ 인자를����������� ������������������ Parcel����������� ������������������ data에����������� ������������������ Parcelizing����������� ������������������ 함����������� ������������������ (이때����������� ������������������ Callback도����������� ������������������ Parcelizing����������� ������������������ 됨)����������� ������������������
- IRemoteService.Proxy����������� ������������������ 클래스는����������� ������������������ AIDL이����������� ������������������ 생성한����������� ������������������ 소스����������� ������������������ 코드����������� ������������������ ����������� ������������������ 최소����������� ������������������ Plug-in����������� ������������������ 형태로����������� ������������������ 제공되는����������� ������������������ Plug-in����������� ������������������ 모듈에서����������� ������������������ 알����������� ������������������ 수����������� ������������������ 없음����������� ������������������
- Parcel����������� ������������������ data에����������� ������������������ 저장된����������� ������������������ Callback의����������� ������������������ write����������� ������������������ 순서를����������� ������������������ 알아낼����������� ������������������ 수가����������� ������������������ 없음(Parcelizing����������� ������������������ 을����������� ������������������ Proxy����������� ������������������ 코드에서����������� ������������������ 수행하기����������� ������������������ 때문)����������� ������������������ ����������� ������������������ 특히,����������� ������������������ Parcel은����������� ������������������ 저장����������� ������������������ Data����������� ������������������ 의����������� ������������������ Meta����������� ������������������ data를����������� ������������������ 저장하지����������� ������������������ 않음����������� ������������������
• How����������� ������������������ to����������� ������������������ Re-instantiate����������� ������������������ Callback����������� ������������������ Object����������� ������������������ in����������� ������������������ Remote����������� ������������������ Device����������� ������������������
- Remote����������� ������������������ 디바이스에서����������� ������������������ 구동되는����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ Manager가����������� ������������������ 실제����������� ������������������ IRemoteService.Stub.foo()����������� ������������������ 메소드����������� ������������������ 호출����������� ������������������ 시����������� ������������������ Callback����������� ������������������ 객체의����������� ������������������ 인터페이스를����������� ������������������ 넘겨줘야����������� ������������������ 함����������� ������������������
- Client����������� ������������������ 단의����������� ������������������ Callback.Stub����������� ������������������ 코드를����������� ������������������ 알지����������� ������������������ 못하기����������� ������������������ 때문에����������� ������������������ 객체����������� ������������������ 생성이����������� ������������������ 불가능함����������� ������������������
• 결론����������� ������������������
- Callback은����������� ������������������ 지원이����������� ������������������ 불가함����������� ������������������
- Callback����������� ������������������ 지원을����������� ������������������ 위해서는����������� ������������������ 별도의����������� ������������������ Interface를����������� ������������������ Plug-in에����������� ������������������ 추가하여����������� ������������������ 개발자에게����������� ������������������ 강제해야����������� ������������������ 함����������� ������������������ (Future����������� ������������������ work)����������� ������������������
■ Callback����������� ������������������ 지원����������� ������������������ • General����������� ������������������ Purpose����������� ������������������ Callback����������� ������������������ Interface를����������� ������������������ 만드는����������� ������������������ 방법����������� ������������������
- RemoteBinderFactory에����������� ������������������ Static으로����������� ������������������ Callback����������� ������������������ method����������� ������������������ 정의하여����������� ������������������ 이용����������� ������������������
- Callback����������� ������������������ Type이����������� ������������������ 제한될����������� ������������������ 수����������� ������������������ 있는����������� ������������������ 문제����������� ������������������ 있음����������� ������������������
• Manual����������� ������������������ Mutual����������� ������������������ Connection����������� ������������������ 만드는����������� ������������������ 방법����������� ������������������
- Server����������� ������������������ 디바이스에서����������� ������������������ Client����������� ������������������ 디바이스에����������� ������������������ 명시적으로����������� ������������������ Callback����������� ������������������ 용����������� ������������������ Remote����������� ������������������ Interface����������� ������������������ Binding하여����������� ������������������ 사용����������� ������������������
- 추가����������� ������������������ 개발����������� ������������������ 필요����������� ������������������ 없으나,����������� ������������������ 이용에����������� ������������������ 불편함이����������� ������������������ 있음����������� ������������������
■ Non-Cellular����������� ������������������ Device����������� ������������������ 지원����������� ������������������ • ID����������� ������������������ 기반����������� ������������������ 접속����������� ������������������ 체계로����������� ������������������ 전환����������� ������������������
- 서비스����������� ������������������ 시나리오와����������� ������������������ 깊이����������� ������������������ 관련된����������� ������������������ 이슈로����������� ������������������ 기술적����������� ������������������ 난이도는����������� ������������������ 없음����������� ������������������
■ Push����������� ������������������ Service����������� ������������������ 이용����������� ������������������ • GCM����������� ������������������ 또는����������� ������������������ SKT����������� ������������������ AOM����������� ������������������ 연동하도록����������� ������������������ 수정����������� ������������������
- 다양한����������� ������������������ 테스트����������� ������������������ 통해����������� ������������������ 서비스����������� ������������������ 적절성����������� ������������������ 확인����������� ������������������
■ Server-less����������� ������������������ Remote����������� ������������������ Content����������� ������������������ Provider����������� ������������������ • Network����������� ������������������ Binder����������� ������������������ 개념을����������� ������������������ ContentResolver에����������� ������������������ 확장하여����������� ������������������ Remote����������� ������������������ ContentResolver를����������� ������������������ 만들어����������� ������������������ 이용
할����������� ������������������ 수����������� ������������������ 있음����������� ������������������
• ContentResolver도����������� ������������������ 내부에서����������� ������������������ Binder를����������� ������������������ 이용하여����������� ������������������ ����������� ������������������
• 원격����������� ������������������ 디바이스에����������� ������������������ 있는����������� ������������������ 다양한����������� ������������������ 데이터를����������� ������������������ Read/Write����������� ������������������ 할����������� ������������������ 수����������� ������������������ 있음����������� ������������������ (ex:����������� ������������������ Calendar,����������� ������������������ Phonebook..)����������� ������������������
RemoteContentFactory����������� ������������������
Client����������� ������������������ Remote����������� ������������������ Content����������� ������������������ Provider����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ Manager����������� ������������������ Servcie����������� ������������������
①����������� ������������������ call����������� ������������������ ����������� ������������������ RemoteContentFactory.getContentResolver(remoteUri,����������� ������������������ serviceUri)����������� ������������������
RemoteContentResolver����������� ������������������
⑤����������� ������������������ Create����������� ������������������ and����������� ������������������ return����������� ������������������ RemoteContentResolver����������� ������������������
②����������� ������������������ request����������� ������������������ Remote����������� ������������������ Binder����������� ������������������
③����������� ������������������ connect����������� ������������������ to����������� ������������������ remote����������� ������������������ device����������� ������������������ ④����������� ������������������ return����������� ������������������ IRemoteBinderService.Stub����������� ������������������
IRemoteBinderService.Stub.Proxy����������� ������������������
⑥����������� ������������������ call����������� ������������������ RemoteContentResolver.query()����������� ������������������
Remote����������� ������������������ Binder����������� ������������������ Relay����������� ������������������ Server����������� ������������������
⑦����������� ������������������ IRemoteBinderService.Stub.Proxy.doRequest()����������� ������������������
■ Server-less����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ Interaction����������� ������������������ • Intent를����������� ������������������ 이용한����������� ������������������ Activity간����������� ������������������ 연동����������� ������������������ 기능을����������� ������������������ 일반적인����������� ������������������ Network����������� ������������������ API����������� ������������������ 만을����������� ������������������ 이용하여����������� ������������������ 구현할����������� ������������������ 경우,����������� ������������������ 개발����������� ������������������
아이템이����������� ������������������ 많고,����������� ������������������ 서비스가����������� ������������������ 변경될����������� ������������������ 때����������� ������������������ 마다����������� ������������������ 단말/서버����������� ������������������ 모두����������� ������������������ 수정(프로토콜����������� ������������������ 수정)해야����������� ������������������ 하는����������� ������������������ 이슈가����������� ������������������ 있음����������� ������������������
• Network����������� ������������������ Binder를����������� ������������������ 이용하면����������� ������������������ 좀����������� ������������������ 더����������� ������������������ 쉽게����������� ������������������ Remote����������� ������������������ Activity����������� ������������������ 연동����������� ������������������ 기능을����������� ������������������ 구현할����������� ������������������ 수����������� ������������������ 있음����������� ������������������
• Network����������� ������������������ Binder����������� ������������������ 적용����������� ������������������ 시����������� ������������������ 이점����������� ������������������
- 일반적인����������� ������������������ Android����������� ������������������ Binder����������� ������������������ 개발����������� ������������������ 툴����������� ������������������ 및����������� ������������������ 개발����������� ������������������ 방법을����������� ������������������ 이용하여����������� ������������������ 서비스����������� ������������������ 개발����������� ������������������ 가능����������� ������������������ ����������� ������������������ 개발����������� ������������������ 기간����������� ������������������ 단축����������� ������������������
- 원격이����������� ������������������ 아닌����������� ������������������ Local����������� ������������������ 서비스도����������� ������������������ 같은����������� ������������������ 코드로����������� ������������������ 접근����������� ������������������ 가능하여,����������� ������������������ Remote/Local����������� ������������������ 모두����������� ������������������ 한����������� ������������������ 소스로����������� ������������������ 이용이����������� ������������������ 가능함����������� ������������������
- 서버를����������� ������������������ 별도로����������� ������������������ 구축할����������� ������������������ 필요가����������� ������������������ 없어����������� ������������������ 경제적임����������� ������������������
■ Server-less����������� ������������������ Remote����������� ������������������ Event����������� ������������������ Broadcast����������� ������������������ • 원격����������� ������������������ 디바이스����������� ������������������ 간����������� ������������������ Event����������� ������������������ Broadcast����������� ������������������ 기능을����������� ������������������ Network����������� ������������������ API를����������� ������������������ 이용하여����������� ������������������ 구현할����������� ������������������ 경우,����������� ������������������ 개발����������� ������������������ 아이템이����������� ������������������
많고,����������� ������������������ 서비스가����������� ������������������ 변경될����������� ������������������ 때����������� ������������������ 마다����������� ������������������ 단말/서버����������� ������������������ 모두����������� ������������������ 수정(프로토콜����������� ������������������ 수정)해야����������� ������������������ 하는����������� ������������������ 이슈가����������� ������������������ 있음����������� ������������������
• Network����������� ������������������ Binder를����������� ������������������ 이용하면����������� ������������������ 좀����������� ������������������ 더����������� ������������������ 쉽게����������� ������������������ Remote����������� ������������������ Event����������� ������������������ Broadcast����������� ������������������ 연동����������� ������������������ 기능을����������� ������������������ 구현할����������� ������������������ 수����������� ������������������ 있음����������� ������������������
• Network����������� ������������������ Binder����������� ������������������ 적용����������� ������������������ 시����������� ������������������ 이점����������� ������������������
- 일반적인����������� ������������������ Android����������� ������������������ Binder����������� ������������������ 개발����������� ������������������ 툴����������� ������������������ 및����������� ������������������ 개발����������� ������������������ 방법을����������� ������������������ 이용하여����������� ������������������ 서비스����������� ������������������ 개발����������� ������������������ 가능����������� ������������������ ����������� ������������������ 개발����������� ������������������ 기간����������� ������������������ 단축����������� ������������������
- 원격이����������� ������������������ 아닌����������� ������������������ Local����������� ������������������ 서비스도����������� ������������������ 같은����������� ������������������ 코드로����������� ������������������ 접근����������� ������������������ 가능하여,����������� ������������������ Remote/Local����������� ������������������ 모두����������� ������������������ 한����������� ������������������ 소스로����������� ������������������ 이용이����������� ������������������ 가능함����������� ������������������
- 서버를����������� ������������������ 별도로����������� ������������������ 구축할����������� ������������������ 필요가����������� ������������������ 없어����������� ������������������ 경제적임����������� ������������������