At the end of November, a piss rumbled into my head and I wrote a rather stupid and awkward post about one of my applications, located
here . Then the post was mined, which in principle is logical, given the quality it was.
However, the fact that the post was bad, the application itself did not become worse. Though for some time it was put on the back burner. Last night, I somehow caught a glimpse of the blog of the guys from
Cutehacks , a company that develops Qt applications and tries to make money on it. So, looking through the blog, I came across a
post , at the end of which was a presentation called “Targeting Android with Qt”.
In this presentation, in addition to some abstract thoughts, the developers explained in detail what steps need to be taken in order to port their application to a new platform, and then upload it to the Android Market. Here I want to briefly list these stages, and anyone who wishes can get all the additional information from the original
presentation on Slide Share.
')

So what we need to do:
- Write an application on Qt
- Using the Necessitas Qt SDK to build and test it for the Android platform
- Make some edits to AndroidManifest.xml and rebuild the application
- Sign your application with an RSA key
- Sign up for Android Market
- Publish your application
- We are testing the download from the market
It is worth mentioning that for yesterday evening, I had completed only the first 2 points. On the first point I don’t see anything meaningful to write, the second point leads to one of the Habr articles devoted to the subject matter.
Let's start with the third. In the AndroidManifest.xml file of our project, it will be necessary to fix 2 lines:
---a/android/AndroidManifest.xml +++b/android/AndroidManifest.xml @@-1,5+1,5@@ <?xmlversion='1.0'encoding='utf-8'?> -<manifestpackage="eu.licentia.necessitas... +<manifestpackage="com.kafeg.Anagram"...
and
---a/android/AndroidManifest.xml +++b/android/AndroidManifest.xml @@-14,4+14,5@@ <supports-screensandroid:largeScreens="t... <uses-permissionandroid:name="android.pe... <uses-permissionandroid:name="android.pe... +<uses-sdkandroid:minSdkVersion="7"/> </manifest>
Also, it is worth remembering that the options for using Ministro should be left by default, that is, tell the application to download dependencies from the market. After that, we rebuild our application and copy the resulting <app-name> -debug.apk to a directory called <app-name> -1.0.apk. And go to the 4th stage.
Here we will need to execute two commands in the console that perform some magic actions on the received package:
$ keytool -genkey -v -keystore kafeg-release-key.keystore -alias kafegkeystore -keyalg RSA -keysize 2048 -validity 10000 ... bla bla bla ... $ jarsigner -verbose -keystore kafeg-release-key.keystore ./<app-name>-1.0.apk kafegkeystore
The first team creates a vault and a key, it also asks for a lot of personal stuff, including the password for the vault itself.
The second team actually signs the application itself. That's all, with the signature done, now our application is signed, edited and ready to be loaded into the market. What's next?
And then the most interesting stages. First we need to register in the market. For this we need about $ 25 dollars and a credit card. We follow the link
market.android.com/publish and follow the instructions, everything is clear there (but for whom it is not clear, you are welcome to look at the presentation above the link).
The only and most important thing that I want to mention at this stage is that you do not need to specifically order a separate credit card, you can pay the deposit with a simple debit (salary) card. For example, I have this KazaCom Visa Electron .
After payment, the debited amount will hang in the blocked amount for some time. For example, I have it hanging in blocked until now, although Google Checkout says that the seller has already successfully written off the entire amount. Actually everything, now we can publish free applications. To publish paid, you need to register as a seller, it was not in my plans. Go ahead ...
The interface for publishing a new free application will appear immediately, but it will work approximately 6-10 hours after payment. Before the expiration of this period, when you try to download a new screenshot or icon, you will receive a message like “Unable to process the response in JSON format, turn off the parser, if you have a blablabla”. When some time passes, the interface will work and calmly eats everything you feed it. The only problem I encountered later was that my application, although published, was also available via a direct link, but nevertheless it did not appear in the search results for a while (about half an hour) ... it was a bit straining.
Well, finally testing. To do this, I took my smart, deleted the test application from it, turned off debugging in the settings, deleted Ministro along with all the downloaded applications, went to the market on the page of my application and clicked the “Install” button. After the installation, I launched the application, it required to resume the Ministro and the library, it crashed Ok a couple of times and after 2 minutes it was already playing.
But in general, that's all. Yesterday, after registering in the market in 15 minutes, I was a little perplexed while reading the post
Long to the Android Market , as described there (except for getting the dough) I performed in the evening without any preliminary preparation.
Of course, I would like to get some feedback, error messages and crashes, comments, additions and the like for this application, as it is one of the first Qt applications hosted in the market. Thank.
Direct link, to view in a browser:
market.android.com/details?id=com.kafeg.AnagramQR code for downloading from the device:
Search results pageI believe that the goal has been achieved, proof of performance is obvious, and it is already quite possible to start porting many ready-made Qt applications to the new platform.