import android.app.Activity;
import android.app.Service;
import android.app.WallpaperManager;
import android.content.Intent;
import android.os.Bundle;
public class Preview extends Activity {
public Preview() {
// TODO Auto-generated constructor stub
}
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Intent intent = new Intent();
intent.setAction(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
String pkg = Service.class.getPackage().getName();
}
}
Service.class.getPackage().getName();
에 대해 궁금합니다. 패키지 이름이 표시됩니다. 내 질문은 Service.class의 사용에 있습니다. 어떤 의미인지 또는 어떤 객체가 액세스되고 있는지.활동에서 Android 서비스 사용
이것은 라이브 벽지 예제입니다. 정적 유형 초기화에 대한 의미를 알았습니다. .class의 사용은 처음에 이해하지 못했습니다. 예제에서 다른 .java 파일에 정의 된 클래스 Service의 정적 멤버를 초기화하는 데 대해 설명해 주셔서 감사합니다. – Giuseppe