B
B
BitNeBolt2020-11-06 21:37:59
Android
BitNeBolt, 2020-11-06 21:37:59

Should I use a singleton for notifications?

There is a notification that should be called from different places in the program. Is it worth creating one object to create it if there are several similar notifications?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2020-11-06
@BitNeBolt

No, the singleton is an antipattern. Use Dagger 2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question