Skip to content Skip to sidebar Skip to footer

Getapplicationcontext() Returns Null In A Service

I have a Service in it's own process, I've declared it in manifest like that:

Solution 1:

You are running your Service in a different process so it has no communication with the Actual Application process..

Try to remove this line from your service

android:process=":pointservice"

After your application is finished Application context is becomes null. At most situations there is no need to run the service in a different process. Also it is not recommended.

For more information check here

  1. Service in another process
  2. service reference Example2

Post a Comment for "Getapplicationcontext() Returns Null In A Service"