var androidPlatformChannelSpecifics =
new AndroidNotificationDetails(
"$id",
not.columnValue + not.deveui,
not.columnValue + not.deveui,
sound: "@raw/alarm",
importance: Importance.Max,
priority: Priority.High);
Run Code Online (Sandbox Code Playgroud)
其实还是用默认的系统声音。
如果我输入@raw/alarm.mp3,我会得到以下异常:Unhandled Exception: PlatformException(INVALID_SOUND, The resource %s could not be found. Please make sure it has been added as a raw resource to your Android head project., null)
注意:声音:RawResourceAndroidNotificationSound('alarm'),已解决