I need to get the int id of my application icon. Is there any way I can do this?
I'm aware that there's GetApplicationIcon in PackageManager, but this returns a drawable. How can I get the Id of the drawable?
Drawable drawable = ApplicationContext.PackageManager.GetApplicationIcon(applicationInfo);
I was thinking of looping through all the resources in Android, but I'm not sure how, and I think it would be expensive. Any efficient way I can get the icon id?
EDIT: I understand that I can just easily get the resource id from R.drawable.myicon, but I was hoping to get the Id with the use of PackageManager or ApplicationContext.Resources.
EDIT #2: I got it. See my answer below.