Wednesday, 29 February 2012

These messes I'm in and out of.

It's been a while since my last post so I thought it was about time to do a quick roundup of the current (shambolic, but fortunately improving) state of development in my apps.


Stalin Phone... Where it all started.

I started working on a video recording version of Stalin Phone some time ago and got caught in a bit of a snag. It seems that video recording is not possible without a VideoView object from the layout (failed attempts included declaring a new video view in code). This puts me in a bit of a pickle as Stalin Phone runs in the background with no UI. I have come up with a couple of possible solutions to this since I last worked on it. One possibility is to use a custom toast notification with an embedded video view, possibly this might fall when the toast is dismissed but I could probably set it's timeout high enough to outlast your average call. Secondly (and preferably) I could try replacing the current notification with a custom status bar notification... the snag here being that I am not yet sure how much raw access to the custom layout I will have (i.e. Can I directly grab the video view or do I only get access to a handler).

This leads into another couple of side projects I started to explore the world of status bar notifications.

Photo-A-Day... Simple notifications.
This is probably the most likely project to finish first as I haven't so much hit a snag as I have got distracted.

I now have the framework for the app set up, just need to add shared preferences storage (started), resume on power up and a little bit of cut and polish :p



Motivational Puzzles demonic offspring: Pseudomonarchia Daemonum...
 I've also refocused motivational puzzle into a demonic motivational piece based off the demonic book of names... Maybe an angelic counterpart should be on the books for the future.


The experimental Puzzle Cam has also halted in its tracks for the time being as the rom I'm running (BCM) has flakey camera support at the moment. Last time I was working on it I was close to cracking the camera preview frame (fuzzy green images in triplicate), but not quite yet and I'm not sure when I'll pick this one up again. Low priority.


Finally we come to my two babies: Target Live Wallpaper and Mou5e Live Wallpaper.
Not much happening on the mouse lwp, but target lwp is almost exploding with new features. Well at least two anyway. I made some progress with the fireworks module, fireworks now explode better and fall back towards earth after explosion.
I'm most excited about the last feature (mainly because I just nailed it about an hour ago): importing custom models... For now it's importing a hard coded sample, but once I integrate xml parsing it should be a sinch to import any model from Google sketchpadsketchup to use as the 3d model. Woot!

Also just added "orbitals" checkout the video below to see the demo :D




Monday, 9 January 2012

My experience with the Amazon app store.


I've been meaning to post about my experience releasing an application to the Amazon app store for some time now and finally here it is:

To give you all some context of where I'm coming from, I'm currently employed as a tester, but want to move into development. I've been working on Android for about 2 years and java for about 7. I've only released apps on the Android market for free until now so that is the only point I can not compare, and I am only asking for money on Amazon to try and cover the developer fee. I'm not really in this for the money so that its another thing to consider while reading my advice. Anyone who wants the app for fee could download the source, compile it and run it for fee (or download it from the Android market for fee)...and to be honest, IMHO if you can do that you know the secret handshake, you're in the club, help yourself.

So this all starts a long time ago, well a couple of months anyway. I noticed Amazon were giving away one year free developer accounts (normally just shy of $100), so I figured it was worth a shot... If I could make my hundred bucks back in 12 months I'd renew the account. Well I'm falling far short of my target at the moment but there is still plenty of time left and it has been a worthwhile endeavor in any case.

I had a few apps on the Android market, picked one called "Mou5e Live Wallpaper" and created promotional artwork for the Amazon store and submitted the app as-is. I was not sure if this would fly with Amazon for a couple of reasons, firstly the app I would be charging Amazon customers for would be given away free on the Android Market (and on google code), but that's what you get for charging that much a year for a developer account. Secondly I used AdMob adds in my app and I know Amazon have their own advertising program, maybe they would make me switch networks for approval.

That was on the 25th of November and having been accustomed to the Android way of doing things I sat at the developer console for the rest of the evening, occasionally clicking refresh waiting (in vain) for the status to change. It was a couple of weeks until I received an email from Amazon.

On the 6th of December at about 5:30am i received an email saying that my app had failed a test case. The test in question being that my app requested permissions which it didn't require. I found an online form somewhere which I used to explain that the permission uses internet (admittedly a dangerous permission for a background process to have) is only used to serve adds in the configuration screen, detailed the steps to see the add and mentioned that the source was available for confirmation of this.

