응용 프로그램 활동을 방해하거나 방해하지 않고 백그라운드 스레드에서 서버의 데이터를 lapping하기 위해 내 응용 프로그램 용 IntentService를 사용하려고합니다. 여기에 내가이 일을 does'tIntentService가 호출되지 않았습니다.
public class ChannelsActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this , SearchService.class);
startService(intent);
}
나는 또한 매니페스트 파일에서 서비스 속성을 정의
하지만 내 응용 프로그램의 주요 활동이 서비스를 시작 내 간단한 IntentService
public class SearchService extends IntentService {
public SearchService() {
super("SearchService");
}
@Override
protected void onHandleIntent(Intent intent) {
Log.d("Tag","service started");
}
}
입니다 나를 위해 나는 무엇이 문제인지 모른다.
<application
<activity
android:name=".ChannelsActivity"
android:screenOrientation="landscape"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".SearchService"/>
</application>
나는 stu이다. 이 문제가 있으면 도움이 될 것입니다.
항상 .logost를 게시하십시오. –
@Bhanu Kaushik 님, 빠른 답장을 보내 주셔서 감사합니다. logcat 창에서 아무런 오류나 경고가 없습니다. –
디버거와 함께 실행하고 서비스를 시작하려고 시도 할 때 로그되지 않은 예외가 발생하는지 확인하십시오. – Ralgha