在应用程序安装到内存后,是否可以在内部存储中创建文本文件? [英] Is it possible to create a text file in internal storage just after the app is installed in memory?

查看:85
本文介绍了在应用程序安装到内存后,是否可以在内部存储中创建文本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Android手机上安装应用后立即在内部存储中生成一个文本文件(限制为64k)。可能吗?请帮助..



我尝试了什么:



我写的用于在onCreate()中创建文本文件的代码,但无法找到它是对还是错,因为文本文件没有显示为私有。

解决方案

< blockquote> OnCreate 在应用程序启动时调用,而不是在安装时调用。请参阅活动| Android开发者 [ ^ ]

I wanted to generate a text file(limit is 64k) in internal storage just after the app is installed on android phone. Is it possible? Please Help..

What I have tried:

I wrote the code for creating the text file in onCreate() but couldn't find that it is right or wrong because the text file doesn't show as it is private.

解决方案

OnCreate is called when the application is started, not when it is installed. See Activity | Android Developers[^].


这篇关于在应用程序安装到内存后,是否可以在内部存储中创建文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