Repository navigation
Android-to-iOS Importer: Requests for Expanded Document Intent, Background GPS, WorkManager, Room/SQLite, and Native Touch Compatibility #6127
Replies: 1 comment 1 reply
|
Great to hear it's useful to you!
We'll add a "Background execution on iOS" section to the Android interop chapter of the developer guide. It maps each of these Android mechanisms to what happens on iOS. I don't know if this will make it for tomorrows release as we have a big update. But I'll try and push them through. |
Uh oh!
There was an error while loading. Please reload this page.
Hi Codename One team,
I've been continuing work on bringing my existing Android geological research and navigation app, to iOS using your Android importer.
First, I wanted to thank you for the recent compatibility improvements. I noticed several updates following my earlier questions, and they've made a real difference. I've now gotten the full application compiling and launching on iOS, with MapLibre Native rendering geological maps, mineral heatmaps, and other map layers.
I'm getting considerably further than I initially expected without having to rewrite the application.
I'm now running into a few remaining Android compatibility limitations, and I'd like to request some additional support for these where feasible. I've been investigating the framework's existing capabilities to avoid requesting things that are already implemented.
The main areas are:
Android document intents: The app uses
ACTION_OPEN_DOCUMENTandACTION_CREATE_DOCUMENTfor importing and exporting tracks, locations, and other files. These currently produce anActivityNotFoundException. I found that Codename One already has native file-dialog capabilities. Would it be possible to add Android intent compatibility that connects these existing APIs to the Android activity-result system? This seems like something that could benefit quite a few imported Android apps.Foreground services and continuous GPS: The app uses Android location services and foreground services for recording GPS tracks, navigation, and field activity. I'd like to request more complete compatibility for these operations through iOS Core Location, including background recording where permitted. Retaining the original Android location APIs would make a substantial difference.
Native map touch interoperability: MapLibre Native is rendering successfully, but some interactions involving Android touch overlays, native UIKit gestures, and map coordinate conversion aren't functioning correctly. It would be helpful to have a more consistent compatibility mechanism for native peer touch handling, particularly where Android views overlap native components.
WorkManager and background execution: The app relies on WorkManager for offline dataset downloads and updates. I'd appreciate expanded support for the relevant Android background-work lifecycle, potentially using native iOS scheduling where appropriate, so existing Java workflows can be retained.
Room and SQLite: I discovered the Room implementation generator already included in Codename One, which is encouraging. I'm still verifying generated DAO behavior for trips, saved locations, and other persistent data. I'd appreciate continued compatibility work here, especially around database initialization, transactions, and asynchronous callbacks.
I'm trying to approach this as a compatibility project rather than replacing the Android functionality with separate iOS implementations wherever something doesn't work.
Would you be willing to consider expanding the importer in these areas, particularly document intents, location services, and native touch interoperability? Those appear to offer the greatest immediate benefit, and I suspect they'd be useful for other fairly complex Android applications as well.
I realize some of these are considerably larger undertakings than others, and some might already be partially supported. I'd be interested in knowing which you think could reasonably be incorporated into the importer and which would be better handled through application-specific bridges.
I'm happy to provide reproducible examples, affected API calls, and test results from the app to help narrow down what needs implementing.
The importer has already made this migration much more practical than I expected, and I'd really like to keep building on that progress.
Thanks again!
All reactions