Android libGDX game highscore implementation with tutorial

I have found a great tutorial to implement highscores with mySQL connection.
http://www.ikergarcia.com/en/juego-android-highscores

I have tried to use code, created my SQL database, but Java part is problematic. There aren’t included the necessary package imports. I couldn’t know, how to determine necessary imports and so code is useless. I don’t know where to give URL and what is the content of Constants or how to use it?

I wouldn’t like to use Google Play services yet, beacause I don’t have yet a verified account.

Unless I’m missing something, as I can’t read the language on that page, all classes should be in the standard Java API. You may have to google the class name and check what package it is in. If you are using an IDE, like Eclipse, it may offer functionality to automatically resolve missing imports.

Actually it seems you can click on the class names in the code blocks to be taken right to the documentation, very handy.

You can choose flag for english language.
Constants is fully missing.

The constants are for you to decide, but we can deduce what kind of data you want in them by looking through the code around it.

Constants.HASH_SALT for the purposes of this can essentially be anything, e.g. “MyPasswordSalt”. I don’t believe it is using salts correctly, and overall the code probably isn’t secure anyway, but it’s something. If you want to secure your application, you will have to research further in to it.

Constants.HIGHSCORES_DISPLAY and Constants.HIGHSCORES_ADD are the URL to your PHP pages. e.g. “www.java-gaming.org/displayScore.php” and "www.java-gaming.org/addScore.php?".

Constants.PARAM_LEVEL is the level you want to retrieve scores about from displayScore.php. You really don’t want this to be a constant, pass it in as a parameter to the code loading the highscores instead.

It may help you to look at another example too: http://wiki.unity3d.com/index.php?title=Server_Side_Highscores, also take a look at what RESTful is.