Refactor to Android library