Android Question Background task

Laurie

Member
Licensed User
Longtime User
I'm struggling to create a background task using Tracker as a guide. I have a simple music player that we like but of course it stops when the screen goes off.

Where should my Process Globals/Globals and all subs go?
Particularly what happens to what was Activity_Create ?
 

Laurie

Member
Licensed User
Longtime User
Thanks Erel,

So,I replace the Tracker module with my MediaPlayer module and set Process_Globals in that module to 'Player as Boolean', where Player is the sub that was Activity_Create ??

Sorry if I'm being thick, but this still seems quite complicated to my very limited experience.
 
Upvote 0

Laurie

Member
Licensed User
Longtime User
Many thanks for responding Erel.

I get an error message from the manifest file
File not found: NetworkClearText.b4x_excluded

If I comment that line out the app compiles and runs - but keeps on stopping.

My version of b4x is 8.5 - if that is relevant...
 
Upvote 0

Laurie

Member
Licensed User
Longtime User
'It keeps on stopping' - that was the message, nothing more.
Is my b4a 8.5 unable to achieve what I wanted?
 
Upvote 0

Laurie

Member
Licensed User
Longtime User
Thanks Erel, I commented out the 'CreateResourceFromFile(Macro, Core.NetworkClearText)' line in the manifest editor and downloaded to a different cellphone (galaxy S6). On opening the app the following error was logged.

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
at anywheresoftware.b4a.objects.drawable.ColorDrawable.build(ColorDrawable.java:65)

However, the app worked, so thank you very much for your help.
How important is the NetworkClearText statement?
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
I know this is an old thread ... How to turn off playback when a user uses Recent Button and removes the application from memory.
 
Upvote 0
Top