Comments (9)
Hello Allard,
move the sound.mp3 to res/raw. On Android images or sounds must be placed into the res-folder.
sound: "android.resource://" + package_name + "/raw/sound"
from cordova-plugin-local-notifications.
Thanks, that's useful information - it works OK now! I also noticed you updated the readme file accordingly - it is more clear now, Many thanks again.
from cordova-plugin-local-notifications.
I also had this same problem. When I specify the location of a mp3 sound, it's simply not fired. I've tried this, but it's not working:
window.plugin.notification.local.add({
id: 1,
title: 'Lembrete',
message: 'Sua coleta chegou',
repeat: 'minutely',
sound: 'android.resource://res/raw/ringtone',
date: _60_seconds_from_now
});
from cordova-plugin-local-notifications.
Hi Rodolphorosa,
you need to specify your package name instead of 'res',
see below how I got it working in my app:
window.plugin.notification.local.add({
id: '1',
title: 'EsSense',
message: 'E-skip / TEP NOW!!',
ongoing: true,
icon: 'red48',
sound: 'android.resource://net.gooddx.essense/raw/ess'
});
from cordova-plugin-local-notifications.
this is the package name of your application?
from cordova-plugin-local-notifications.
yes!
from cordova-plugin-local-notifications.
thanks, it worked!
from cordova-plugin-local-notifications.
hey guys, the same problem, sound not played in my real android device version 4.4.2
my code is:
cordova.plugins.notification.local.schedule({
id: 1,
text: 'Scheduled every minute',
every: 'minute',
sound: "android.resource://com.test.notificationapp/raw/sound",
icon: 'res://icon',
smallIcon: 'res://ic_popup_sync'
});
how to solve this problem? anyone help please, Thanks.
from cordova-plugin-local-notifications.
Don't hijack closed threads that are over three years. Raise a new issue with the template in #1188.
from cordova-plugin-local-notifications.
Related Issues (20)
- Getting a build error after migrating our Ionic 5 app from Cordova 10 to Cordova 11 LOCAL NOTIFICATIONS HOT 8
- Android Build for Android Platfom 10.1.2 or 11.0.0 Crashes the app. HOT 16
- iOS: Location Trigger Notification No Longer Working
- Local Notifications Trigger events Not working on Android 12 HOT 1
- Android 12 (SDK 31+): Tap on notifications only opens app when notifications are grouped. HOT 50
- bug: Gradle 7 compatibility HOT 6
- Local notifications does not subscribe to events when the notification is triggered in the background or when device is Locked on IOS Device 16.1.2 OS HOT 1
- Local Notifications Subscribe to events when app is in the background IOS: Help please
- Small Icon and Trigger Notification in Android 12
- Play custom audio files on Ionic Cordova Local Notifications IOS
- Android 12+ notification permissions not requested and showing as blocked HOT 10
- Apps Now Having Problems Adding Plugin HOT 1
- Plugin get installed, app get compiled and launched on android, but notification is just not working. HOT 1
- Notification group with actions at a particular time
- When I click notification app crashes HOT 2
- request permission is never fired at all on android 13 HOT 4
- NullPointerException from isInForeground
- NPM is still at beta 2 and beta 3 has been out since 2018
- "Your use of exact alarms is causing your app to crash for some Android users" on Google Play Console. HOT 7
- Cant get custom sound to work in both Android and ios
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-local-notifications.