I really had many codes in my class and it calls Main
.
But I want that class running in the background.
My way:
I created another class and extend Service
. Then, I use onStartCommand
calling my class which called Main
and has many codes!
error: ....Service cannot be a cast to a android.app.Activity
I have really no idea!! Somebody help!