September 18, 2021, 04:46:24

Author Topic: "home" on android  (Read 322 times)

Offline jsalai

  • Jr. Member
  • **
  • Posts: 41
"home" on android
« on: September 08, 2021, 10:59:53 »
On Android is the <home> folder fixed to:
"/storage/emulated/0/Android/data/net.sourceforge.smallbasic/files"
as a global constant. So far, so good. I can create a shortcut on the desktop to that.
However, there exist a folder:
"/storage/emulated/0/SmallBASIC"

Now if a source file exist either on <home> AND/OR in the second one the program listed it and read it. But when opening/writing files it defaults to <home> no mater where is the program read from. Of course, I can define a string variable e.g.

path="/storage/emulated/0/SmallBASIC"

or any legal path, and use it instead of <home>. The problem is that I
- have to put it in every program
- it still refuses to use programs in sub-folders

Is it possible
- to define another folder (on external card would be ideal) as <home>
- to bring back the sub-folder navigation (if only limited to this new <home>)
or is this the dictator-policy of android (as modern in entire world)?

Cheers!

PS. The concept of walking thru sub-folders in a "home" is provided in my program:
https://raw.githubusercontent.com/smallbasic/smallbasic.samples/master//applications/filemanager.bas
ages ago!
« Last Edit: September 08, 2021, 11:27:21 by jsalai »
I won't belong to any organization that would have me as a member.
[Groucho Marx]

Offline chrisws

  • Full Member
  • ***
  • Posts: 117
    • SmallBASIC
Re: "home" on android
« Reply #1 on: September 08, 2021, 12:10:01 »
It's the second one... the dictator-policy of android lol.

I tried to make it as useful as possible without risking the wrath of google and them taking the app down.

There's some more information here: https://developer.android.com/training/data-storage. See notes about "scoped storage".

Note SmallBASIC targets android 11


Offline jsalai

  • Jr. Member
  • **
  • Posts: 41
Re: "home" on android
« Reply #2 on: September 08, 2021, 12:30:36 »
It's the second one... the dictator-policy of android lol.

I tried to make it as useful as possible without risking the wrath of google and them taking the app down.

There's some more information here: https://developer.android.com/training/data-storage. See notes about "scoped storage".

Note SmallBASIC targets android 11

I bought the device, google owns it!

So vaccination = "freedom" (strongly controlled) ;)
or should I say: "Arbeit macht frei!"

"I've seen the future, brother, ..." (The Future - Leonard Cohen)
"Freedom's just another word for nothing left to lose ..." (Bobby McGee - Kris Kristoferson)
« Last Edit: September 08, 2021, 13:18:38 by jsalai »
I won't belong to any organization that would have me as a member.
[Groucho Marx]

Offline chrisws

  • Full Member
  • ***
  • Posts: 117
    • SmallBASIC
Re: "home" on android
« Reply #3 on: September 09, 2021, 00:13:15 »
Maybe I should release an F-DROID version as well as the big-brother version?

I'm not sure how much extra effort that would be. There seems to be a few different app store alternatives, but I have no experience with any of them.

Offline jsalai

  • Jr. Member
  • **
  • Posts: 41
Re: "home" on android
« Reply #4 on: September 09, 2021, 06:58:46 »
Maybe I should release an F-DROID version as well as the big-brother version?

I'm not sure how much extra effort that would be. There seems to be a few different app store alternatives, but I have no experience with any of them.

That would be excellent, but onjy if it requires not too much effort...
The 12.19 version was ok in this and many other sense, so it needs the new fixes and upgrades...

Anyway, I believe, we must accept the "new order", and prepare for modern slavery. F-droid, petal, apkpure, etc... work for now, but I'm afraid they will be absorbed  by the big one, as the money makes wonders :(

Thanks for your kind attention, and take care...

Cheers!
« Last Edit: September 09, 2021, 08:45:05 by jsalai »
I won't belong to any organization that would have me as a member.
[Groucho Marx]

Offline jsalai

  • Jr. Member
  • **
  • Posts: 41
Re: "home" on android
« Reply #5 on: September 12, 2021, 09:31:03 »
Most of developers for android accepted the "new order" by Google. I use Total Commander on by devices and saw the same/similar "home_dir" structure.

However, Total Commander gave access as alternate "home_dir" to the external card. Moreover, Total Commander give full control over the internal card (probably a deal with Google), and on external one it allows use of sub-folders INSIDE the alternate "home_dir".

So I assume it is allowed to create similar structure in ANY "home_dir" so my proposal of use sub-folders on BOTH "home_dir"-s give some "freedom" in slavery.

If you take a look in my
https://raw.githubusercontent.com/smallbasic/smallbasic.samples/master//applications/filemanager.bas
 it could be made with some small changes in the main.bas

Worth to think about?
I won't belong to any organization that would have me as a member.
[Groucho Marx]

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal