Update "MainPage.java" to support Android 'L'

Using something such as OS Version worked fine in the past but for something such as Android 'L' we should use SDK version or the app will not open on the phone since it will go to the else statement.  I was running into this problem and this is the solution that worked for me.