you are getting the following:
java.lang.ClassCastException:
.ReceiveTransitionsIntentService cannot be cast to android.app.Activity
new DBManager(getApplicationContext) ->
java.lang.ClassCastException: android.app.Application
cannot be cast to android.app.Activity
new DBManager(getBaseContext) ->
java.lang.ClassCastException:
android.app.Contextimpl cannot be cast to android.app.activity
This simply means you are receiving Activity in the parameters. that is your function signature contains:
functionName(Activity context);
Change the functions to:
functionName(Context context), thus when you pass context, as `this`
or someOtherActivity.this
or getApplicationContext()
it will not lead to the errors.