It’s always advised that if the project is outsourced, better you sign a legal agreement with the company and mention the clause of confidentiality for the app idea.