分享

android第二天

 昵称1974760 2014-07-30
冒烟测试:
adb shell monkey -p <程序的包名> -v <事件的数量>

android下单元测试:
在AndroidManifest.xml文件中配置一下信息:

    在manifest节点下:
    <instrumentation
        android:name="android.test.InstrumentationTestRunner"
        android:targetPackage="com.itheima28.junittest" />
 
    在application节点下配置下面信息:
    <uses-library android:name="android.test.runner" />

测试时, 定义一个类继承AndroidTestCase


文件存储:

this.getFilesDir(); // /data/data/包名/files
this.getCacheDir(); // /data/data/包名/cache

openFileOutput("aa.txt", 0); /data/data/包名/files/aa.txt



权限相关:
1. 私有文件
2. 可读文件
3. 可写文件
4. 可读可写文件.


SharedPreferences存储路径: /data/data/包名/shared_prefs/

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多