After passing the road test the examiner will give you an interim license that allows you to drive. Keep the interim license with your photo learner permit until your new license arrives in the mail in about 2 weeks.
Can I prove my residence by showing that I lived in an apartment in NY for a year?
Yes. A police officer can use this as evidence to issue a traffic ticket if you drive in New York State without a New York State driver license or vehicle registration. A judge considers the law and the evidence of your intent and decides if you are a resident of New York State.
And what do I have to do before I can get a license?