Phone Volume Control

4 posts, 0 answers
  1. Jenbagaraman
    Jenbagaraman avatar
    2 posts
    Member since:
    Sep 2014

    Posted 24 Sep 2014 Link to this post

    Hi all,

                How do i control the phone volume in the appbuilder for Android phone. Thanks in advance.
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 25 Sep 2014 Link to this post

    Hi Jenbagaraman,

    The Cordova Media API provides a method that sets the volume of the audio file your app is playing. However, looking at your description I am not sure if this is what you are looking for.

    If it isn't and you need to implement a logic that controls the device volume, then I'm afraid that in Cordova there is no straight-forward approach for the same. In Android the AudioManager class provides methods for getting and setting the volume which means that in order to implement such a functionality in a hybrid mobile app, you would need a plugin. I found this plugin which seems to take advantage of the AudioManager class API. However please have in mind that the plugin seems a bit outdated and it also cannot be imported in an AppBuilder app as it doesn't meet all requirements listed here. This means that you would have to create a custom plugin yourself or update that one to make it Plugman-compatible.

    Generally speaking, in AppBuilder you can import custom plugins as long as they meet the requirements I mentioned before. If they do, you can follow these steps to import and utilize the plugin in an AppBuilder project.

    Tina Stancheva

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

  3. Jenbagaraman
    Jenbagaraman avatar
    2 posts
    Member since:
    Sep 2014

    Posted 25 Sep 2014 in reply to Tina Stancheva Link to this post

    Hi Tina,

                  Thanks for your reply. I am trying to control the device volume. Anyway i will try to create the custom plugin. 
  4. Luis
    Luis avatar
    1 posts
    Member since:
    Apr 2017

    Posted 05 Apr 2017 Link to this post

    amigo tambien ando en busqueda de como controlar el volumen de la app, debido a que soy muy nuevo en esto quisiera pedir una pequeña ayuda con esto!!
    espero su prota respuesta, gracias!!
Back to Top