android:process=「remote」


資料1
http://developer.android.com/intl/zh-CN/reference/android/app/Service.html
If we want to make this service run in a remote process(instead of the standard one for its.appk)we can use  android:process in its maifest(to speciful one)
<service android:name=".app.MessengerService" android:process=":remote" />
Note that the name「remote」chosen here is arbitrry,and you can use other name s if You want additional process.The':'prefix appins the name to your package's standard procename.(これはmorete文字の影響がないですか?)
資料二
http://developer.android.com/intl/zh-CN/guide/topics/manifest/service-element.html android:processThe name of the process where the service is to run.Normally,all components of an appication run in the default process created for the appration.It has the same name as package.The 2479142 element's  <application> atribute can set a different default for all components.But component can override the default with its own  process atribute、allowing you to spread your aplication acros multiple process.
If the name assigned to this atribute begins with a colon(')、a new process、prvate to the appication、is created when it and the service run s in process.If the process name beginame the ath cactureprovided that it has permission to do so.This allows components in different apperent appration s to share process,reducing reourcure usage.は、アプリケーションにおいて、このserviceが必要とされる場合、自動的に新しいプロセスを作成します.Android:process="remote"がない場合は、グローバルプロセスを作成し、異なるアプリケーションでこのプロセスを共有します.
みんなは見ましたか?それともよく分かりません.ここでは小さな例を使って説明します.
Eg、一  
設定が以下の通りです.
 <service android:name=".MessengerService"  android:process=":remote" ></service>
私たちはDDMSから見られます.
android:process=":remote"_第1张图片
MessengerServiceの中のpidは新しい(484)mainの478とは違っています.
android:process=":remote"_第2张图片
プロセスをたくさん見てください.(pidはプロセスを表します. )
Eg、二
リストで宣言したのは
 <service android:name=".MessengerService"
             
            ></service>
activityとserviceは同じプロセスでこれについて詳しく参照してください. (彼らは全部346中)
Service詳細(二)
何か質問がありますか?教えてください.ありがとうございます.
ソースの住所: http://csdn-qq282133-demo.googlecode.com/svn/trunk/ServiceTest2
以下は転載です.
ここのandroid:process=「:remote」は最初は追加されていませんでした.同じプログラムでIPCを使って、同じプログラムをクライアント/サーバーとして使っています.結果としてmRemoteService=IMyService.Stub.asInterface(service)を実行したら、空いているポインタに異常があります.他の人のプログラムでIPCE=procenceを観察しました.を選択します.後に公式文書でhttp://androidappdocs.appspot.com/guide/topics/manifest/service-element.htmlで分かりました.android:process The name of the process where the service to run.Normally、all component s of aaaplicatition run the defafault process created for the appplication.It has the same me name asthe aaaappininininininproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproproprocacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacaBut component can override the default with its own process atribute、allowing you to spread your aplication acros multiple process.  If the name assigned to this atribute begins with a colon(')a new process、prvate to the apaplication、is created when it s needd and the service runs inthaaatoprocess.If the process name beginsa lowercase character、the service will ll in in in inglolololobal process process process aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaareducing reourceアメリカ. つまり、Android:process=「remote」という意味では、アプリケーションにおいて、このserviceが必要とされると、自動的に新しいプロセスが作成されます.android:process=「remote」がなければ、グローバルプロセスが作成され、異なるアプリケーションがこのプロセスを共有します.