fix bug in TCX sharing and make code more robust for android versions