Refactoring of ActivityService for Android.