Tag Archives: memory

1,482 views

Android emulator freezes at startup create new virtual device

If Android emulator freezes at startup, try create new virtual device with smaller memory and cpu usage, or select older version of Android, or buy new pc with higher performance. open AVD MANAGER press Create Virtual Device select Device with … Continue reading

Posted in Android Studio | Tagged | Comments Off on Android emulator freezes at startup create new virtual device
10,387 views

Get Bitmap Size Get Free Memory Exception Android

Bitmap size calculation: bmpHeight * bmpWidth For example: Resolution of image 1024×860 = 880 640 pixels If every pixel get 4 byte of memory: 880 640×4= 3 522 560 (3.5MB) Get bitmap size without allocation of memory: BitmapFactory.Options options = … Continue reading

Posted in Android Examples Code, Bitmap, drawing | Tagged , | Comments Off on Get Bitmap Size Get Free Memory Exception Android
17,236 views

Memory usage of application in Android sample code

public class MainClass extends Activity { ActivityManager activityManager; MemoryInfo memoryInfo; final String TAG = "MemInfo";     @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);   activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); memoryInfo = new ActivityManager.MemoryInfo();   activityManager.getMemoryInfo(memoryInfo);   Log.i(TAG, " memoryInfo.availMem … Continue reading

Posted in Android Examples Code | Tagged , , | Comments Off on Memory usage of application in Android sample code