selectInput() is not working in Android mode.
` void setup() { selectInput("Select a file to process:", "fileSelected"); }
void fileSelected(File selection) { if (selection == null) { println("Window was closed or the user hit cancel."); } else { println("User selected " + selection.getAbsolutePath()); } }`
switch from Java mode to Android mode, processing gives error, Am I doing something stupid?
Hi, unfortunately the selectInput() function is not currently implemented in the Android mode, essentially due to the reason we discussed in #295: there is no native file selection widget in Android. I will mark this as en enhancement, but cannot give you at this time an estimate on when this will be addressed.
@codeanticode The simplest to way to implement this would be to use the native file browser app. This app is mostly available on all the devices. Processing-android will call startActivityForResult which will start the file browser activity. It is explained here - http://stackoverflow.com/questions/7856959/android-file-chooser
Also, there is a library that adds this functionality: android-select-file