We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How to vibrare my phone with vibration moter for mobilephones in android processing?
@ unnamed===
import android.app.Activity; import android.content.Context; import android.os.Vibrator; Activity act; public void setup(){ fullScreen(); background(255,0,0); textSize(24); act = this.getActivity(); } public void draw(){ background(255,0,0); text("je sais vibrer", 400,500); } public void mouseReleased(){ Vibrator vibrer = (Vibrator) act.getSystemService(Context.VIBRATOR_SERVICE); vibrer.vibrate(100); }
@akenaton It says "Unforunately, viberate_test has stopped" in Galaxy s4, Galaxy s7, Galaxy folder...
Does that code works in your phone?
@akenaton :) problem Solved!
I checked all the Sketch permissions and It works! I think the VIBRATE permission made it work. Thank you so much!
@akenaton
It worked 5 sec ago but it made error..
What's wrong?
@unnamed === put the whole code (with cut && copy, not screen shots)
@akenaton No I don't have to because I solved it. I just went back to previous version. Thank you.
Answers
@ unnamed===
@akenaton It says "Unforunately, viberate_test has stopped" in Galaxy s4, Galaxy s7, Galaxy folder...
Does that code works in your phone?
@akenaton :) problem Solved!
I checked all the Sketch permissions and It works! I think the VIBRATE permission made it work. Thank you so much!
@akenaton
It worked 5 sec ago but it made error..
What's wrong?
@unnamed === put the whole code (with cut && copy, not screen shots)
@akenaton No I don't have to because I solved it. I just went back to previous version. Thank you.