I am developing an app using the TextToSpeech class. I'm getting this pop-up on Galaxy Note 4 (Android 5.0) when calling Android's TextToSpeech.speak(...) that asks if I want to download a better quality voice file:
High quality TTS Popup on Android 5, Galaxy S4
This didn't occur on the other development device, an ASUS tablet. How can I somehow prevent this popup from appearing when I use speech to text?
Searching around hasn't revealed much from a development perspective about this popup, or how to prevent it from appearing. I have checked here but it references recording audio and seems to reference a different issue: Android speech Recognition App Without Pop Up
On this particular device I could prevent it by simply accepting the download. That is evident from this, though I have not tried it: http://androidforums.com/threads/download-high-quality-voice-file.789236/ However, when installed on a new device, by the time the speech feature is enabled, the user may not have access to the device. It is a unique case, I suppose, violating normal guidelines for UI. Once the app starts, the user cannot be expected to interact with the app. It receives messages over the internet and speaks those, and this is when the popup appears.
I'm open to solutions that enable me to check and download the referenced high quality voice file myself (in order to prevent the popup, hopefully) and only start speaking once this is handled.
mTextSpeech.speak(s2, TextToSpeech.QUEUE_FLUSH, null);
EDIT:
Is there an INTENT sent somewhere in the loop that the Samsung package is responding to? My thinking is, I could check to see if the "offending" package causing the pop-up is in the PackageManager list, and then possibly go from there. Or if the package has been somehow registered with the system, maybe I could somehow un-register it? I admit I'm reaching here, but I'm sick of seeing this pop-up!
Related
I have written an App using the Mobile and Android SDK (based on the sample app).
However on when the app runs on a DJI Crystal Sky, it frequently happens that no Toast Messages get displayed.
Patterns:
- They work fine on other devices.
- If they work, they work continuously while the app runs.
- If they don't work, they won't show up at all.
- The best way to get them to show is to reinstall the app.
- Changing notification settings on the Crystal Sky had no effect for me.
Has anyone else come across this issue and found a way to solve it?
It seems like DJI use Toast messages in DJI Go and Go4 where they show reliably. I.e.: there must be a way to get them to work.
P.S: I already looked into Snackbar and other libraries, but they are by far not as versatile which is why I would like to stick to Toast if possible.
EDIT 29/04/2019
I have just noticed that the same behaviour is observed in other Apps (ES file explorer).
Probably not fixable in code and a bug in the Crystal Sky's software.
EDIT 02/07/2019
As it was pointed out by Milanka in the comments,
the Crystal Sky automatically disables Notifications for apps which hides Toast messages.
On my units it happens after each reboot.
First off, this has never happened before on any other android device I've used (multiple devices have been tried and tested before this).
Now I have an app that I have worked on for a little over a year now, it is called AutomatedId (on the app store) and it has worked quite well for my company for quite some time.
Recently I have been given a device to add compatibility to the app (specifically for reading UHF tags) but that isn't the problem.
The problem comes whenever you open the app, the screen stops reading inputs completely, as well as buttons cease to function. I turned on developer options to see the screen inputs and as i suspected, it completely stops and does not read any of the inputs after the app is opened. Clicks don't work, buttons don't work, keyboard doesn't open, hardware buttons on the device stop working. It's a mess, does anyone know what could have caused this?
This is a S98 from here: http://www.wepoy.com/product_view_18.html
moved my comment to the answer as you said. This may be due to memory leak. Here are some references that may help you fix them: Fixing-Memory-Leaks-in-Android-Studio & use this library from square to detect memory leaks early: leakcanary
I am planning to build an app which needs a screenshot. My requirement is to launch the app when the designated key presses are executed. (i.e. like volume up+lock key for taking screen shot in windows phone). My app will then launch automatically for further processing of that image. Is it possible to build or is there any work around for that?
Thanks in advance.
There is no way to build such app for Windows Phone.
Even if an app is running it can't get access to hardware keys except BackKey.
App can't run in the backgroud. After user leaves app it goes suspend and only couple of BackgroundTask can be launched to run in background at that moment.
EDIT
To be clear your app on Windows Phone 8.1 can be done but it'll work like following:
User takes screenshot, goes to gallery and choosing to share it.
Your app must declare that it can receive image (https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh871367.aspx)
User see your app in share list, choose it and than your app gets screenshot and may start to work with it.
Adding on what #khamitimur has posted. You will be able to only list down the third party apps installed within your Windows Phone device programmatically but not to launch them using any hardware parts of the device.
P.s : The developers have not yet been given any access or API to hardware parts in order to trigger events from those.
I was playing around with my tablet and testing my program, when there was a notification that said bug report captured and whether I would like to share it. I had not seen this message before so I clicked Yes, and then I clicked OK on the warning dialog box that asked me to share it only with people I trust. After that the gmail app opened up which had a screenshot of my tablet, as well as a file attached to it called bugreport<some numbers, date and time I think>.txt. I did not send the bug report as I was not sure what it was and where it would go. However my question is,
what exactly is this bug report?
Is it generated by the code that I was testing? Or is it generated by the android system itself?
Did I trigger something unknowingly when I pressed the hardware buttons (the tablet only has 3 hardware buttons, volume up/down and power)?
I have been trying but I cannot make that message appear again, and when I search for bug*.txt using my file viewer app, I cannot find the file. Where is that .txt fil that got attached to the bug report get saved on my tablet?
It's because you have turned on USB debugging in Developer Options. You can create a bug report by holding the power + both volume up and down.
Edit:
This is what the forums say:
By pressing Volume up + Volume down + power button, you will feel a
vibration after a second or so, that's when the bug reporting
initiated.
To disable:
/system/bin/bugmailer.sh must be deleted/renamed.
There should be a folder on your SD card called "bug reports".
Have a look at this thread: http://forum.xda-developers.com/showthread.php?t=2252948
And this one: http://forum.xda-developers.com/showthread.php?t=1405639
This post is related to the existing filed bug:
https://groups.google.com/forum/#!topic/android-developers/K7pjy3Gm5Lk/discussion
Apparently, in some devices after a system update, the toasts are not shown. The problem happens when in preferences, for your application the notifications checkbox is unchecked. Due to that your all the toasts of your app will be hidden.
This happened to me on a Samsung galaxy tab 2 but it can happen on other devices:
Toast Notifications Not Showing Up on Nexus 7 Tablet
or on SGS3 as commented on the google group link.
I don't know if this happens on all devices with jelly bean or not.
The suggested "fixes" are fine for me but what if my app is downloaded by some people who don't know how to do that or don't want to activate notifications. I rely on toasts a lot in the app to inform the user about some feedback so I only see one solution to this:
->IMPLEMENT MY OWN TOAST CLASS, different from toast but with similar behaviour.
I have searched around I haven't found anything out there already done so I am asking if anyone has found any custom implementations (before I start coding it myself)?
The objective is: show a toast or some replacement for it even if notifications are turned off for this app.
I don't know if this happens on all devices with jelly bean or not.
AFAIK, it does.
I rely on toasts a lot in the app to inform the user about some feedback
That is not a good idea. Toasts are very short-lived, and users can easily miss them. Toasts are fine for light advisory/confirmation messages -- and for book examples :-) -- but that's about it.
The objective is: show a toast or some replacement for it even if notifications are turned off for this app.
Hopefully, your real objective is to have a quality user experience. Relying on Toasts being seen will not result in a quality user experience.
Toasts have fallen out of favor for other reasons as well, such as the fact that they are independent of the underlying activity, and so a displayed Toast may not be relevant if the user has already navigated elsewhere in the app. The leading replacement implementation is called a "crouton", based upon a term used by Cyril Mottier in a blog post, with a couple of open source implementations, such as this one.