登录
首页 » Android » 内存大小和SDcard大小的查看

内存大小和SDcard大小的查看

于 2022-01-21 发布 文件大小:647.51 kB
0 160
下载积分: 2 下载次数: 1

代码说明:

应用背景对于一个安卓系统来说,我们需要时刻掌握系统的存储空间大小使用情况,这是我们在创建管家软件的前提和基础。本代码就是一个简单的Demo,可以显示出该安卓系统下的内存和SDCard的大小以及内存和SDCard使用情况,以及剩余的空间大小是多少,非常适合初学者去理解如何调用安卓库中的相关函数关键技术主要是调用了安卓系统中的相关函数等等。String text = "总内存大小为"+resulttotal1+"剩余内存大小为"+resultab1+" "+"总SDCard大小为"+resulttotal2+"剩余SDCard大小为"+resultab2+" ";

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Android TTS语音播报
    Android TTS语音播报,可以选择多种语言进行播报。可以下载来学习。
    2023-09-06 10:35:04下载
    积分:1
  • Android的拨号器
    应用背景Lorem存有 ;仅仅是印刷排版业虚拟文本。Lorem存有一直是行业的标准虚拟文本自从16世纪,当一个未知的打印机把厨房型和炒它做字体样本。它不仅存活了五个世纪,而且还跨越了电子排版,基本上保持不变。这是流行在上世纪60年代随着拉突激光印字传输系统含Lorem存有通道释放,以及最近的桌面出版软件Aldus PageMaker包括Lorem存有版本。关键技术SED UT perspiciatis OMNIS ISTE Natus误差在坐voluptatem accusantium doloremque laudantium,totam REM aperiam平等,事实不云乎:AB伊洛inventore veritatis等准architecto beatae简历原则必须explicabo。尼莫”ipsam voluptatem quia Voluptas坐aspernatur AUT odit AUT福杰特,SED全能consequuntur麦尼多洛雷斯EOS魁属voluptatem Sequi nesciunt。neque波罗quisquam EST,魁dolorem ipsum quia悲哀坐特,consectetur,adipisci维利特,SED全能非numquam eius莫迪时代incidunt UT”等,quaerat voluptatem麦克纳姆痛苦。UT ENIM广告极小veniam,QUIS妙方exercitationem ullam体癣suscipit laboriosam,NiSi UT液体前EA的商品consequatur?在3 reprehenderit魁考德维尔QUIS EA voluptate维利特ESSE”无molestiae consequatur,VEL Illum魁dolorem EUM fugiat Voluptas pariatur现状不?
    2022-03-12 01:21:49下载
    积分:1
  • BLE4.0聊天实例
    BLE4.0聊天实例
    2015-05-19下载
    积分:1
  • android平台摄像头图像h264软件编码
    通过jni调用x264库,把摄像头的yuv数据实现软件编码h264视频。有的场合没有硬件h264编码接口。这个参考价值很大
    2022-05-10 18:29:55下载
    积分:1
  • android open gl 示例代码下载
    [实例简介]Open GL 入门级示例 [实例截图] [核心代码]package com.china.gltry;import javax.microedition.khronos.egl.EGL10;import javax.microedition.khronos.egl.EGL11;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.egl.EGLContext;import javax.microedition.khronos.egl.EGLDisplay;import javax.microedition.khronos.egl.EGLSurface;import javax.microedition.khronos.opengles.GL;import android.view.SurfaceHolder;/** * An EGL helper class. */public class EGLHelper{ public EGLHelper() { } /** * Initialize EGL for a given configuration spec. * @param configSpec */ public void start(int[] configSpec){ /* * Get an EGL instance */ mEgl = (EGL10) EGLContext.getEGL(); /* * Get to the default display. */ mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); /* * We can now initialize EGL for that display */ int[] version = new int[2]; mEgl.eglInitialize(mEglDisplay, version); EGLConfig[] configs = new EGLConfig[1]; int[] num_config = new int[1]; mEgl.eglChooseConfig(mEglDisplay, configSpec, configs, 1, num_config); mEglConfig = configs[0]; /* * Create an OpenGL ES context. This must be done only once, an * OpenGL context is a somewhat heavy object. */ mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT, null); mEglSurface = null; } /* * Create and return an OpenGL surface */ public GL createSurface(SurfaceHolder holder) { /* * The window size has changed, so we need to create a new * surface. */ if (mEglSurface != null) { /* * Unbind and destroy the old EGL surface, if * there is one. */ mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); } /* * Create an EGL surface we can render into. */ mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay, mEglConfig, holder, null); /* * Before we can issue GL commands, we need to make sure * the context is current and bound to a surface. */ mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext); GL gl = mEglContext.getGL(); return gl; } /** * Display the current render surface. * @return false if the context has been lost. */ public boolean swap() { mEgl.eglSwapBuffers(mEglDisplay, mEglSurface); /* * Always check for EGL_CONTEXT_LOST, which means the context * and all associated data were lost (For instance because * the device went to sleep). We need to sleep until we * get a new surface. */ return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST; } public void finish() { if (mEglSurface != null) { mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = null; } if (mEglContext != null) { mEgl.eglDestroyContext(mEglDisplay, mEglContext); mEglContext = null; } if (mEglDisplay != null) { mEgl.eglTerminate(mEglDisplay); mEglDisplay = null; } } EGL10 mEgl; EGLDisplay mEglDisplay; EGLSurface mEglSurface; EGLConfig mEglConfig; EGLContext mEglContext;}
    2015-04-06下载
    积分:1
  • BlueTooth
    Android的蓝牙编程例子,基于SPP协议与蓝牙串口设备通信.(Android Bluetooth programming examples, based on the SPP agreement with the Bluetooth serial device communication)
    2011-06-12 13:52:42下载
    积分:1
  • 二维码制作
    通过开源的zx,来制作自己的二维码,实现自定义二维码和自定义扫描器,其中包含了扫描decode和encode,通过这个demon,改写自己的二维码
    2022-06-03 01:34:40下载
    积分:1
  • 别睬我白块(游戏源码)
    一款可以实现别踩白块的游戏实现,功能相对完善。
    2022-07-12 14:50:39下载
    积分:1
  • andengine引擎的android RPG游戏
    这个是基于andengine引擎的android游戏源代码,供学习使用。 andengine引擎是一个开源并且免费的一个2D游戏引擎,目前有很多游戏都是基于这个引擎而开发的,该引擎是基于OPENGL es2 的, 大量工作时交给native层来完成的,所以效率是可以保证的。
    2023-09-09 23:50:04下载
    积分:1
  • java 二维码生成,包括插入个性图标
    应用背景各.种.网络当面付的自动售卖项目中.使.用.的.二.维.码.java api,已经完美插入个性图标~~接入方便,只.需.要.输.入qrcode的字.符.串.就.可.以.关键技术 生.成.自.定.义.个.性.图.案.的.二.维.码.过程api,完.美.接.入.无.需.要.第.三.方.jar包.方.便.各.位.大.猿.接.入.自.己.的.项.目....
    2022-02-13 00:58:12下载
    积分:1
  • 696518资源总数
  • 106174会员总数
  • 31今日下载