B4A Question PackageManager GetApplicationIcon - nibbo (first post)    Jun 23, 2014 pm.GetApplicationIcon returns the app's main activity. There can be many other "exported" activities in each app. It is more difficult to find other activities.
You can play with pm... B4A Question what is the reason? show the error info - Erel (first post)    Jan 3, 2022 The assumption that pm.GetApplicationIcon returns a BitmapDrawable is wrong. It can return all kinds of drawables. Either skip other types:
Dim o As Object = pm.GetApplicationIcon(pkgn(i))
If o Is BitmapDrawable = False The Continue
Or draw them with Canvas.DrawDrawable.... B4A Question how to save a imageview.background to file? - TILogistic (first post)    Apr 11, 2021   (1 reaction) sample with BitmapDrawable and icon APP
you APP Application.PackageName
Dim pm As PackageManager
Dim icon As BitmapDrawable = pm.GetApplicationIcon(Application.PackageName)
ImageView1....GetApplicationIcon(Application.PackageName)
ImageView1.Background = icon
SaveBitmapToFile(ImageView1.Bitmap... B4A Question how to use ICON - yhyzhj    Apr 10, 2020 i use the code: Activity.Background = pm.GetApplicationIcon("com.google.android.youtube") , can show the icon. how to let it show in listview?... B4A Code Snippet Get List Of Installed Apps and their icons - JakeBullet70    Sep 20, 2016   (6 reactions)
name = Obj1.RunMethod4("getApplicationLabel", args, Types)
icon = Obj1.RunMethod4("getApplicationIcon", args, Types)
'lv... B4A Question Crash when gathering email clients - Erel (first post)    Feb 7, 2019 You should run your app in debug mode to see the exact error line. It is here:
imgIcon = PM.GetApplicationIcon(sPackageName)
You shouldn't assume that GetApplicationIcon will return a BitmapDrawable. It can return other types of drawables.
A simple solution is to skip other types:
Dim o As Object = PM.GetApplicationIcon(sPackageName)
If o Is BitmapDrawable Then
imgIcon = o
End If... B4A Question In what library is Application? - JukkaHo    Dec 11, 2019 As in: https://www.b4x.com/android/forum/threads/packagemanager-getapplicationicon.42288/ I really have searched this. Thanks and sorry JukkaHo... B4A Question java.lang.ClassCastException: android.graphics.drawable.VectorDrawable cannot be cast to android.gra - dragonguy (first post)    Sep 11, 2017 but i didin't use Vectordrawable , i just GetApplicationIcon from
PackageManager.... B4A Question [SOLVED] Application.Icon return nothing after conversion to adaptive icon - AscySoft (first post)    Oct 11, 2018   (3 reactions) I've done it using this code, thanks for the tip
Dim pm As PackageManager
ToolbarHelper.Icon = pm.GetApplicationIcon(Application.PackageName ) 'ToolbarHelper is declare as appcompat.ACActionBar in my case
OR, if you want to resize icon (as in my case) use this
Dim btm As Bitmap
btm... can As Canvas
can.Initialize2(btm)
Dim pm As PackageManager
can.DrawDrawable(pm.GetApplicationIcon(Application... B4A Question Launcher Apps - get icon & label - Erel (first post)    Jan 4, 2015   (3 reactions) Last time I answer to this thread. PackageManager.GetApplicationIcon returns the app's main icon.... Page: 1   2   3   4   5   6   7   |