"home" on android

Started by jsalai, September 08, 2021, 10:59:53

Previous topic - Next topic

jsalai

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!
I won't belong to any organization that would have people like me as members.
[Groucho Marx]

chrisws

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


jsalai

#2
Quote from: chrisws 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

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)
I won't belong to any organization that would have people like me as members.
[Groucho Marx]

chrisws

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.

jsalai

#4
Quote from: chrisws 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.

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!
I won't belong to any organization that would have people like me as members.
[Groucho Marx]

jsalai

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 people like me as members.
[Groucho Marx]