Git Product home page Git Product logo

Comments (12)

haifahrul avatar haifahrul commented on May 20, 2024 1

@emekalites it's not working in Android 7.1.1 also Android above 7.1.1
I'm tested with step :

  1. Set Schedule
  2. Close or Kill the App
  3. When notif is fired, I dismiss the notif, but the sound still not stop

from react-native-alarm-notification.

akinmac002 avatar akinmac002 commented on May 20, 2024 1

The problem still persists. It no longer works in the solution I suggested previously. @emekalites

@emekalites it's not working in Android 7.1.1 also Android above 7.1.1
I'm tested with step :

  1. Set Schedule
  2. Close or Kill the App
  3. When notif is fired, I dismiss the notif, but the sound still not stop

I'm having this problem.

Android 7.1 - Sony Experia Z5 Compact

from react-native-alarm-notification.

emekalites avatar emekalites commented on May 20, 2024

will work on that, thanks

from react-native-alarm-notification.

emekalites avatar emekalites commented on May 20, 2024

done in v1.1.0

from react-native-alarm-notification.

bsdunx avatar bsdunx commented on May 20, 2024

This does not seem to be working for me on 7.1 or 8.0, perhaps not on any version.

Calling ReactNativeAN.stopAlarm() and then ReactNativeAN.deleteAlarm(...) in the appropriate event handler seems to work correctly.

from react-native-alarm-notification.

haifahrul avatar haifahrul commented on May 20, 2024

@bsdunx Did you have tested on 7.1 or 8.0 ?

from react-native-alarm-notification.

bsdunx avatar bsdunx commented on May 20, 2024

7.1 via emulator and 8.1 on actual device.

from react-native-alarm-notification.

akinmac002 avatar akinmac002 commented on May 20, 2024

This problem is solved. But that's not the right way. Edit on /node_modules/react-native-alarm-notification/android/src/main/java/com/emekalites/react/alarm/notification/ANHelper.java add comment mark, line to:

/*   -----> this.
//sound
 if (!bundle.containsKey("play_sound") && bundle.getBoolean("play_sound")) {
                Uri soundUri = getAlarmUri();
                String soundName = bundle.getString("sound_name");
                if (soundName != null) {
                    if (!"default".equalsIgnoreCase(soundName)) {
                        int resId;
                        if (mContext.getResources().getIdentifier(soundName, "raw", mContext.getPackageName()) != 0) {
                            resId = mContext.getResources().getIdentifier(soundName, "raw", mContext.getPackageName());
                        } else {
                            soundName = soundName.substring(0, soundName.lastIndexOf('.'));
                            resId = mContext.getResources().getIdentifier(soundName, "raw", mContext.getPackageName());
                        }

                        soundUri = Uri.parse("android.resource://" + mContext.getPackageName() + "/" + resId);
                    }
                }
                try {
                    ringtone = RingtoneManager.getRingtone(mContext, soundUri);
                    ringtone.play();
                } catch (Exception e){
                    Log.e(TAG, "failed to play ringtone", e);
                }
}
*/   ----> and this.

from react-native-alarm-notification.

stale avatar stale commented on May 20, 2024

Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.

from react-native-alarm-notification.

ASIF-Mahmud1 avatar ASIF-Mahmud1 commented on May 20, 2024

I am also facing the same issue

from react-native-alarm-notification.

sadia-onyxtec avatar sadia-onyxtec commented on May 20, 2024

Any solution?

from react-native-alarm-notification.

josedomingos919 avatar josedomingos919 commented on May 20, 2024

Hello, @emekalites i have the same problem..

from react-native-alarm-notification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.