Hello,
I am making an iPhone version of an Android app I made with b4a. The Android app has a service and multiple activities that access the service (with callbacks that the activity can set in the service for example). The service may not be interrupted as it connects to a network server and that connection may not be interrupted.
I understand that iOS does not have service modules. So I put the code in a class module. The calss is initialized in the main code module. It works. My question is now, how can I share that class between activities (or pages)? What way is the best practice on b4i for this kind of task?
(I am aware that the class, unlike the Android service, will only run while the app is open, that's ok).
I am making an iPhone version of an Android app I made with b4a. The Android app has a service and multiple activities that access the service (with callbacks that the activity can set in the service for example). The service may not be interrupted as it connects to a network server and that connection may not be interrupted.
I understand that iOS does not have service modules. So I put the code in a class module. The calss is initialized in the main code module. It works. My question is now, how can I share that class between activities (or pages)? What way is the best practice on b4i for this kind of task?
(I am aware that the class, unlike the Android service, will only run while the app is open, that's ok).