iOS & Android with Xojo

These questions are most probably for the Xojo engineers and I don’t expect definite answers if they are not clear at this point, just a little bit of a guideline.

I would like to move one of my bigger iOS apps to Xojo API2.0. This will probably take me some weeks, if not months. That’s why I’d like to make sure, that most of the things I will do, can be re-used at some point in the future with Xojo Android.

I am aware, there might be some stuff which will never be compatible and that’s ok. I just want to avoid having to change the complete structure of the app later to make it compatible with Android, for example if TabBars don’t make it to Xojo Android, I would redesign the app to leave them out.

Here are a few specific questions:

  • Toolbars, Navigation Bars, Tabbars: are they compatible with Android?
  • SQLiteDatabases: I would think SQLiteDatabases are compatible with Android?
  • MobileRectangle.SetEffect (vibrancy & blur) probably won’t make it to Android?
  • Also iOS specific declares (like the iOSDesignExtensions or the iOSKit) are probably not compatible with Android?
  • Will Localization be handled in the same way (i.e., with Localized Strings)?
  • Would you - at this point - recommend to do the auto-layout in the IDE or in code with layout constraints?
  • I would think there will be some kind of constant which we can identify the OS, right?

Appreciate every tiny bit of info. Thank you!

1 Like

I think the general policy is not talk about unreleased features because they can change.

You can ask support to see if they can share something privately.

iOSKit will certainly not (ever) be compatible with android unless someone takes it upon themselves to contribute feature parity once the android target exists. As it is right now iOSDesignExtensions will not support android either but it seems possible that it would be updated to support it since I’m sure Jeremie will want to release android versions of his apps.

1 Like

The database engine is a plugin written in C, so this one can be compiled for all targets and I expect that to work. Plugin support for Android was mentioned before.
But of course not sure what first version of Android includes!

I would anticipate SQLite databases should be fine. I use them in both iOS and Android projects in some other mobile development tool (which predates Xojo support for any mobile platform).

So just saying Android has SQLite support, so would expect Xojo for Android to enable it though I have no knowledge of what will be included in v1 for Android.

UI parity is another topic though…

Appreciate all your replies, thank you!

Turns out I could have done the easiest of things and watch @Paul_Lefebvre YouTube video on the topic: Xojo Programming - Android Update - YouTube

But this is a year old…?

I just did this with one of my apps. A rough guesstimate is that it will take about 50% of the time to convert as it did to write the original app.

There are still a few things that will need some adjustment for Android, methinks. iOSTable is changed to iOSMobileTable, not MobileTable. And iOSLayoutConstraint hasn’t changed.

1 Like

As long as Xojo for Android isn’t in pre-release, we don’t know what to expect.

I would recommend putting as much code as possible out of MobileScreens and use the MVC approach. This will greatly help in sharing code between iOS and Android projects if both targets do not share a single project type.

3 Likes

That’s very valuable feedback, thank you. I fear it’s going to be a lot more for my app because I plan to add localization (which I’m doing differently right now), use SQLite (which I’m doing with csv files and classes at the moment) and do some design changes.

Quick question: did you somehow manage to do some “wholesale” changes? For example, I would start by using Xojo’s search & replace function and replace “iOSButton” by “MobileButton”. But then the event handlers would be wrong as the iOSButton has the “Open” event while the MobileButton’s event is called “Opening”. Did you change that one-by-one?

I’m assuming separate targets/project types for iOS and Android for now.

my desktop application has been using localised with sqlite data file. what i have is english column and several common language.

i create superclass for the window with all the code to do localisation and has been using it methods for over 10 years. all i need to do is to make sure all labels has to be named properly and in the sqlite table, have column for the screen/window name and the control name.

I cannot talk about Xojo for Android, but having created Android apps with another tool, I can in advance tell you controls will definitely be different.

From the little Xojo told, they will use native controls. In essence, they won’t look like iOS.

For example, Android has RadioButtons while iOS does not. In your opinion, should Xojo leave them out of iOS (as they have) or add a non-native version?

I decided to change one view at a time so I could test as I go. So change from view to screen, add event handlers with the proper name, copy and paste code from the old ones, delete the old ones. Do the same with all the controls on that screen. If there’s a table, update the datasource. Run a test. Rinse and repeat.

I am precisely in the process of moving an app from Android to iOS. Indeed radio buttons are missing.

But I actually used switch to do the same thing. With a bit of code, only one can be on.

Knowing Xojo, I doubt very much they will add non native versions.

I tend to believe sticking to the native controls, and keeping to the Human Interface Guidelines, is key to minimize customer issues.

4 Likes

I also replaced Android checkBoxes by iOS switches.

It would have not be so difficult to come up with radio buttons and checkbox with a canvas. But it could be confusing for iOS users who never encountered them before, no to mention anal Apple reviewers who might reject for not being kosher.

The only place where I had to create my own is with a grid, which HTML/CSS in a WebView allowed me to get very precisely what I needed.

Since this thread is over a year old, and this my first post to the forums for Xojo, is there any update for the Android version of Xojo? I mean, even if it is missing radio buttons or other differences.

I am working with my first Xojo project on a Raspberry Pi, and will eventually be developing some mobile apps. Most of the tablets I want to use would be Android because of cost, and this IDE dev tool seems perfect!

Welcome to Xojo Brandon,

Have you seen this blog post? Xojo Android Pre-Release is now in testing – Xojo Programming Blog

If you send an email to hello@xojo.com and ask to join the Testers group (and are approved), you might be able to get some hands-on answers.

1 Like

Thank you @anon93744516 !!! No, I hadn’t seen this and thank you again.