TCat
TCat

Reputation: 51

Codename One SMS BroadcastReceiver and Service

I'm considering using Codename One to try to leverage my code into iOS, but it's not clear I can even write my current Android project in Codename One.

My app listens for inputs via GoogleCloudMessaging, via SMS using a BroadcastReceiver and via LAN by implementing a Service (android.app.Service.) It also writes to Dropbox using the 3rd party CloudRail library.

If I've understood the docs, none of these are readily supported by Codename One, correct? Is my app a bit too platform-specific to be portable to Codename One?

Upvotes: 1

Views: 95

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

You can receive push messages in Codename One but GCM is probably not the right fit for iOS so you would receive them via APNS and that goes thru our servers to abstract the OS differences.

I'm not sure what you mean by "lan" do you mean you listen to UDP broadcasts? We support TCP sockets but never got into the UDP part as it's not as common or portable (there are some complexities regarding low level posix calls). You can probably do an abstraction by taking the cn1lib for tcp sockets written by Steve Hannah and use that as your starting point.

We have dropbox read support but not dropbox write, this should be doable.

Background services don't exist on platforms other than Android and as you are probably aware are undergoing behavioral changes with newer Android versions to preserve battery life.

If something is possible on iOS you can probably accomplish it on Codename One, however if your app is really low level then Codename One is probably not the ideal fit.

Upvotes: 0

Related Questions