khosrwb Active Member Licensed User Longtime User Oct 9, 2015 #1 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 165.6 KB · Views: 611 Capture1.PNG 183.4 KB · Views: 580
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 :
R Roycefer Well-Known Member Licensed User Longtime User Oct 9, 2015 #2 The java.lang.OutOfMemoryError means you're running out of heap space. Check out this thread for some tips that might help you diagnose and solve the problem https://www.b4x.com/android/forum/t...-to-check-memory-available.58925/#post-371102 Upvote 0
The java.lang.OutOfMemoryError means you're running out of heap space. Check out this thread for some tips that might help you diagnose and solve the problem https://www.b4x.com/android/forum/t...-to-check-memory-available.58925/#post-371102
khosrwb Active Member Licensed User Longtime User Oct 9, 2015 #3 Roycefer said: The java.lang.OutOfMemoryError means you're running out of heap space. Check out this thread for some tips that might help you diagnose and solve the problem https://www.b4x.com/android/forum/t...-to-check-memory-available.58925/#post-371102 Click to expand... I add this code to monifest : SetApplicationAttribute(android:largeHeap,"true") No need to write to other code? Upvote 0
Roycefer said: The java.lang.OutOfMemoryError means you're running out of heap space. Check out this thread for some tips that might help you diagnose and solve the problem https://www.b4x.com/android/forum/t...-to-check-memory-available.58925/#post-371102 Click to expand... I add this code to monifest : SetApplicationAttribute(android:largeHeap,"true") No need to write to other code?
R Roycefer Well-Known Member Licensed User Longtime User Oct 10, 2015 #4 If you don't want to monitor memory usage, no. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 11, 2015 #5 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
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.