获取系统剩余内存

原文:http://mingkg21.iteye.com/blog/605846
    private String getAvailMemory( ){  
        ActivityManager am = (ActivityManager) getSystemService( Context.ACTIVITY_SERVICE );  
        MemoryInfo mi = new MemoryInfo( );  
        am.getMemoryInfo( mi );  
        return Formatter.formatFileSize( context, mi.availMem );  
    }  

  

你可能感兴趣的:(java,Blog,ITeye)