bindService(Intent service、ServiceConnection conn、int flags)を参照する
いつ0を使用する必要があり、いつ使用する必要があるかを教えてくださいflags
。ドキュメントでは、フラグの0の意味については説明されていません。BIND_AUTO_CREATE
flags
0を使用する例flags
// Start auto complete service.
autoCompleteServiceIntent = new Intent(AutoCompleteService.class.getName());
startService(autoCompleteServiceIntent);
bindService(autoCompleteServiceIntent, serviceConnection, 0);
BIND_AUTO_CREATE
として使用する例flags
mContext.bindService(new Intent("com.android.vending.billing.InAppBillingService.BIND"),
mServiceConn, Context.BIND_AUTO_CREATE);