You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by SamZSL <gi...@git.apache.org> on 2017/10/23 09:03:44 UTC

[GitHub] cordova-plugin-dialogs pull request #97: The problem of continuous call of b...

GitHub user SamZSL opened a pull request:

    https://github.com/apache/cordova-plugin-dialogs/pull/97

    The problem of continuous call of beep()

    when I called beep(1) continuously 14 times, the notification sound of phone wont ring out again;i hope you can fix the problem;
     these are my code
    ```
     private static final String LOG_TAG = "Notification";
        
        public int confirmResult = -1;
        public ProgressDialog spinnerDialog = null;
        public ProgressDialog progressDialog = null;
       //add
        private Ringtone BeepNotification = null;
    ```
    beep()
    ```
      if(BeepNotification == null){
          BeepNotification = RingtoneManager.getRingtone(cordova.getActivity().getBaseContext(),ringtone);
      }
      // If phone is not set to silent mode
      if (BeepNotification != null) {
          for (long i = 0; i < count; ++i) {
               BeepNotification.play();
                long timeout = 5000;
                while (BeepNotification.isPlaying() && (timeout > 0)) {
                  timeout = timeout - 100;
                  try {
                         Thread.sleep(100);
                   } catch (InterruptedException e) {
                          Thread.currentThread().interrupt();
                    }
                }
           }
     }
    ```
    When I call the function every time,it should be  initialized instead of “new object”.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/cordova-plugin-dialogs 1.3.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-dialogs/pull/97.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #97
    
----
commit 310d694b227f4fffb9640ac6d1f420a7494abba7
Author: Shazron Abdullah <sh...@apache.org>
Date:   2016-12-11T20:46:06Z

    CB-12236 - Fixed RELEASENOTES for cordova-plugin-dialogs

commit d10dc2c70ccf9c0362f10ee9b2d7240ac79f520d
Author: Shazron Abdullah <sh...@apache.org>
Date:   2016-12-08T00:55:07Z

    CB-12224 Incremented plugin version.

commit f89f7613aa88f1a4f805237ed5b419a68b3b7a71
Author: Alexander Sorokin <al...@akvelon.com>
Date:   2016-12-09T10:14:30Z

    CB-12230 Removed Windows 8.1 build badges

commit 35e0c2ed76efea8619b391653d9862ef112fb025
Author: Alexander Sorokin <al...@akvelon.com>
Date:   2017-01-18T10:29:39Z

    CB-12363 Added build badges for iOS 9.3 and 10.0

commit 83b535c6cf9b54342988459f47c3605bc58deed4
Author: daserge <v-...@microsoft.com>
Date:   2017-01-18T16:24:17Z

    CB-12353 Corrected merges usage in plugin.xml

commit b7a56c6526dacf7361c7c168cccada86b367aa42
Author: Nikita Matrosov <v-...@microsoft.com>
Date:   2017-01-19T13:06:51Z

    CB-12369: Add plugin typings from DefinitelyTyped
    
     This closes #91

commit a1ac2296d711416037d8aade9fa0d2117a15c321
Author: Steve Gill <st...@gmail.com>
Date:   2017-03-01T01:41:26Z

    CB-12519 Updated version and RELEASENOTES.md for release 1.3.2

commit f2809ca8b40fec4f4d608c259cf2dd6401939a05
Author: filmaj <ma...@gmail.com>
Date:   2017-04-27T19:37:42Z

    Merge branch 'master' into 1.3.x

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org