Gets the advanced options activity name for a print service.
PrintManager printManager = (PrintManager) context.getSystemService(
Context.PRINT_SERVICE);
List<PrintServiceInfo> printServices = printManager.getEnabledPrintServices();
final int printServiceCount = printServices.size();
for (int i = 0; i < printServiceCount; i ++) {
PrintServiceInfo printServiceInfo = printServices.get(i);
ServiceInfo serviceInfo = printServiceInfo.getResolveInfo().serviceInfo;
if (serviceInfo.name.equals(serviceName.getClassName())
&& serviceInfo.packageName.equals(serviceName.getPackageName())) {
return printServiceInfo.getAdvancedOptionsActivityName();
}
}
return null;