Service module not found

DemoFreak

Member
Licensed User
Longtime User
Hi,

when I tried to start a service module, I've got an "ActivityNotFoundException", even though this activity exists definitely.

I inserted a service module named "TCPConnection", filled in some variables and code and then tried to start it in Main like this:
B4X:
Sub Activity_Create(FirstTime As Boolean)
' ...some other code
   StartActivity(TCPConnection)
' the IDE colored the activity name in purple and auto-capitalized the first four chars, so I think the activity name should be right
End Sub

and got:

B4X:
android.content.ActivityNotFoundException: Unable to find explicit activity class {de.xyz.test/de.xyz.test.tcpconnection}; have you declared this activity in your AndroidManifest.xml?

Where I'm wrong here?
 
Last edited:

NJDude

Expert
Licensed User
Longtime User
Check if the AndroidManifest.xml file is read-only, adding modules in the designer will work, but if your manifest is read only it won't add the newly created activities to the XML.
 
Upvote 0

DemoFreak

Member
Licensed User
Longtime User
Check if the AndroidManifest.xml file is read-only, adding modules in the designer will work, but if your manifest is read only it won't add the newly created activities to the XML.

The AndroidManifest.xml is not readonly, and contains the following lines at its end
HTML:
      <service android:name=".tcpconnection">
      </service>
      <receiver android:name=".tcpconnection$tcpconnection_BR">
      </receiver>
   </application>
</manifest>
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…