devanshu_kaushik
devanshu_kaushik

Reputation: 969

Interface for Service class?

I want to implement my database helper class as a service, but it already extends SQLiteOpenHelper... is there an interface for Service available in android?

Upvotes: 0

Views: 110

Answers (1)

denis.solonenko
denis.solonenko

Reputation: 11765

Dunno if it is a good idea, but anyways, using inheritance does not make a lot of sense in this case - you should go with composition. Your service should extend Service class and include DatabaseHelper as an instance variable.

Upvotes: 2

Related Questions