• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Gboard's Voice-to-text bizarre inaccuracy

Do the kids even know about Prince?

If predictions are not personalised then of course they will be dominated by some average of the users of the system. I don't know whether this is the case as I don't use VtT.
I've also found that phonetically saying the word gets better results. For example not far from me there is a town everyone pronounces "bell-fountain" but to get the spelling correct I have to say "bell-fontaine" which is how it's spelled but not how it is pronounced.
Well to be fair it's not that likely that they'll know a local, non-phonetic pronounciation of a small town (I'm finding it puzzling that it's "Bell Fontaine" rather than "Belle Fontaine" too - the latter makes more sense and is linguistically consistent).

Anyway, be thankful you are from the same continent as the people who programmed the system: the problems become a lot worse if you aren't. ;) Though as I've had to say "AD" to get a guy in California to understand the word "eighty" I don't find it surprising that computers have trouble with accents.

Apps [Networking]Run callback on main thread

I'm developing an app where I need to have a login screen, so users can login.
At the moment I have the login completely working.
The way I'm doing it is as follows
  • The user presses the login button
  • A second thread (Networking thread) is connecting to a webpage with username and password as the post variables
  • The page then checks if the username and password match with a row in my accounts table
  • The page then outputs a 0 (if successful) a 1 (if not successful)
  • The networking thread reads the result and calls a callback with the result
  • The callback then is called on the ui thread of the app and displays a toast if the login wasn't successful or continues to the next activity
Now comes the part where I'm a bit more unsure about, which is the code. To me it feels like overkill to do it this way (especially the part where I put the calling activity as a variable for the callback to execute the callback on the ui thread).

Login method in the login activity
Java:
private void login() {
    Login login = new Login(this);
    login.makeRequest(new Callback<String>() {
        @Override
        public void onComplete(Result<String> result) {
            if (result instanceof Result.Success) {
                Intent dsp = new Intent(LoginActivity.this, MainActivity.class);
                startActivity(dsp);
            } else {
                Result.Error<String> error = (Result.Error<String>) result;
                Toast.makeText(getApplicationContext(), error.message, Toast.LENGTH_SHORT).show();
            }
        }
    }, usernameEt.getText().toString(), passwordEt.getText().toString());
}

makeRequest method in the Login class
Java:
public void makeRequest(final Callback<String> callback, final String username, final String password) {
    new Thread(new Runnable() {
        @Override
        public void run() {
            final Result<String> result = makeSynchronousRequest(username, password);
            callback.execute(result, callingActivity);
        }
    }).start();
}

Callback class
Java:
public abstract class Callback<T> {

    public abstract void onComplete(Result<T> result);

    public void execute(final Result<T> result, AppCompatActivity callingActivity) {
        callingActivity.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                onComplete(result);
            }
        });
    }
}

How to clean Android ....

You describe two differen things.

1) Folders left behind in the user-accessible part of the storage after you uninstall an app. That does happen, and the best answer is to know which of your apps create such folders and delete them manually. But you can use an app like SD Maid, mentioned above, to try to identify orphaned folders like this.

2) App data being back when you restore an app. Are you certain you don't have Google's option to automatically back up such data turned on? Because if you have its' that, rather than the data remaining in your device's storage, that is behind this.

Personally I'm old school: I always use the system Settings to uninstall apps, never the Play Store, and I always clear the app's data manually before uninstalling. That way there is no possibility of anything being left. But as said above, these "private" data are different from the contents of any folders the app may create in the internal storage or on the SD card.

Auto-Enable Loudspeaker On Incoming Calls

Hello Android forums people.

To make it quick, I have been trying to make an app when any device like phone is connected with Bluetooth . then i received the incoming call from anyone then loudspeaker is disabled .but when i am not connected any device from any Bluetooth or other device like that "earphone" then i received incoming call from anyone then loudspeaker is automatically enabled.
I have seen so many posts with different suggestions, but nothing really pinpointing in the right direction.

So.... any ideas on how I can overcome this?

Notification Sound Repeatedly goes off samsung galaxy s8

Had the first day of peace in quite a while. I still don't know for sure if it was the unformatted sd card message that was the source of the notification or if the problem was the repeat notification setting dannydet identified. I believe it was the repeat notification as I don't have an sc card per "my files" (although it is possible the system thought there was a card and thought it wan't formatted. In any event I just wanted to again say thankyou . If anyone has a similar problem in the future I recommend looking at the repeat notification setting. Good job guys, THANKYOU!!

Filter

Back
Top Bottom