I'm running a services page continuously where I don't need the use of activity or the app icon to be displayed in my device
Apart from the main activity I have a java class which extends services and I have commented 'setContentView' in the main class were not to display the layout but when I run the app ill get a blank page and yes my services also run
Main Activity.java
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.activity_main);
Intent serviceIntent = new Intent(this, MyServices.class);
startService(serviceIntent);
}
}
I expect my app not to be displayed or an icon to be displayed in my device but just to run my services.
Thanks in advance, please help me out with this.