Page 1 of 1

My own app that let TC show a folder don't run anymore with Api28

Posted: 2019-11-11, 10:51 UTC
by HerveA
Hello,
I wrote an appli that use TotalCommander to show a specific folder.
I do this by :
Intent i = a0.getPackageManager().getLaunchIntentForPackage("com.ghisler.android.TotalCommander");
i.setData(Uri.parse("file:"+aFolder+"/"));
a0.startActivity(i);
On my old phone with Api21, this run perfertly.
But, on a new phone with Api28, this dont run anymore.
Have you any solution ?
Thanks

Re: My own app that let TC show a folder don't run anymore with Api28

Posted: 2019-11-11, 11:44 UTC
by ghisler(Author)
Android API 28 doesn't allow to use file: URLs. But don't worry, just replace the file: prefix by content: and TC will accept it.

Re: My own app that let TC show a folder don't run anymore with Api28

Posted: 2019-11-11, 13:07 UTC
by HerveA
Wonderful,
I tried a lot of things, I did not think about this simple solution
thank you very much.