简体   繁体   English

应用存储设置的意图

[英]Intent for app storage settings

I'm trying to find out if there's an intent for the app-specific storage screen as seen below in the picture. 我试图找出是否有特定于应用程序的存储屏幕的意图,如下图所示。

I tried the following code but it only opened the App Info screen: 我尝试了以下代码,但只打开了“应用程序信息”屏幕:

Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri packageURI = Uri.parse("package:" + myPackage);
intent =.setData(packageURI);
startActivity(intent); 

This is not possible. 这是不可能的。

You can not go further than the app settings, using the Intent you posted. 使用您发布的Intent,您不能超出应用设置。 What you could do is explain the user how to clear the data before firing the Intent though. 但是,您可以做的是向用户解释在触发Intent之前如何清除数据。

intent for open Internal storage settings 打开内部存储设置的意图

Intent intent  = new Intent(Settings.ACTION_INTERNAL_STORAGE_SETTINGS);
startActivityForResult(intent, 0);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM