Cogitas Blog:
Google Android, machine learning,
natural language processing
and Java programming.


For Devs Info
Tips and code for app, website and server developers.

What’s your password strategy?

Filed under: google android, web — March 10, 2013

Not a week goes by without a high profile online service getting cracked (most recently, Evernote). Yet, thanks to smartphones and faster connections, cloud services are so compelling that many of us have come to rely on them. So what’s your password strategy?

Firstly, yes, we know, we should never use the same password twice. Many people do it but it’s bad… The problem is, how do you remember all your passwords?

A plethora of services have appeared, to help you store your passwords on a cloud server somewhere. Services such as 1Password store securely all your passwords on their servers and you access them with the 1 password. Mmm, what if they get cracked? Is a server really secure?

Then, you have the option of offline storage in a little black book. It’s fine if you are mostly desk based and have a secure storage area (like a safe).

Most people use a strategy in between. For example, they will use variations on a memorable word, so their passwords between services are technically different but not very dissimilar (for example, it may be “MonkeyT” on Twitter and “MonkeyF” on Facebook).

Another method, used by many self proclaimed geeks, is to mentally apply an algorithm to words. For example, you may replace “o” with “8″, capitalise every third letter and so on. For “converting” your password across different services, you may, for example, add the 3rd, 6th and 7th letter of the service, in the 2nd, 8th and 6th position of your basic memorable word. How complex it gets depends on how logical you are, mostly, but I know some individuals who have developed this to a fairly high level of sophistication.

Inspired by the method above, I designed an Android app called SafePass. The app lets you enter 3 words (or short phrases)  and generates a safe password for you. By safe password, I mean something that looks random, with small and big caps and digits. The way it works is simple: the 2nd word is used as a key to encrypt 1st word (AES Encryption), and then 3rd word is used as a key to encrypt the result of 1st encryption. The app has no internet permission so you know your generate password doesn’t get sent off somewhere to a server.

OK, you may say, but I still need to remember loads of words? As the app uses 3 words, you have a variety of options: you can use always the same first 2 words and change the third word to be based on the service you are creating the password for.  If you want to be a little bit clever, you can also change the order in which you enter the words (as this will change the generated password). Other options include remembering sentences, not words – this works particularly well if you remember a funny sentence. Your Facebook memorable words could be ‘My boss’ ‘is on’ ‘Facebook’ (this will serves as a handy reminder to yourself to think twice before posting compromising pictures of you!).

The app costs only £0.99 (= US$1.48) and there is a free 14 days SafePass demo available. It requires no permission of any kind, and it works on Android 4+ whatever the screen size.

There are other apps out there, I encourage you to try them all and assess them in terms of security, both in terms of “Should I trust the app publisher” and “Does it rely on a system whose safety could be breached by hackers?”.

Lastly, protect your loved ones, particularly those who are less aware of online dangers. If you have an elderly parent using a variety of online delivery services for example, do advise them on how to choose a password and tricks to remember it.

HTC android.process.core has stopped, 2013 bug

Filed under: google android — January 4, 2013

HTC users have been plagued with a bug since 1st January, if their device is updated to the new version of HTC (with Android 4.1.1).

The bug is that the android.process.core procress constantly crashes.

The bug happens for users with sync’ed contacts, ie pretty much all users, and it was reported a few minutes after midnight on new year’s eve. The cause of the bug seems to be some issues with date formatting: users have reported stack traces that include the date “20130229″, which of course doesn’t exist as 2013 isn’t a leap year.

HTC has offered a fix at http://www.htc.com/www/support/content.aspx?id=191316.

A temporary solution which has worked for me is detailed below. I’m going for this temporary solution at the moment because I want to wait for HTC to deliver the updated Contacts Storage app to my device, mostly to see how long it will take them to do so.

1) Settings -> date and time -> unselect “automatic date & time”
2) on same screen, set the date to a day in dec 2012.
3) go back to home screen
4) wait 5 minutes
5) Settings -> date and time -> select “automatic date & time” so device date goes back to today

Pick of the week links for Google Android users

Filed under: google android — December 21, 2012

Magazines in Google Play store in the UK – yes, magazines are now available in the Google Play store. Choose wisely as some subs are more expensive then their counterparts if you go to the magazine’s website (example: .Net magazine)

BBC to up its game for Android’s users – BBC’s head of iPlayer, Daniel Danker, answers questions about the state of BBC’s iPlayer app for Android and what he has in store for the future.

