We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everybody. I try to make app for android, but if I add fullScreen() or size() it crashed. With size(100,100), size(50,50), size(500,250) it works fine, but with size(500,500) or size(displayWidth, displayHeight)
void setup() {
fullScreen();
orientation(LANDSCAPE);
}
void draw() {
background(0);
rect(width/2,height/2,36,36);
}
Answers
Can you try this and see if it helps:
Kf
It's same...
@Kubak_cz===
what phone? what OS? which P5 version? can you run any of the examples?
Try without using size or fullscreen... it should default to phone/tablet screen resolution.
Try adding the same in public void settings() {} rather than public void setup() {}
Newest versoin of Processing, API 19 or 25 (both working same)
Huawey Honor 3C Android 4.2.2 or Tablet Lenovo A5500-F Android 4.4.2
on nexus 5X (android 7.1.1) it works fine.
java.lang.NullPointerException at processing.core.PGraphicsAndroid2D.backgroundImpl(Unknown Source) at processing.core.PGraphics.backgroundFromCalc(Unknown Source) at processing.core.PGraphics.background(Unknown Source) at processing.core.PGraphics.defaultSettings(Unknown Source) at processing.core.PGraphics.checkSettings(Unknown Source) at processing.core.PGraphicsAndroid2D.beginDraw(Unknown Source) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:838) FATAL EXCEPTION: Animation Thread java.lang.NullPointerException at processing.core.PGraphicsAndroid2D.backgroundImpl(Unknown Source) at processing.core.PGraphics.backgroundFromCalc(Unknown Source) at processing.core.PGraphics.background(Unknown Source) at processing.core.PGraphics.defaultSettings(Unknown Source) at processing.core.PGraphics.checkSettings(Unknown Source) at processing.core.PGraphicsAndroid2D.beginDraw(Unknown Source) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:838)
Hudson_m4000 : without fullscreen it's in small window in the midle of screen
limmor1: it's working same as in setup()
Processing 3.3, Android mode 3.0.2, Samsung galaxy S4 (Android vers 5.0.1) and either API 21 or 23... works (using code from first post)
Same for Samsung Galaxy Tab 4, android version 5.1.1.
Could it be due to the Android version? @codeanticode Any suggestions how to address this issue?
@Kubak_cz Can you try calling
fulScreen(P2D)
invoid settings()
?Kf
@Kubak_cz, @kfrajer===
seems the same problem
https://github.com/processing/processing-android/issues/253
try with P2D renderer
It's working. Thank you wery much...
I have the same problem, but still crashing even with P2D. Is the issue decribed (https://github.com/processing/processing-android/issues/253) solved? Thanks
What have you tried? Do you get any errors? What do they say? What code sample have you run?
Kf
Is calsign you? İ changed size (displayWidth, displayHeight) to size(displayWidth,displayHeight,OPENGL) .. then everythings works dine and faster