Android Question this code work truly , but when I use on the sony xperia z1 & z2

khosrwb

Active Member
Licensed User
Longtime User
hi
I use from this code for display the all app icon (( installed app )) in listview.
this code work truly , but when I use on the sony xperia z1((android4.4.2)) and z2((android5.0.2)) device , this Error occurred on line 50 :
 

Attachments

  • Capture.PNG
    Capture.PNG
    165.6 KB · Views: 230
  • Capture1.PNG
    Capture1.PNG
    183.4 KB · Views: 223

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Don't call GetApplicationIcon multiple times (for the same app).
2. Scale down the bitmap with CreateScaledBitmap before you add it to the ListView. https://www.b4x.com/android/forum/posts/123936/like
3. This line will help on both cases: SetApplicationAttribute(android:largeHeap,"true")
Android will allocate more memory to your process.
 
Upvote 0
Top