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
 

MarcoRome

Expert
Licensed User
Longtime User
Look here: https://www.b4x.com/b4a.html

upload_2019-9-12_12-51-57.png
 
Upvote 0

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
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.
Thanks @Cableguy That gives me a pretty good overview. Very helpful, just what I needed.
*****
 
Upvote 0

Shelby

Well-Known Member
Licensed 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
Top