PackageManager.IsDefaultApplicationIcon(Drawable) Method

Definition

Returns if the provided drawable represents the default activity icon provided by the system.

[Android.Runtime.Register("isDefaultApplicationIcon", "(Landroid/graphics/drawable/Drawable;)Z", "GetIsDefaultApplicationIcon_Landroid_graphics_drawable_Drawable_Handler", ApiSince=30)]
public virtual bool IsDefaultApplicationIcon (Android.Graphics.Drawables.Drawable drawable);
[<Android.Runtime.Register("isDefaultApplicationIcon", "(Landroid/graphics/drawable/Drawable;)Z", "GetIsDefaultApplicationIcon_Landroid_graphics_drawable_Drawable_Handler", ApiSince=30)>]
abstract member IsDefaultApplicationIcon : Android.Graphics.Drawables.Drawable -> bool
override this.IsDefaultApplicationIcon : Android.Graphics.Drawables.Drawable -> bool

Parameters

drawable
Drawable

Returns

true if the drawable represents the default activity icon, false otherwise

Attributes

Remarks

Returns if the provided drawable represents the default activity icon provided by the system.

PackageManager silently returns a default application icon for any package/activity if the app itself does not define one or if the system encountered any error when loading the icon.

Developers can use this to check implement app specific logic around retrying or caching.

Java documentation for android.content.pm.PackageManager.isDefaultApplicationIcon(android.graphics.drawable.Drawable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to