Android Question transferring project - what must be included and what can be dropped?

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
hi

i have a project in b4a
there are a few folders under the main folder
i now want to transfer it for example to someone or upload it here
if i just zip it it creates a huge zip file
i see many uploaded projects as sample here that are really small zip
so what can i delete?
what must be included in the zip?
i want the project be fully alive if someone opens it and compile
i want the project be fully alive if someone opens it and compile
this can also be used to backup so the backup will be much smaller - i pack the entire main folder so it created a large zip - i want to minimize it

thanks
 

zed

Active Member
Licensed User
What are the subfolders? What's in them. We don't know what's in your zip file. It's hard to say what can be taken away.
For example, you can zip subfolders and download them once the app is installed.
 
Last edited:
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
You can remove Object and Backup folders.

What takes up the most space are the image files (but also audio/video) in the Files folder, but these are essential for the app to work.

If the zip file is larger than 500Kb, use one of the many sites that offer free space to share files.
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
thanks guys
the issue is not disk space - i have plenty
it's the file size as i keep a few generations back using an auto backup after each project open it zips the entire project so i can rollback
now if it is totally safe to remove objects and backups then i think it will fully solve my problem as object is huge due to sub folders
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
If you are talking about B4A project created with Default template (not B4XPages), also take note of res folder (res/drawable to be more specific) inside Objects folder that you don't want to delete. It contains the icon file of your app.

p/s: Why not just use the "Export as Zip" button in the IDE?
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
yes, it is a simple b4a project
and i do not touch res - i keep it
i only delete object and backup
from ~100MB gone to ~2.5MB
tested the project and all perfect
that's huge for me
thanks
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Just use the "Export as Zip". It simplifies your manual work.
Unless you keep some additional document or files in autobackup or Objects folder that you can later drag and drop them into the zip file.
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Just use the "Export as Zip". It simplifies your manual work.
Unless you keep some additional document or files in autobackup or Objects folder that you can later drag and drop them into the zip file.
export is manual and i need to remember to do it on every touch
no good
i have an automatic source manager that does it all when i close B4A or any other IDE
so this is done automatically for me
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Consider using a source control system such as git. It has so many advantages over just taking a backup copy, especially if you want to share code with others.
I have had 3 people working on the same project without any problems.

Here is the contents of my .gitignore

B4X:
Objects
AutoBackups

For B4A, I now always use an Adaptive icon,
so there is no need to worry about res/drawable
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
ok - one problem i found in this methos of deleting backups & objects - the app's icon is gone
where is it stored?
in res\drawable i did not find it - should i copy it to there and reassign it from there?
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
oh god...
so i can't just delete object as is
i need to keep that folder under objects just for the icon...
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
found a "tricky" solution - just mark the icon under objects as read only - the delete process can't delete it so it will stay
all others are deleted
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Actually you could remove all the other files from Object.
Note that the default B4A icon is automatically recreated.
no it doesn't
when i deleted objects folder the icon was gone
then i found the tricky way...
then i just excluded this res folder under objects from deletion and all is fine now
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
ok
to summarize this topic
i managed to shrink my backups from ~100MB each to ~2.5MB each
all thanks to deleting thee backups folder (entirely) and the objects folder's content leaving only res as the icon is there
tested many times the project and the installation - all is fine including the icon
thank you all
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…