I received confirmation of my response and then by 11:30 received a second notification of a failed test: My applications name MUST be in English. It seems that any sort of leet speak in app names is not allowed. I was a bit disappointed that I might have to change the manifest and recompile, but after re-reading the email a couple of times it only seemed to be the application name in the actual Appstore that required changing. I changed the name in the store and left my .apk as it was.

This turned out to be a good call as the next day on the 7th of December I got another email to say that the app had passed functional testing and was now in "content review". Almost a week later on the 13th of December at 10 am my app was approved for general release on the Amazon app store for $0.20.
 
Now comes some of the good stuff, along with my original description Amazon had added to the description a bit (in general clarifying things or talking the app up more than I was willing to do) and also explained quite clearly what permissions were used and why. This was a nice finishing touch and i have been meaning to copy over this new stuff back into the Android market. I have seen others in the market giving detailed accounts of the permissions used in their apps and as a user I find it reassuring (although far from a guarantee) and i wonder why I didn't do it before.

Finally the most interesting bit... at least for me: To this day I have only sold one copy, a single unit. But that was enough in the category I had selected (novelty apps) to rocket my app up the charts to #61 (over the last month it has now fallen to #100, but it's still there). I'm from Australia and so am not able to buy my own app (ridiculous huh?) but for all you US devs out there it'd only take a few sales in the right category to get yourself a guaranteed spot in a top 100 list (maybe there is an even less popular category where you could nab a top 50 or 20 with only a few sales). If I can do it from half a world away and a crack team of just one code monkey, I think anyone can do it. So what are you waiting for: Pick up a developer account while they're still free and take advantage of a free professional review for your apps, a free rewrite of your apps blurb by a professional and try to score yourself a top 100 while you're at it.

Tuesday, 6 December 2011

A little bit of Ice cream.

Over the last weekend i updated StalinSMS with a few bug fixes but i am still cynical that it works 100%.

The real big news is that I'm now  running Android 4.0.

It all started innocently enough on Saturday when i wrote the words UsbManager, with that simple  act i had written code that could noe execute on 2.3.3 and the ball was rolling.

It only too a couple of attempts to get what the xda community put together onto my phone. There are definantly  some rough edges like the non-functional camera and no extsd apps, but such is life on the bleeding  edge :D

So far the crowning glory has to be the integrated bluetooth keyboard/mouse drivers... I'm writing this from a couple of meters away, i can barely make out the text, but thanks to my DeNovo typing is not a problem & i can use the built in mouse pointer to correct any mistakes. So far the volume buttons work, but not sure about the multimedia keys, esc equates to the back button but i have yet to find the menu, search or home buttons. Just noticed the power button works fine too.

Thursday, 17 November 2011

New application... StalinPhone!

Ok, just posted this to the market last night... StalinPhone: StalinPhone will record audio, image, location & network information during every phone call made or received.

Check out the video.

Download the app.

and for the courageous: Download the source code.

Wednesday, 2 November 2011

Xda-tv "the developer challenge"... The weekend that stops the nation.

Instead of risking it all on the backs of nags, I thought I'd have a flutter at the Xda-tv developer challenge this weekend.

All was going well until I realized that two fundamental capabilities are not provided by Android: sending pre-recorded audio to the recognizer service is not allowed and recording voice up link or down link is also not allowed.

The first issue can be overcome with a minor physical hack: place phone in a small quiet place with lots of echo, i.e. a small box. With the intent of emailing the user when transcription is complete.

The second issue on the other hand is a bit of a tanker (in the racing sense, not the wow tanking). It seems both the hardware and the software are pulling back on the reigns so to speak, the hardware might not be connected and the software does not alow up link out down link recording.

I'm going to give it a shot on my old Dream running cm7, if it won't work on that then it seems impossible. Now I see how this competition is going to take a month :o

Friday, 30 September 2011

Missing post...

All the links to the first guide in my last post seem to be broken... I include here for reference and will hopefully update and convert to a linux specific guide. I also remember having to bump up the validity time too.



Amministratore L'avatar di ciso
[How To] Publish the app created with App Inventor in the Android Market

    Publish the app created with App Inventor in the Android Market

    We succeded and the guide should be final.

    What I'm about to describe is created to overcome the impossibility of publishing apps created with App Inventor in the Android Market

    What you need:

        1.6 Java Development Kit and Runtime Environment 1.6 already installed on your PC
        Android SDK already installed and running
        Appinventor Extras
        APKTool
        Auto-Sign 6.5
        .... A lot of Patience

    1) Creating the key

    This procedure is a one-off and we don't need to do those steps every time.

    So, thanks to the JAVA SDK we will create a private key, which will be used for publishing our applications

    From the Bin folder of the Java SDK we'll execute in a terminal:

