Does "devia" signify past? Should this be: "You should have told him the truth"?
it implies a piece of advice on something that no longer can happen. it is used the same way as in English. "você deveria/devia ter-lhe dito a verdade"
The English "correct solution" implies that there is still hope for it to happen, though. That is why I, too, am confused at why the tenses do not match up.
From what Paulenrique said, I believe "você devia" is like saying "Você é suposto". "You are supposed to tell him the truth".
I think "devia" is used to express what is/was expected of someone, and "deveria" is used to express what someone should do/have done. It is a subtle difference. Am I wrong?
Not wrong at all.
Você deveria is both to express what someone should have done as well as give advice.
Você devia is also to give advice, but somewhat more emphatic (You'd better), but not to express regrets. It can be used as "you're supposed to..." as in Portuguese in PTBR we do not use "você é suposto" to express this idea. =)
"Devia" is often an informal substitute for "deveria" (should).
• You should have told him the truth.
• Você devia ter falado/contado a verdade para ele.
"devia" is for advice, "have told" is in the past; so your sentence would be like "você devia ter contado a verdade para ele". And that sentence would imply that the time is gone, that you aren't able to tell him anymore. A little bit confusing.
Nop.... deve (from "dever") shows an obligation, like "must". Devia/deveria shows a suggestion, advice, like "should"
I still do not understand the sentence. If it would be "deveria", I would agree with the solution. I chose "You had to tell him the truth" Did i mix something up?
Devia works as advice or obligation, depending on the intonation. So, i think both should be accepted!!
What is the difference between using "devia" and "deveria"? Duolingo accepts both.
They both mean "should", sometimes "devia" seems more emphatic. You should have gone to the bank = você devia ter ido ao banco.
In my experience with other romance languages, it is not unusual that some speakers mix up the conditional mode and the past imperfect of the indicative. Those are usually solecisms indicative of a poor command of the language.
I have heard of it in Spanish, specially in the Basque country, where it is practically endemic (ex.: “Si lo habría  sabido, no hubiera  venido", instead of “Si lo hubiera sabido, no habría venido”, meaning that if I had known that I would not have come). The same goes for French (ex.: “Si j'aurais su, j'aurais pas venu." instead of “Si j'avais su, je ne serais pas venu." In fact, this one is used as a joke among educated people when one wants to play dumb.)
Maybe in Brazil this use is so extended that the Academy has sanctioned it, or it is simply a case of general tolerance with the rule. Could someone confirm which case is it?
The academy hasn't sanctioned it, but it is ubiquitous. Most linguists consider Portuguese to be a diglossic language with a complicated grammatical structure taught within the four walls of the classroom and a simplified grammar used by just about everybody.
If "devia" is the past tense, why isn't "you should have" a correct response?
I got the "should" part, but since it is a past tense thought it should have been (clever choice of words there, I thought) "You should have told him the truth." and that it was one of those instances where the infinitive is used instead of a conjugated verb.
I think the sentence, both in English and Portuguese is awkward.
The meaning is different:
Devia ter contado = should have told = IMO, you should have done this instead of what you did, but this is all in the past, so... meh.
Devia contar = should tell = I'm giving you a piece of advice, I think you should tell him the truth, that's what I think you should do - now what you're going to do (future), that's up to you
That being said, this sentence is not awkward at all. It's the most common way for us to give advice, at least in Brazil C:
"You should have" is just as much advise as "you should". To put a present tense advise in the past tense is confusing if expecting a present tense construction. Why not use present tense "deve contar"?