Turn on usb debugging on your device.
Step 1 :Unlock your phone and go to Settings.
Step 2 : Under Settings, scroll down and open About phone.
Step 3 : Under About phone, find Build Number and tap multi times on it.
You will get a message on your screen that “you are now a developer”. Then you have successfully enabled developer option on your Phone.
Step 4: Select on the Back button and you will see the Developer options menu under System, and select Developer options.
Step 5: Slide the “USB debugging” button to “On” and you’re ready to use your device with developer tools.
Step 6: After finished all these steps, you will see a messages “Allow USB Debugging” for allow a connection, click OK.
https://ctc-dev.verkstad.cc/en/course-literature/processing-android-mode-examples/