Receipt: It is not allowed to start the Intention service ... without permission. The service process is bad.

The ACRA crush report sends me this error.

java.lang.SecurityException: Not allowed to start service Intent { act=auto_update cmp=net.DailyTimer.CalendarAlarmHelperFree/net.DailyTimer.CalendarAlarmHelper.CalendarAlarmService } without permission Service process is bad 

I see this error on limited devices and I cannot reproduce. I assume that this error depends on the working environment.
My question is:

  • Which resolution is incorrect? I could not understand what β€œService process is bad” means.

EDIT:
I get this error when calling startService (intent) to start a remote service. And on many devices it works fine.

+6
source share
2 answers

Although I did not experience this myself, I looked around a bit, and I think it may be useful for you. Here , a Jomia user says:

The java.lang.SecurityException exception that you see is due to the fact that you can enter two entries indicating the same activity. Remove the second and you should be good to go.

Also, browse this page , specifically under public static final int CONTEXT_INCLUDE_CODE . Here is the relevant part:

Setting these flags imposes security restrictions on which application has a context that you can access; if the requested application cannot be safely loaded into your process, java.lang.SecurityException will be thrown. If this flag is not set, there will be no restrictions on packages that can be loaded, but getClassLoader () will always return the system class loader by default.

I hope I can help. If these answers are not related to your problem, you can try posting the appropriate code, etc. Greetings.

+3
source

Source: https://habr.com/ru/post/895517/


All Articles