I am writing an API that can be included in various APK's. I want to generate a notification with that app's icon, which requires the resource ID. I'm not finding a way to find the resource ID. I don't know the name of the app's icon. Context is passed in to my class in the constructor. Here is what I have so far:
ApplicationInfo app = mContext.getApplicationInfo();
packageManager = mContext.getPackageManager();
Drawable drawable = packageManager.getApplicationIcon(app);
String packageName = packageManager.getApplicationLabel(app);
// logical next step, but I don't know the name of the drawable
int appIconId = mContext.getResources().getIdentifier("???", "drawable", packageName);
Thank you!