I have an Android library which acts as a service and has some personality such as receiving notification, sending notification delivery message to server, etc.
This library is dependent to some data like `server url', 'the state of user logging' and some other data. Now my problem is what is the best design to set those information to this library from the top layer Android Project(the project that uses this library). For now I have declared setter methods and set the data which is required when they are available in the top layer but I think this is not a good design. It is important to say that the url may be change periodically and I have to update the url whenever it changes.
Any help is appreciated.
Aucun commentaire:
Enregistrer un commentaire