Android Question Starter Service and multiple activities and their resources... my doubts

Cableguy

Expert
Licensed User
Longtime User
Hi guys...

I'm finally decided to bring to completion my long thought app...
I'll be having a few dozens of bitmaps, some used only once, some used very often
Since the entry point is something I am worrying about, I decided to post my doubts here!

Is it better to declare and initialize my bitmaps in the starter service?
I would hate to bring to front an app with half the graphics resources missing!

How do I access these resources? I NEVER USED SERVICES BEFORE!

Since this is a service, will it lag the app start? What about Layout loading, what relation between the load layout time and the service stated resources?
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
As a general rule, any public process global variable that is not a string or number should go to the starter service and be initialized in Service_Create sub.

This is also true for bitmaps.

Since this is a service, will it lag the app start?
No. It doesn't matter whether the code is in a service or activity.

Layout loading is not related as it loads its own resources.
 
Upvote 0
Top