add method createController and createIntent for extending Context.