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

Pascal case not accepted for binding data variable name in kotlin in android studio

here’s my data

<data>
      <variable
          name="Name"
          type="com.example.practice.MyName" />
</data>

here’s the MainActivity

class MainActivity : AppCompatActivity() {
    
    lateinit var binding: ActivityMainBinding
    private val name:MyName = MyName("hello")
    
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this,R.layout.activity_main)
        binding.Name = name
        binding.button.setOnClickListener { change(it) }
   }

I get error "Unresolved reference: Name"at binding.Name = name

It works perfectly fine when I set name to any name of Camel case i.e.,starting with small letter, but it doesn’t work for the name starting with capital letters.
Why ?

Go to Source
Author: preIdiot