I’ve been away from Processing for a few months, but I’m back now.
My last query about decoupling text from image rotation is resolved. Thank you.
I now need to do the following -
1: export sketch to exe file Windows 10
2: export sketch to android 10 platform
When I tried this previously I received the following errors
1.5.1 standard or android but no support p3d
2.2.1 java but no support p3d
3.5.4 java p3d OK. No exe or android apk
4.0a1 java p3d OK. No exe or android apk
Processing 3.5.4
I can get export to exe working OK, without a data folder - just using the original path in the pde.
However, I’m struggling with the android mode. It asks for the sdk location, I give it the location manually (it doesn’t find it automatically) but it says the Android SDK could not be loaded. It tells me to load Android Studio to extract (another) sdk path but it won’t download or install Android Studio. It tells me to check Environment Variables.
I don’t have problems with this at all. I just use this SDK folder and unzip it in the documents/processing folder or elsewhere. Then open I the preferences.txt file. (The location you can find at the bottom of the File/settings menu.) In the android parameters you will find something like:
Change/set or correct the right sdk path as where you saved it. Close processing’s IDE and only than save the preferences.txt file.
Then start ide again.
I’m not at my computer today, but I’ll try it tomorrow.
I do use android sdk up to 26 and beyond in numerous apps with Eclipse software, and I hope the additional sdk location doesn’t upset the working of those apps, some of which have been working successfully for up to 5 years.
I have it part-working, but I get many error messages which are difficult to read (red against black background). I think green text would look better.
I have tried
console.log(colors.fg.green);
or
console.log(color(0,255,0);
but neither work.
In the theme.txt file, located at C:\Program Files (x86)\processing-3.5.3\lib on my pc; you will find the parameters to change. It looks something like:
# CONSOLE
# The font is handled by preferences, so its size/etc are modifiable.
console.color = #000000
console.output.color = #cccccc
# text color for errors printed in the console
console.error.color = #d9211e
PS. Remember to only save the file with the IDE closed!
Build time is back to 2m 40s so the first one must have been an anomaly.
I’m trying to catch a key down event from the virtual keyboard produced from InputMethodManager. I’ve tried keyPressed() onKeyDown() keyDown() keydown() but only keyPressed captures ENTER or BACKSPACE or SHIFT with android.view.keyEvent imported, but not ‘d’, ‘D’, “d”, " D", KeyEvent.KEYCODE_D. Any ideas?
Also, during a “successful build” of approx 2m 40s I always get 28 actionable Tasks with 28 executed, most of which refer to debug. Is this an indication of errors, or always to be expected?
I use the virtual keyboard to generate key strokes, and detect each one via keyPressed (or some other procedure) which is then translated to a string, and this is used to adjust the image centred on the screen.
This works OK in Processing for Windows exe, but it doesn’t detect the alphanumeric keystrokes in Processing for Android, only ENTER and BACKSPACE.
I have previously used EditText boxes in Eclipse for Android. Can I use them in Processing for Android? If so, then this may be an alternative solution.
I’ve almost completed my code, thanks to your reference to EditBox (and Menu).
I’m now stuck with a problem :- I need to rotate a 3D image with the mouse button. It works OK in Windows, but not on the android phone. I think the problem is the use of mouseDragged() and mouseMoved(). In Windows using a mouse, mouseDragged() is interpreted correctly to rotate the image. However in Android, because there is no separate mouse button to click or hold down, it is interpreted as a mouseMoved() event, and does not trigger the mouseDragged() event required.
I have tried
void mouseMoved() {
redraw(); // to call draw() each time
}
void mouseDragged() {
redraw(); // to call draw() each time
}