I need to start an Activity
in case of device shake in my Android application
.
This feature should work in my whole app
and in all activities.
Now sure how to provide a good architecture for it, because the detecting shake and starting an Activity needs context instance.
I don't want to pass my current Activity instance to the my ShakeListener
each time I change the activity
.
What will you suggest?
Thanks.