Android Question How to add a Starter service to an existing project?

agraham

Expert
Licensed User
Longtime User
I want to add a Starter service to an old rather large project that originated before the Starter service existed and thought that I could just add an existing Starter.bas module to the project as a module and all would be well. But it's not! I get an "Unable to create service" error when I run it. What am I missing?
 

agraham

Expert
Licensed User
Longtime User
Found it deep in the "very" long error log.
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence anywheresoftware.b4a.objects.ActivityWrapper.getTitle()' on a null object reference
B4X:
Sub Process_Globals
    ' ...
    Dim DefaulTitle As String = Activity.Title & " v" & NumberFormat2(Version, 1, 2, 2, False)
    ' ...
End Sub
That's been working for years now!
 
Last edited:
Upvote 0
Top