Android Question Converting from Tasker

pi_kano

New Member
Hi, I'm new to Basic4Android, but I have experience of Visual Basic Programing. Some time ago I wrote an App in Tasker, which allows me to mute the phone (all sounds) for 30/60/90/120 minutes, by pressing the appropriate button, after which time the phone is unmuted.

I want to re-create this app, to teach myself Basic4Android, but I'm having a problem getting my head around the timing aspect of it and the muting. Any help would be welcome

Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can mute a single volume channel with Phone.SetMute. You can change the ringer mode with Phone.SetRingerMode.

You should use StartServiceAt to schedule a service to start in x minutes and unmute the phone. You can use DateUtil.AddPeriod to find the correct time:
http://www.b4x.com/android/forum/threads/26290/#content
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…