Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
This repository was archived by the owner on Feb 7, 2019. It is now read-only.

Notification uses default sound instead of custom on Android 8 Oreo #204

Open

Description

@ickata

Which platform(s) does your issue occur on?

  • Android 8 Oreo

Please, provide the following version numbers that your issue occurs with:

  • CLI: 3.4.3
  • Cross-platform modules: 3.4.1
  • Runtime(s): 3.4.2
  • Plugin(s):
    "nativescript-drop-down": "3.1.1",
    "nativescript-geolocation": "4.2.0",
    "nativescript-google-maps-sdk": "2.4.2",
    "nativescript-ios-uuid": "1.0.0",
    "nativescript-iqkeyboardmanager": "1.0.1",
    "nativescript-local-notifications": "1.2.2",
    "nativescript-phone": "1.3.0",
    "nativescript-push-notifications": "1.1.2",
    "nativescript-theme-core": "1.0.4",

Please, tell us how to recreate the issue in as much detail as possible.

Include a wav file in App_Resources folder:

nativescript-demo-app/app/App_Resources/Android/raw/notify.wav

Build the app and deploy to Android 8 Oreo device.

Send push notification to device with the following payload:

   {
      to    : 'token',
      data  : {
         message     : 'message',
      },
      notification : {
         title       : 'title',
         body        : 'message',
         icon        : 'icon_notify',  // defined in App_Resources
         sound       : 'notify',       // defined in App_Resources
      },
   }

On older versions the custom sound is played, on Oreo default sound is used instead.

Activity

  1. NickIliev commented on Mar 30, 2018

    @NickIliev

    @ickata I think this is closely related to this PR is . You can test this case after the PR is merged into master.

  2. ickata commented on Mar 30, 2018

    @ickata
    Author

    OK, will do, despite the fact that the PR states that it fixes issue with the icon, not the sound...

  3. NickIliev commented on Mar 30, 2018

    @NickIliev

    @ickata the issue was related to the used version of the G9oogle Services library and the fix updates that dependency.

  4. ickata commented on Apr 9, 2018

    @ickata
    Author

    Hi, I updated the plugin to latest version (1.1.3). I'm still reproducing the issue.

  5. thematan commented on Apr 26, 2018

    @thematan

    In order to play custom sound in Oreo, one should create a push "Category" (also called channel). the OS made significant changes

  6. ickata commented on Apr 26, 2018

    @ickata
    Author

    @thematan : can you please give some details (example perhaps)?

  7. AndrewBNZ commented on Jun 6, 2018

    @AndrewBNZ

    Well this is a nuisance, I've spent ages trying to figure this one out. Does anyone have any examples of how to create a notification channel on Oreo through NativeScript (JS)?

  8. vforv commented on Aug 17, 2018

    @vforv

    Anyone found solution for this? For me it even not working on older versions...

  9. tbozhikov commented on Aug 24, 2018

    @tbozhikov
    Contributor

    Hi @vforv, have you tried to implement your push notifications using the nativescript-plugin-firebase? It is more up-to-date with some features and could help you implement what you need. Also, we are in the process of moving features from push-plugin to nativescript-plugin-firebase, so this might be your best strategy long-term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions