• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Saving a backup via System File Browser
#4
I use the pretty standard approach to invoking the storage access framework to pick a destination to save a file:

Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_TITLE, defaultName);
startActivityForResult(intent, code);

It works perfectly fine for local destinations, but the result can be completely different on devices from different manufacturers (and across OS versions). I don't have control over how the storage access framework functions or how the UI appears. Applications on the device have to act as content providers for the ACTION_CREATE_DOCUMENT intent in order to show up as an option. By comparison, when selecting a file for restore, I can use Intent.ACTION_GET_CONTENT which is more widely supported across apps.

Mike
Reply


Messages In This Thread
RE: Saving a backup via System File Browser - by Zubersoft - 03-14-2024, 05:20 AM



Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.