adding a selected method to android

This is a work in progress fixed version of #877 and #883.