2012-06-19 3 views
1

android lvl 라이브러리를 수정하려고하는데이 코드를 라이브러리로 사용하는 대신 내 프로젝트 소스 (diff 패키지)의 일부로 포함 시켰습니다.바인딩/시작 서비스가 작동하지 않는 이유 (lvl)

Unable to start service Intent { act=com.myApp.com.android.vending.licensing.ILicensingService }: not found 

은 왜이다 : 그러나이 코드는 말하고있다

boolean bindResult = mContext.bindService(
    new Intent(ILicensingService.class.getName()), 
    this, // ServiceConnection. 
    Context.BIND_AUTO_CREATE); 

if (bindResult) { 
    mPendingChecks.offer(validator); 
} else { 
    Log.e(TAG, "Could not bind to service."); 
    validator.getCallback().stop("Could not bind to service."); 
} 

을 실패? 어떻게 해결할 수 있습니까? 이 같은 라이브러리 작업을했지만, 코드가 통합 할 때 당신은 내가 잘못 생각 Intent을 만드는 도움

답변

2

에 대한하지

감사한다. 이것으로 당신을 대체하려고 :

new Intent(YourActivity.this, ILicensingService.class) //YourActivity is activity from its you want to start service. 

참고 :는하지만 작동하지 않았다 Service 주셔서 감사합니다

+0

Manifest.xml에 추가 잊지 마세요. 또한 이것은 라이센스 페이지의 Google 코드입니다. 그것은 도서관으로 사용되었을 때 일하는 것이었고 서비스의 해체는 없었다. 소스 파일을 가져올 때 왜 작동하지 않는지 잘 모르겠습니다. 아마 다른 패키지이기 때문에?! – Snake