开发者

Interface for Service class?

开发者 https://www.devze.com 2023-03-25 22:44 出处:网络
I want to implement my database helper class as a开发者_StackOverflow社区 service, but it already extends SQLiteOpenHelper... is there an interface for Service available in android? Dunno if it is a g

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消