See sample project and documentation.