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
Post a Comment