I'm currently developing a plugin for ATAK in which I need to launch a handful of services that have been imported from other modules I've created. When I try to start the services however, I receive the error as stated in the title. I'm a bit confused as the services I've created do include the BIND_JOB_SERVICE permission in both the module itself and plugin AndroidManifests as follows
<service
android:name="mqtt.MqttBrokerService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE">
<intent-filter>
<action android:name="mqtt.MqttBrokerService"></action>
</intent-filter>
</service>
These code blocks are within the application section of the AndroidManifest so that isn't the issue. I'm pretty dumbfounded and not sure why this happening and also why it even requires this permission since it isn't a job service. The cherry on top is I created a sample app that has the exact same Manifest as my plugin and the sample app launches the services just fine. The only difference is in my plugin, I don't launch the services from the main activity as follows
Intent startMqtt = new Intent("mqtt.MqttBrokerService");
startMqtt.setPackage("com.atakmap.android");
getMapView().getContext().startForegroundService(startMqtt);