'How to open file with custom extension on android 11 via action open document
How i can open file with my extension settings. Framework see this file,but i can't open it. when i set mime_type / all ok,but it allow to open all file types,but i want to open only .settings file extansion. Thanks everybody for the help.
Intent i=new Intent(Intent.ACTION_OPEN_DOCUMENT);
i.addCategory(Intent.CATEGORY_OPENABLE);
i.putExtra("android.content.extra.SHOW_ADVANCED", true).putExtra("android.provider.extra.SHOW_ADVANCED", true).putExtra(Intent.EXTRA_MIME_TYPES,new String[] {"text/settings"});
i.setType("text/settings");
startActivityForResult(i,1);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|