In my current Android project I have to use tts (to read messages) in lock task mode (single purpose app/kiosk app). Everything works well in 'normal' app mode but when i try use text-to-speech in lock task mode then no sound comes out.
I add com.google.android.tts
packake to setLockTaskPackages()
but it's still not work.
Do you have any other solutions or samples usage tts in lock task mode?
Solution moved from @skajar 's question post.
The solution is very easy, just don't forget to set property parameters in set User Restriction() In my case:
setUserRestriction(UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, false); setUserRestriction(UserManager.DISALLOW_ADJUST_VOLUME, false);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.