안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
안드로이드의 Launcher를 바꾸어 보려고,
Launcher의 일부를 조금씩 가져다가 기능을 재현해 보고 있습니다.
프로젝트 이름과 위치를 바꾸어서 만들어 보았는데요.
LauncherProvider.java 실행 중에 아래와 같은 에러가 나옵니다.
Permission Denial: starting Intent { flg=0x10000000 cmp=com.android.settings/.LauncherAppWidgetBinder (has extras) } from ProcessRecord{4396c498 967:soludens.andr.launcher/10024} (pid=967, uid=10024) requires android.permission.BIND_APPWIDGET
Manifest 파일에
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
이것도 추가하였는데 역시 동일한 에러가 나옵니다.
LauncherProvider.java 파일의 아래 함수에
/**
* Launch the widget binder that walks through the Launcher database,
* binding any matching widgets to the corresponding targets. We can't
* bind ourselves because our parent process can't obtain the
* BIND_APPWIDGET permission.
*/
private void launchAppWidgetBinder(int[] bindSources, ArrayList<ComponentName> bindTargets) {
final Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.settings",
"com.android.settings.LauncherAppWidgetBinder"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final Bundle extras = new Bundle();
extras.putIntArray(EXTRA_BIND_SOURCES, bindSources);
extras.putParcelableArrayList(EXTRA_BIND_TARGETS, bindTargets);
intent.putExtras(extras);
mContext.startActivity(intent);
}
이런 부분이 있는데요, 혹시 이곳을 바꾸어야 하는 것인지요?
아니면 저 빨간색의 콤포넌트를 사용자 APP 에서는 못 사용하는지요?
감사합니다.
안드로이드의 Launcher를 바꾸어 보려고,
Launcher의 일부를 조금씩 가져다가 기능을 재현해 보고 있습니다.
프로젝트 이름과 위치를 바꾸어서 만들어 보았는데요.
LauncherProvider.java 실행 중에 아래와 같은 에러가 나옵니다.
Permission Denial: starting Intent { flg=0x10000000 cmp=com.android.settings/.LauncherAppWidgetBinder (has extras) } from ProcessRecord{4396c498 967:soludens.andr.launcher/10024} (pid=967, uid=10024) requires android.permission.BIND_APPWIDGET
Manifest 파일에
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
이것도 추가하였는데 역시 동일한 에러가 나옵니다.
LauncherProvider.java 파일의 아래 함수에
/**
* Launch the widget binder that walks through the Launcher database,
* binding any matching widgets to the corresponding targets. We can't
* bind ourselves because our parent process can't obtain the
* BIND_APPWIDGET permission.
*/
private void launchAppWidgetBinder(int[] bindSources, ArrayList<ComponentName> bindTargets) {
final Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.settings",
"com.android.settings.LauncherAppWidgetBinder"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final Bundle extras = new Bundle();
extras.putIntArray(EXTRA_BIND_SOURCES, bindSources);
extras.putParcelableArrayList(EXTRA_BIND_TARGETS, bindTargets);
intent.putExtras(extras);
mContext.startActivity(intent);
}
이런 부분이 있는데요, 혹시 이곳을 바꾸어야 하는 것인지요?
아니면 저 빨간색의 콤포넌트를 사용자 APP 에서는 못 사용하는지요?
감사합니다.