Can Droidscript successfully read and write to an external SD card now (using app.GetExternalFolder() or other commands)?

227 views
Skip to first unread message

davefinney

unread,
Jan 31, 2018, 11:15:29 AM1/31/18
to DroidScript
Can we write to the external SD card, if so how?

IOW, does app.GetExternalFolder() now work?

On some phones GetExternalFolder writes to the internal SD (with a different path to GetInternalFolder), sometimes it doesn't write to anywhere, but I've never got it to write to any external SD card.

I wrote the following to prevent any write to external SD appearing on the internal SD.

   var intSD = app.GetInternalFolder() +"/App_name/";

   int_db = intSD +"Database1";

   var extSD = app.GetExternalFolder() +"/App_name/";

   ext_db = extSD +"Database2";


if ( app.LoadBoolean( "mem_G", true ) )
{
   var int_db2 = intSD +"Database2";
   if ( app.FolderExists( int_db2 ) ) app.SaveBoolean( "mem_G", false );
   else if ( app.FolderExists( ext_db ) ) extSDexists = true;
   else
   {
      app.MakeFolder( ext_db );

      if ( app.FolderExists( int_db2 ) ) app.DeleteFolder( int_db2 ), app.SaveBoolean( "mem_G", false );

      else if ( app.FolderExists( ext_db ) ) extSDexists = true;

   }
}

Steve Garman

unread,
Jan 31, 2018, 12:02:18 PM1/31/18
to DroidScript
You probably need to use app.CheckPermission and app.GetPermission which were added in DS1.61

I'm not sure whether they are Premium only.

There is certainly a sample app which is Premium only but I'm not sure about the methods.

Will do my best to find out.

davefinney

unread,
Jan 31, 2018, 12:20:51 PM1/31/18
to DroidScript
Thanks Steve,
I'll await your reply with interest,...

Steve Garman

unread,
Jan 31, 2018, 2:44:15 PM1/31/18
to DroidScript
No, there is no straightforward way to access the external cards across different versions of DS without a Premium Subscription.

davefinney

unread,
Feb 1, 2018, 10:07:47 AM2/1/18
to DroidScript
Oh no, that's a shame. I spent ages writing and testing (and failing) to write to the external SD on several phones on the basis of the available commands, docs and assurances here that a fix was imminent.

I'll now have to go through my prog to remove all of the external SD accessing.

May I ask, is GetInternalFolder() reliable across all devices?

Dave Smart

unread,
Feb 1, 2018, 11:56:12 AM2/1/18
to DroidScript
What fix?  It works in premium.

Premium is not very expensive Dave... we desperately need more premium users to fund the development of DroidScript!


Reply all
Reply to author
Forward
0 new messages