How to download code from GIT and create apk and run test script into jenkins prgrammatically?

Hello Friends, I want to download the latest source code of my android project from GIT and create apk then Run Test Script in Jenkins. How to implement it programmatically. Please give me some idea or code snippets for the same. Thanks in advance

You should put jenkins to build and create the apk for you, then downloaded from the workspace directory, and put it in the folder where you needed for test run.
I have a similar setup, the apk is build by jenkins and for test job, I tell jenkins to copy the artifact from the app build project and put it into my src, where i need it for tests.

Thank you. I request to you Please share step by step so i can implement in my project.