Android Question Understanding different modules

JamesGreaves

Active Member
Licensed User
Could someone please summaries difference between each type of Module and their uses:
Activity Module
Class Module
Code Module
Service Module
 

Cableguy

Expert
Licensed User
Longtime User
Could someone please summaries difference between each type of Module and their uses:
Activity Module
Class Module
Code Module
Service Module

Activity Module is a UI module, in which you can manipulate the screen and different controls. Each activity controls 1 "screen" or form, and you can have as many as you need.
Class module is a reusable class. i.e. you can create a custom control using a class and use it (several references to it) in many forms. A class can also deal with events triggered from the controls used in the class.
Code module can be used as a "commonly used" code repository... Imagine you have a long calculation to do several times in your app... You create a code module with that calculation and you call it from whichever class or activity you which. Code modules cannot interact directly with the UI.
Service module is like a listener.. it gets executed at appstart and stays active untill either the OS or your app kills it. It is usually used to wait for external events, like incoming notifications and such.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Service module is like a listener.. it gets executed at appstart and stays active untill either the OS or your app kills it.
That´s not true!
NO other service, except the starter service, is started automatically when you start yor app.
 
Upvote 0

JamesGreaves

Active Member
Licensed User
Thanks @Cableguy That gives me a pretty good overview. Very helpful, just what I needed.
*****
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
That´s not true!
NO other service, except the starter service, is started automatically when you start yor app.
Indeed, I was only thinking of the starter service... Still, it was just a simplified explanation... Just to get the OP in the right direction
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Your'e awesome C.G. I actually made my own text file for definitions of modules along with Don's criticism and your reply for clarification.
Thanks Guys! In addition, I'm donating.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…