android - Cannot resolve symbol USAGE_NOTIFICATION_RINGTONE -


i able make android device vibrate using v.vibrate(pattern, -1); however, android page describes link insert audioattribute. however, following line gives me error.

    cannot resolve symbol usage_notification_ringtone:      v.vibrate(pattern, -1, usage_notification_ringtone);  

what should do?

the constant usage_notification_ringtone property of audioattribute means have reference properly:

v.vibrate(pattern, -1, new audioattributes.builder()          .setusage(audioattributes.usage_notification_ringtone).build()); 

and don't forget include android.media.audioattributes.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -