Native integration of codenamone

Viewed 22

Is there a way to integrate codenameone component in a native activity/fragment?. The idea is having a codenameone library, that we use its native compilation as a library in an existing native project?

Many thanks for the reply

1 Answers

Maybe but probably not.

Codename One was very much designed to take over. The reason is that cross platform embedding is really difficult as the OSs have a very different concept of application embedding and lifecycle.

You can embed a native widget into Codename One "easily" but that's probably not enough.

Since in Android everything is an activity you might be able to hack something by packaging two apps into one APK and moving back and forth with the Codename One app. I wouldn't recommend it since we make a lot of assumptions and this might not work. You won't be able to do the same on other platforms either.

One strategy some developers took is to have two distinct apps that communicate between them via the cloud or via app URI calls (or both). This is a workable cross platform approach but it's also a bit painful and it isn't seamless to the user.

Related