Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19449

iOS schedule local notification doesn't make the default sound or phone vibration

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Won't Fix
    • Affects Version/s: Release 3.5.1, Release 4.0.0, Release 4.1.0
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS 8.4

      Description

      Issue Description

      When the type Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND is defined and the sound property is not defined in the scheduleLocalNotification function, the device is not making the default sound and the device vibration on the alert.

      Expected behavior

      The device should make the sound alert and vibrate.

      Steps to Replicate:

      1. Create a new titanium classic project
      2. Grab the app.js file
      3. Replace the code with the testcase code
      4. Run the application on iOS device

      Test Case

      // Check if the device is running iOS 8 or later, before registering for local notifications
      if (Ti.Platform.name == "iPhone OS" && parseInt(Ti.Platform.version.split(".")[0]) >= 8) {
          Ti.App.iOS.registerUserNotificationSettings({
      	    types: [
                  Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT,
                  Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND,
                  Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE
              ]
          });
      }
       
       
       
      var notification = Ti.App.iOS.scheduleLocalNotification({
          alertAction: "update",
          alertBody: "New content available! Update now?",
          badge: 1,
          date: new Date(new Date().getTime() + 6000),
          //sound: "/ahem_x.wav",
      }); 
       
      var mainWindow = Ti.UI.createWindow();
       
      var mainView = Ti.UI.createView({backgroundColor:"white"});
       
      var desclabel = Ti.UI.createLabel({text:"Press the home or lock button and wait for the alert "});
       
      mainWindow.add(mainView);
      mainView.add(desclabel);
      mainWindow.open();
      
      

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              rramirez Ricardo Ramirez
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-20314
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration