ivanomonti Expert Licensed User Longtime User Sep 25, 2013 #1 I need to display the icons in my form or widget of some installed apps, such as facebook and its notifications ... how can I act
I need to display the icons in my form or widget of some installed apps, such as facebook and its notifications ... how can I act
Erel B4X founder Staff member Licensed User Longtime User Sep 25, 2013 #2 You can use PackageManager for that (Phone library). Specifically PackageManager.GetApplicationIcon. Upvote 0
ivanomonti Expert Licensed User Longtime User Sep 25, 2013 #3 I have problems in using this code inside a widget because I can not declare in ImageView object type (dim ImageView01 as ImageView) <--- error -----> Parsing code. 0.01 Compiling code. Error Error compiling program. Error description: Cannot access activity object from sub Process_Globals. Occurred on line: 12 Dim imageview01 As ImageView Word: imageview <---- end error ---> B4X: Sub Process_Globals Dim ImageView01 as ImageView End Sub B4X: Dim pm As PackageManager Dim Icons As BitmapDrawable Icons = pm.GetApplicationIco("com.facebook.katana") ImageView01.Background = Icons how can i proceed Upvote 0
I have problems in using this code inside a widget because I can not declare in ImageView object type (dim ImageView01 as ImageView) <--- error -----> Parsing code. 0.01 Compiling code. Error Error compiling program. Error description: Cannot access activity object from sub Process_Globals. Occurred on line: 12 Dim imageview01 As ImageView Word: imageview <---- end error ---> B4X: Sub Process_Globals Dim ImageView01 as ImageView End Sub B4X: Dim pm As PackageManager Dim Icons As BitmapDrawable Icons = pm.GetApplicationIco("com.facebook.katana") ImageView01.Background = Icons how can i proceed
NJDude Expert Licensed User Longtime User Sep 25, 2013 #4 You are doing it wrong, widgets are different when it comes to creating views, read the Widgets tutorial Last edited: Sep 25, 2013 Upvote 0
You are doing it wrong, widgets are different when it comes to creating views, read the Widgets tutorial