Android Question Converting B4A to B4i

Startup

Active Member
Licensed User
Longtime User
It looks to me from reading the forum that converting an Android B4A app to an iOS B4i app can be done using much of the code from the former in the latter and it isn't a hugely difficult task to do the conversion. However, my app uses Dialogs, Phone, Random Accessfile, and SQL libraries and I am getting the idea that these cannot be used in the B4i version I wish to create which would make the conversion a big deal indeed unless of course B4i has similar libraries? Or is there some other solution?
 

imbault

Well-Known Member
Licensed User
Longtime User
Your migration looks pretty good, dialogs (depends what you mean by dialogs), Phone, files access and SQL lib (you should use Resultset in Android) exist (natively) or with libs on B4i
So no big deal from my point of view
 
Upvote 0

Widget

Well-Known Member
Licensed User
Longtime User
It looks to me from reading the forum that converting an Android B4A app to an iOS B4i app can be done using much of the code from the former in the latter and it isn't a hugely difficult task to do the conversion. However, my app uses Dialogs, Phone, Random Accessfile, and SQL libraries and I am getting the idea that these cannot be used in the B4i version I wish to create which would make the conversion a big deal indeed unless of course B4i has similar libraries? Or is there some other solution?

To access SQLite in both B4A and B4i without having to change your code, use DBUtils which returns the data in a Map or List etc.. This isolates the Cursor or Resultset to DBUtils so you just swap in the correct DBUtils for B4A or B4i.
 
Upvote 0

Widget

Well-Known Member
Licensed User
Longtime User
Note that the latest version of B4A SQL object does include a ResultSet type that behaves like B4J / B4i ResultSet.

That's great news! ;)
To clarify things. Are there any other SQLite code changes needed when converting an app from B4A to B4i? In other words, when using ResultSet can the same SQLite code be used between all B4X platforms?

TIA
 
Upvote 0
Top