codice:
keytool.exe -genkey -v -keystore my-release-key.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 10000

The Market requires that applications need to publish the private key has a duration subsequent to October 22, 2033, so we'll use a validity of 10000 days (over 27 years!).

2) Customize the Icon of the application

Download the APK file on a local folder on your computer.

We'll use AutoSigner for those steps: (thanks to Marcor Online info@marcoronline.tk for this part).
Open the apk file with 7zip.
Delete META-INF folder (which is the folder where the application contains the certificates, no longer valid after the change).
The images are generally stored in the folder res\drawable, and in particular the icon of the program is called ya.png. Extract all the images you want with your favorite software (we use 7zip).
Be careful not to change the size in pixels and not to change the name and extension.
Once you have completed the changes you go to put the files again into the apk (using 7zip) by simply dragging and overwriting the original.
Close 7zip and rename your program Launcher.apk.
Extract the contents of the Auto-Sign v0.65.exe and copy the Launcher.apk file inside the folder Auto-Sign\update\app.
Run the tool by the Auto-Sign v0.65.exe executable and iselect from the drop down menù Launcher.apk. (The name should been green. If not, you've made something wrong.)
Now click on Autosign and in a few seconds you'll get a confirmation message.
Inside the folder Auto-Sign\update\app will be a Launcher_signed.apk. You can delete the old file and keep only the signed one.

3) Edit the APK to be compatible with the Market

Decompile our apk

codice:
apktool -s pre-nomeapk.apk

in the just created folder called pre-nomeapk, go editing the AndroidManifest.xml file.

First we add the version of the application by adding the keyword "android: versionCode" and "android: versionName" in the keyword "package", just like this example:

codice:
<? xml version = "1.0" encoding = "UTF-8"?>
<manifest xmlns: android = "http://schemas.android.com/apk/res/android"
package = "appinventor.xyz.xyz"
android:versionCode = "1"
android:versionName = "1.0">

Specify the minimum version of Android is needed to run the application. Beware that the Market has a bug at the moment, and does not support applications compiled for Froyo android 2.2. Consider the following table:

codice:
API Level -> Android Platform Version
1 -> 1.0
2 -> 1.1
3 -> 1.5
4 -> 1.6
5 -> 2.0
6 -> 2.0.1
7 -> 2.1
8 -> 2.2

If your application needs Eclair we enter the following keyword:
codice:
<uses-sdk android:minSdkVersion="7" />

Finally fix the last things needed to make compatible the apk to the Market

Remove the android:icon keyworld on this line:

codice:
<activity android:label="123" android:icon="@drawable/ya" android:name=".Screen1">

and add it in this line:

codice:
<application android:label="XXXXX" android:debuggable="true">

Also on the line relative to the "application", remove the key "android_: debuggable"

In the end the AndroidManifest.xml will result like this:

codice:
<? xml version = "1.0" encoding = "UTF-8"?>
<manifest xmlns: android = "http://schemas.android.com/apk/res/android"
package = "appinventor.xyz.xyz"
android:versionCode = "1"
android:versionName = "1.0">
<uses-sdk android:minSdkVersion="3" />
......
<application android:label="XXXX" android:icon="@drawable/ya">
<activity android:label="123" android:name=".Screen1">
....
</activity>
</application>
</manifest>

Now compile the apk again:
codice:

apktool b pre-nomeapk

With 7zip open the apk and remove the file in the META-INF folder like:

codice:
ANDROIDK.SF
ANDROIDK.RSA





Getting App inventor programs prepared for the market - 100% on ubuntu - The essential resources.

 Ok so here are the four pages that made it all possible ... one or two may be superfluous as it took me ages to realize that app inventor also has an installable package required for ubuntu (maybe if i wrote this the first time I wouldn't have forgotten :\).

First for preliminary reading go through this post (which seems to be broken at the moment), and just try to follow these four simple rules of thumb:
1. Try to imagine that he never says "windows".
2. Try to imagine all the ".bat" and ".exe" extensions are missing.
3. Don't assume you have all the tools (see apktool below for example)
4. Assume that the commands will need tweaking (hence the 'tips' and 'tweaks' link)

Also check out this one, there are some sensible tips and tweaks in there.

Get the apktool here.

Perform manual signing using this technique.