Android Question What can a service access?

ac9ts

Active Member
Licensed User
Longtime User
I have a question as to what a service can access in an application. I read the tutorial and saw that the service can not interact with a paused activity. My question is can a service still use code modules even if the activity is paused?

Let's say I have a data logging application that uses an activity to select a database, parameters, etc. This activity would then start the service to listen for the randomly incoming data. There would be a code module (that is currently used in other applications and is NOT in the service module) that would receive the data, verify it, and store it. If the activity is paused, will the service still be able to access the data code module and write to the database or does all the database code need to be in the service module?

I would like to keep the modules separate since the database module will also be used when the activity is running.
 

ac9ts

Active Member
Licensed User
Longtime User
I re-use the code module in different projects is what I should have said. It's a collection of generic routines that I use often (sometimes with slight modifications so I don't want to create a library). I just copy the file into the project directory, tweak if necessary, and code the rest of the application.

The service can always access the code modules subs.

This is what I needed. Thanks.
 
Upvote 0
Top