In our app we have a Service defined in this way
<service
android:name="ServiceName"
android:exported="false" />
When Activity's onCreate()
is called, app starts this Service. And everything is fine, until it is moved to background for a long time. After moving app to foreground onCreate() is called again, and app tries to start Service but gets an error:
Caused by: java.lang.SecurityException: Not allowed to start service Intent { act=action_name cmp=app_bundle/service_name } without permission not exported from uid 10156
App crashes and after restart everything works again. I really can't get what is going wrong. Looks like Activity is started with new uid
, but tries to interact with Service from another process with another uid
(????).
Crash reproduces only on Asus phone, Android 6.0.0.