다음은 서비스를 시작하기위한 코드입니다.Android4.0 서비스가 시작되었습니다
public class MyStartupIntentReceiver extends BroadcastReceiver
{
public void onReceive(Context context, Intent intent)
{
Intent callService = new Intent();
callService.setAction("com.xxxx.yyyy.services.StartServiceActivity");
context.startService(callService);
}
}
다음과 같이 브로드 캐스트 수신기를 정의하고 있습니다.
<receiver android:name=".MyStartupIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"
/>
</intent-filter>
</receiver>
임은 사용자가 내 활동에서 내 응용 프로그램의 메신저 시작 서비스를 시작하면
serviceIntent = new Intent(SplashScreen.this, StartServiceActivity.class);
getApplicationContext().startService(serviceIntent);
문제는 서비스가 android2와 잘 작동된다 매니페스트 파일
<service android:name=".services.CallService">
<intent-filter>
<action
android:name="com.xxxx.yyyy.services.StartServiceActivity" />
</intent-filter>
</service>
에서 다음과 같이 서비스를 선언. 3.5 SDK 장치. 4.0 장치가 아닙니다. 내 코드에 문제가 있습니다. 해결하도록 도와주세요.