/images/avatar.webp

mrtn.me

Get the Height of the Status Bar in Android

Sometimes in Android, the flexible layout system is not flexible enough and you need to make some computations inside your code. In these computations, you may need to subtract the size of the status bar. Stackoverflow gives you some answers, but they all rely on the fact that te status bar is shown at the time you make your computation. If you are in full screen mode, by having called for instance:

Start a Virtualenv Django Shell From the Linux Desktop

If you are tired to fire a terminal window, cd to your project directory and activate your python virtualenv to get to your Django project, you will find here some tips to improve things a little bit. This tip is divided in two parts : First we create a shell startup script that activates the virtualenv, bash completion and cd in the project directory. Then we create a Linux Desktop Entry file That spawns a console in our environment.

Checking Google Play Signatures With Django

Google play, formerly known as the Android Market, provides in-app billing in several countries. In the Security and Design page, Google states the following: If practical, you should perform signature verification on a remote server and not on a device. Implementing the verification process on a server makes it difficult for attackers to break the verification process by reverse engineering your .apk file. If you do offload security processing to a remote server, be sure that the device-server handshake is secure.