Android Question B4X step by step move to other platform

MrKim

Well-Known Member
Licensed User
Longtime User
OK, so I have a project that is working in B4J, I want port it to B4I and B4A. Is there a video or step by step help file that will help me do this? I can hack itvout myself and make things work but I will never be sure if I have done it in the most efficient way and will be reusing all that is reusable.

Thanks for any advice.
 

klaus

Expert
Licensed User
Longtime User
As far as I know, there is no documentation on B4XPages apart Erels' tutorial.
You may have a look at the B4X Cross-platform projects Booklet, which includes examples.
This booklet doesn't include B4XPages yet, it was written before B4XPages were published.
It will be updated as soon as B4XPages becomes more mature.
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
As far as I know, there is no documentation on B4XPages apart Erels' tutorial.
You may have a look at the B4X Cross-platform projects Booklet, which includes examples.
This booklet doesn't include B4XPages yet, it was written before B4XPages were published.
It will be updated as soon as B4XPages becomes more mature.
klaus: Thanks for your help and support. I have learned a lot from your posts and code over the years.
Sorry if there is a misunderstanding, it isn't B4Xpages specifically that I was talking about, I was talking generally about setting up an app to work on the other platforms. I have set up the B4XPages_SQLiteLight2 structure, for example and am trying to follow that structure to set up my app, but, for example do I have to manually create the layouts. I know you can now copy layouts from one platform to another. Is that he best way to do it? I also noticed this line:
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
It is in B4XMainPage I remember seeing something somewhere about modules being automatically updated. Is that what this is for? In B4XPages_SQLiteLight2 the only thing in that folder is persons.db. So does that line of code need to be added to the code for each platform? Always in B4Xmainpage? As I said, I can hack it out and make things work. I was just hoping there was a document somewhere that explained step by step what to do. Copy this line of code here, copy these modules there, add this line of code here,...
I am just a dumb database programmer trying to get a job done. I will probably never grasp the intricacies of how all of the pieces of this puzzle fit together. That is one of the reasons I chose VB to work in, generally it hide all of that from you so you can just code.
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
B4XPages_SQLiteLight2 structure, for example and am trying to follow that structure to set up my app, but, for example do I have to manually create the layouts. I know you can now copy layouts from one platform to another. Is that he best way to do it?
You need to create the layouts for each platform. When you have created the layouts for one platform, then you can copy the views from one platform to another one.
This is explained in the B4X Cross-platform projects Booklet, chapter 4 Copy layouts.

I also noticed this line:
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
It is in B4XMainPage I remember seeing something somewhere about modules being automatically updated.
This line copies all the files from the Shared Files folder to the platform specific Files folder, it is explained in THIS thread.
It has nothing to do with the automatic update of shared modules.
The B4XMainPage module is a shared module added with a relative link. This means that the IDEs of two different platforms opened at the same time read and the same file.
When you modify code of shared modules in one IDE and save the project, the code is automatically updated in the IDE of the other platform.

The best way to start cross-platform projects is with B4XPages and the CrossPlatformProject_Template from HERE.
Templates will be added in the next versions of the B4X products as Erel promised.
 
Upvote 0
Top