Picture the scene - a young offender is caught throwing a brick though a window during a booze-fuelled street brawl.

As a thousand tiny shards of glass descend to the ground, he is struck by a moment of stone-cold lucidity. What have I done?

How much jail time am I looking at here? He reaches for his mobile, clicks on an app and finds the answer helpfully listed on iJail. Then he runs off.

IJail is the latest in a series of apps produced by lawyers for clients or the public.

Created by Luton criminal defence solicitor Attiq Malik, it outlines what constitutes a criminal offence, what would be considered aggravating factors and what prison sentence can be expected upon conviction.

As Malik explains: ‘As a criminal lawyer I am often asked two questions: "How do I get out of this?" and "What am I looking at?". The iJail app can answer both of these questions from a mobile phone.’ So now ignorance of the law really is no defence.