장치에 설치된 응용 프로그램의 목록을 가져오고 찾고있는 응용 프로그램이 설치되어 있는지 확인할 수 있습니다. 그런 다음 당신은
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
List activities = getPackageManager().queryIntentActivities(sharingIntent, 0);
에 의해 ACTION_SEND를 지원하는 설치된 응용 프로그램의 목록을 얻을 수 있습니다
List<ApplicationInfo> packages = getPackageManager().getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo appInfo : packages) {
if ("com.facebook.katana".equals(appInfo.packageName)) {
// Facebook app is installed, add to options list
}
// Do something similar for Twitter and Gmail
}
// Show user the options list
옵션 목록에 추가하는 방법 ?? ACTION_SEND를 호출하면 클라이언트 응용 프로그램 목록이있는 대화 상자가 표시되므로 대화 상자에서 해당 옵션을 제어하는 방법 –
사용 가능한 옵션을 포함하는 자체 경고 대화 상자 만들기 – Ares