android - Custom vibration pattern in Codename One. -


i tried modifying vibration pattern build hint android.pushvibratepattern = 1000 , did not have luck. thank in advance!

i've used make custom vibration pattern when notification arrives:

notificationbuilder.setvibrate(new long[]{1000, 1000, 1000}); 

where notificationbuilder

notificationcompat.builder notificationbuilder = new notificationcompat.builder(this); 

you need give pattern in form of long[].

for work in codename 1 build hin needs match arguments long array as:

android.pushvibratepattern=1000, 1000, 1000 

which translate exact same code above. notice need thru gui if edit codenameone_settings.properties file directly need prefix hints codename1.arg..


Comments