본문 바로가기
프로그래밍 놀이터/안드로이드, Java

[android] how can I know if there is any application which can handle an intent.

by 돼지왕 왕돼지 2013. 10. 10.
반응형


 android, 

 how can I know if there is any application which can handle an intent?

 


[android] how can I know if there is any application which can handle an intent.


public static boolean hasAvailableIntentHandlingApp( Context context, Intent intent ){

List<ResolveInfo> list = context.getPackageManager().queryIntentActivities( intent, PackageManager.MATCH_DEFAULT_ONLY );

return list.size() != 0;

}



반응형

댓글