You get it from a women on 1FL of the Pokemon Centre in Eterna City.
Chat with our AI personalities
You can get one in Solaceon Ruins with the dowsing machine app on the poketech.
get the Poke tech App Poke happyness
There is no such app, there is only an app which can show you where roaming Pokemon, such as Mesprit and Cresellia are, called the Marking Map (which can be obtained from the president of the Poketch company after obtaining the Veilstone badge).
In Pokemon Diamond the Friendship Checker (also called the Happiness Checker) app is #6.
it shows roaming Pokemon