Apple v Samsung: Judge rejects Apple plea for sales ban – the interesting bit about this article isn’t so much the main topic but is that Apple agreed licensing terms with HTC last month to end their patent war. Tech companies focusing again on improving user experience rather than fighting in Court can only be a good thing for users.

SMS spam coming to Android – in a nutshell, if you receive a SMS telling you that you can get a popular game for free instead of paying for it, don’t believe it. And of course, what is valid for email spam (nude photos emails and so on) is valid for SMS spam. Stay safe.

Speak to unlock smartphone – Lenovo has announced a new Android smartphone with new “speak to unlock” technology.

Using Android Library projects

Filed under: google android — December 19, 2012

Android library projects are very useful in a number of situations. For example, you are a company providing a SDK that includes UI elements, such as Facebook (Facebook SDK), or you create a UI widget that developers can drop in into their projects, such as a TimePicker that looks like a wheel (Android wheel).

As a developer, you may also want to use Android library projects to easily create several spin offs of the same app. The obvious example is when you create free and paid apps.

(more…)

Which minimum version of Android to support?

Filed under: google android — December 15, 2012

I hate to say it but Android has a weakness. Up until last year, manufacturers were very slow at providing updates Over The Air and Google didn’t push on this. Apple got it right from the start but Google messed up with this…

This situation changed about 12 months ago, where a noticeable shift was observed but with most people locked into 2 years contract, there are still 50% of devices out there using Gingerbread, released 2 years ago (for latest stats, see http://developer.android.com/about/dashboards/index.html )

(more…)

101 Google Android programming tips ebook

Filed under: Google Android Development Tip, google android — December 14, 2012

I often get asked advice about Google Android app development so I’ve decided to organise it in a coherent way rather than sharing insights one a time. This will take the shape of an ebook presenting a collection of 101 tips, organised by categories, such as UI, db, http connections etc

The ebook will be available as a PDF, sold directly from this blog. I may also make it available in a couple of other formats, Tweet me if you would like it in a different format.

Why do I feel “qualified” to give advice? Well, firstly, because many people have asked me. Secondly, because I have worked as a full time Android app developer on a variety of projects for the last 3 years, so I’ve read and written many lines of code, learnt a lot and wasted some time over mistakes I and others have made, so I would like to save you the time so you can focus on creating great apps. Most of all, I love Android as a platform and I want to see it grow!

Fill in this quick form to be notified when the ebook comes out

How to know when your Android MapView has stopped scrolling?

Filed under: google android, programming — June 8, 2012

When a user flings a Map on Android, the MapView carries on scrolling after the user has lifted the finger from the screen. Unfortunately, there is no method or event listener to know when the map has stopped scrolling but with a simple custom MapView, you can work it out.

(more…)

Minesweeper game for Android – with a twist!

Filed under: google android, programming — June 5, 2012

As many people with a Windows computer in the 90s, I have spent several hours of my life playing minesweeper. Over the years, I have come up with variations of how I would like to play the game but done nothing about it… until a few days ago.

Over the week-end, I prototyped and coded a variation, based around bubbles rather than squares, and released it as a free game for Android yesterday.

Screenshot from Bubble Minesweeper

The game works on Android 2.2+, and is designed for both phones and tablets. It can be played in both portrait and landscape mode, though, on a phone, you will get the most of it in portrait mode. The screenshot above is in landscape mode on a tablet (Sony Tablet S).

Download Bubble Minesweeper for Android for free.

Parsing XML in Android

Filed under: google android — Tags: , — March 17, 2011

With web services used everywhere, being able to parse XML is a necessary skill when developing Android apps. Here’s an example for you to modify for your own purposes.
(more…)

Power saving tips for Android and other smartphones

Filed under: google android — Tags: , , — March 16, 2011

Charging your smartphone every day is pretty much expect whether you have an iPhone or an Android phone, but how do you make sure your phone stays put for the whole day, particularly if it’s a long busy day away from home/the office?

Disable Wi-Fi: unless you know you want to use Wi-Fi, disable it. In Android, go to Settings –> Wireless & networks  –> Wi-Fi checkbox.

Airplane Mode: if you are travelling on a familiar journey and know you are going through zones of bad reception, or if you are in the basement of a building with no reception, or travelling on the underground for example, switch to airplane mode. For Android, press your power button for a few buttons until a menu pops up and choose Airplane Mode option.

Use Airplane Mode instead of Silent Mode: if you are in a meeting and don’t want to be disturbed but would still like your smartphone on to check the time or simply because the noise it makes when you switch it on and off is too awkward in front of the boss, switch to Airplane mode instead of silent mode.

Got any other easy power saving tips? Share in the comments :-)

Older Posts »