system volume control

1,509 views
Skip to first unread message
Assigned to halatmi...@gmail.com by me

Richard Nero

unread,
Jan 27, 2015, 11:21:14 PM1/27/15
to mitappinv...@googlegroups.com
Can I add slider in my app to control system volume or open system volume button.

Taifun

unread,
Jan 28, 2015, 8:27:26 AM1/28/15
to mitappinv...@googlegroups.com
no you can't, in App Inventor you can control only the Player.Volume

Volume
Sets the volume to a number between 0 and 100

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.                

piano guy

unread,
Jan 28, 2015, 10:06:48 PM1/28/15
to mitappinv...@googlegroups.com
From personal experience, I think that it is not safe to have a slider for volume, because a slider is so small, and a user can accidently slide from very low to very high. If they were wearing headphones, this can lead to hearing damage.

I think it is better to have separate buttons to increase and decrease the volume, and set a maximum increase of 5 units(ie. from level 20 to 25, then 25 to 30) per button click. 


Jasbir Singh

unread,
Jan 29, 2015, 8:08:33 AM1/29/15
to mitappinv...@googlegroups.com
Just to add here, I have applied the volume control slider on my audio player, the behavior of slider is unpredictable. At start the volume starts with the defined level (at slider) then automatically it jumps to higher volume and then it comes to normal. In fact i have observed that in case we are listening to audio player and if there any call lands in between, the player pause and the time call is over, the audio is resumed. But the problem is the volume increases to maximum and then it comes to normal. I have Sony Xperia Z1 and seen the same behavior in other phones as well. Now i have decided to remove volume control from the app. 

Taifun

unread,
Jan 29, 2015, 9:24:38 AM1/29/15
to mitappinv...@googlegroups.com
@Jasbir: could you please prepare a small test project as small as possible, which demonstrates this issue and add the aia file into this thread, so MIT can take a look at this issue
Thank you.
Taifun

Jasbir Singh

unread,
Jan 29, 2015, 10:18:36 AM1/29/15
to mitappinv...@googlegroups.com
Hi Taifun

Taifun

unread,
Jan 29, 2015, 12:09:13 PM1/29/15
to
only you can access this link, therefore please add the aia file (a small test project as small as possible into this thread and add a description what needs to be done to demonstrate these issues
Taifun

1. the volume starts with the defined level (at slider) then automatically it jumps to higher volume and then it comes to normal. 
and
2. in case we are listening to audio player and if there any call lands in between, the player pause and the time call is over, the audio is resumed. But the problem is the volume increases to maximum and then it comes to normal. 

Jasbir Singh

unread,
Jan 30, 2015, 12:03:47 AM1/30/15
to mitappinv...@googlegroups.com
Hi Taifun

The file is attached. Following are the issues:

1. the volume starts with the defined level (at slider) then automatically it jumps to higher volume and then it comes to normal. 
and

2. in case we are listening to audio player and if there any call lands in between, the player pause and the time call is over, the audio is resumed. But the problem is the volume increases to maximum and then it comes to normal. 

3. It takes 20-25 seconds to start the audio. In case it is paused, it takes same amount of time. My stream is also configured on other android apps (such as Punjabi Radio) at Google Play, however these apps plays my stream instantly.

Best Regards
Jasbir Singh
AudioVolumeSlider.aia

Taifun

unread,
Jan 30, 2015, 9:05:36 AM1/30/15
to mitappinv...@googlegroups.com
I tested your example with my Nexus 5 running Android 5.0.1 together with the companion app and can't confirm your issues
1. volume starts fine (level 10) 
2. after call is over, music continues to play using the current volume level
3. it takes around 5 seconds to start the audio (this is dependent on your internet connection speed)

it seems to be, this is a device specific issue?
which device do you use for your tests? which Android version? did you try other devices?

Taifun

Jasbir Singh

unread,
Jan 31, 2015, 12:06:49 AM1/31/15
to mitappinv...@googlegroups.com
the device i tested is (a) Sony Xperia Z1, (b) Samsung Galaxy S3, (c) Motorola G2
Android version tested 4.4.4 and 4.5
 

Hal Abelson

unread,
Jan 31, 2015, 9:31:18 AM1/31/15
to mitappinv...@googlegroups.com
Jasbir,

Are you in a position to update your Android version and see if this still happens on system version 5?




Jasbir Singh

unread,
Jan 31, 2015, 9:36:14 AM1/31/15
to mitappinv...@googlegroups.com
Hi Hal, the update version in Sony is not yet rolled out. I think I should wait for the new version. 

Hal Abelson

unread,
Jan 31, 2015, 10:06:25 AM1/31/15
to mitappinv...@googlegroups.com
Thanks.   Let me defer this until you can try the new version, and then we can look.

Khalid

unread,
Feb 2, 2015, 2:19:42 PM2/2/15
to mitappinv...@googlegroups.com
Going back to the original question:  why can't we control system volume from within AI2 apps?  I would like to be able to set the ringer volume to Silent mode from within my app.  Is this, and other similar system-level functions, planned in a future release?

I am aware of the Activity Starter workaround, but I prefer to not leave the app when changing the volume.  Any workarounds for doing this?  

Thanks in advance!

-Khalid

Enis

unread,
Feb 4, 2015, 1:01:49 PM2/4/15
to mitappinv...@googlegroups.com
No workarounds... You can add your wish to the list:  App Inventor Issues List
____________________________________________________________________

http://twodogapps.com?page_id=686

For my App Inventor Tips, visit TwoDogApps.com by clicking here!


Khalid

unread,
Feb 4, 2015, 2:16:10 PM2/4/15
to mitappinv...@googlegroups.com
Thank you Enis.  I just added my vote for this feature.. and request others to do so as well HERE
Reply all
Reply to author
Forward
0 new messages