That pesky Download Pending state on Google Play Store

This ever happened to you where an app is being updated by Google Play Store but it just sits there and waits for that supposed update indefinitely? Perhaps you’ve stared at that screen for too long waiting for it to complete the download and start the installation process for several minutes, maybe hours? It certainly is not your Internet connection that is the issue, you’re sure on this and have checked it several times. What’s worse, this holds up other apps from getting there updates. The update queue can’t go on.

Well, this has happened to me already.

On some similar occasions a simple phone restart fixed the issue. On another, stopping the update on the app, allowed for other apps to get their updates. While there were also times that it was just my network connection that kept it from getting updated properly – such as when I forced it to update over mobile data, then I transfer to a location where carrier service is not so strong (in high rise buildings for example). I simply switch to WiFi when available and the update process continued smoothly afterwards.

Recently though, no amount of phone restarts, or switching networks fixed this issue when my phone ran into it again.

The one way that I corrected it is after I cleared the cache & data of the Google Play Store app. This was after I’ve restarted my phone for the nth time, and the app was still stuck at downloading the updates. Yes, I’ve also tried to kill or force stop Google Play Store. To no avail.

Depending on your phone, go to its Settings. Find the Apps or App Settings further down. Select Google Play Store. The options should be there, most likely under Storage.

Try this out if you’ve done all the other things but still have that app stuck on update. Don’t worry about losing anything. The Google Play Store app will recover, and almost everything you have specifically for this Android phone will have been saved on the cloud.

Identify Songs Playing Using Smartphone

What nice and safe apps are there that I can install on iPhone or Android to identify songs playing from another source? Preferable to have no ads, unlimited use and free of charge.

ANSWER

A few years back when I was in that apps discovery phase on my Android and installing as many as I can even when those apps would hardly ever be used after the first try, I came upon Shazam. Was impressed by it. It was able to ID the songs quite accurately. It sometimes took a while, a few longer seconds, sometimes but it normally was able to pick up and tell me the song title and artist. The sound quality it is listening to also is a factor for proper identification. It did have some success on getting the songs right in a public place, like a bar or a cafe, where music was playing loudly and a lot of other noise around.

There are many sound discovery or music recognition apps out there for both Android and iPhone. I have heard of SoundHound or Musixmatch.

I have not used such apps for a long time. Shazam was free when it came out. No ads then. I might have installed it again years after, and as I recall the UI changed this time with ads too. But I could be wrong. It might have been a different app. SoundHound, Musixmatch and Shazam come with free and paid versions. Whether these apps have limited use for free versions, you can find that out or DON’T.

Try out those 3 apps, OR you don’t really have to go to all the trouble. Google Assistant on Android can do the same magic. Just ask it, “Which song is this?”. Type it or say it. Better the latter. I have done it several times, for example while driving and listening to a local FM radio station.

Apple’s Siri can do the same.

Pattern name for “Platform independant class with Hooks + sub class implementing platform specific”?

I am developing an android app to process jpg exif meta data in a workflow.

The Workflow class is implemented platform independant (i.e. code runs on android and on j2se).

The Workflow contains and calls protected virtual methods that do nothing for android specific .functions (i.e save changes to android media database)

package de.k3b.media;

// platform independant
public class Workflow {
    public void processPhoto(...) {
        ...
        saveChangesToMediaDatabase(....);
        ...
    }
    
    protected void saveChangesToMediaDatabase(...) {    
        // to nothing in platform independant version
    }
}

I also have a android platform specific sub class that implements the platform specific code

package de.k3b.android.media;

// android platform dependant
public class AndroidWorkflow extends Workflow {
    @Override
    protected void saveChangesToMediaDatabase(...) {    
        ... do something with android media database
    }
}

I can use Workflow.processPhoto(...) in non-android j2se apps and in automated unit or integration tests
and i can use AndroidWorkflow.processPhoto(...) in my android app

My question: Is this an established pattern and is there a name for this pattern?
My current pattern name “Platform independant class with Hooks” and “Platform specific Hook implementation”.

I hope to find a better (??established??) name for this pattern.


Remarks:

One established pattern to have platformindependat code is by using a Facade pattern.

Example: I use a FileFacade with a j2se implementation based on java.io.File and AndroidFileFacade which is based on android specific DocumentFile.

Although the goal of platform independance is the same the way how this is achieved is different.

Go to Source
Author: k3b