Background service is not working in Oreo
I want to run my app in background if I kill the app instance also. But after I kill my app the service also stops working. Here is my code please any one help me to solve my issue. I followed this link for running in the background but it is not working if I remove the instance. Please can any one show me how to run a background service if the instance is removed also? This is my MainActivity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ctx = this; setContentView(R.layout.activity_main); Intent alarmIntent = new Intent(MainActivity.this,