Search This Blog

Showing posts with label publish. Show all posts
Showing posts with label publish. Show all posts

13 December 2011

LVL Testing

 In the beginning, my phone was setup with a Google Apps account (to cut down on the general spam).  When using the Market, it was billing my gmail account for the purchases.

A few months back, the Android Market updated itself from a tabbed list of applications to a Windows-8 combination of application links and general advertisements.  During that change, they enabled the ability to use multiple accounts with the Google Market.  Initially, I was very excited by this prospect.

Unfortunately, while applications were still being purchased with the gmail account - they were now divided into two accounts.  The old ones tied to the App account (which was not allowed to purchase anything anymore due to Google Checkout not being available to the Google Apps users) and the new ones tied to the Gmail account itself.  Why all apps weren't tied to the account that actually paid for them, I have no idea.  I contacted Google about this issue and they suggested that I contact all 184 old application developers and ask them politely to change the email address associated with my purchase.  As an app developer that has no idea how to do this myself, I wasn't about to do that.

Enough back story... onto the issue at hand... the Android Market Licensing...

If you have ever published "Copy Protected" apps in Android, you know that Google started suggesting (with bright red warnings) that you switch to the new LVL approach as the old one was going to go away.  Ok, that makes sense.  I look through the docs (which are a little overwhelming considering what is actually happening) and decided that the best thing I could do is try the sample LVL application first - then worry about securing it after I had it working.

Grabbing the LVL library and sample code from the SDK, I build it and test it.  Results were not very good.  Here are some things I ran into:
  • Sometimes it said it was not compatible with my Atrix... then randomly decided to start saying it was compatible.
  • When publishing an updated version, both the device and the emulator reported (for about 10 minutes) that licensing was not managed by the market.
  • When on a device tied to multiple accounts, it only counted as licensed if the primary account (first one used on the phone) is the one that bought the application.
  • If you want to delete the primary account so you can change the order, you have to factory reset the device.
  • Oh, and of course, it can't be used on Free applications - which leads to lots of Market entries for demos and keys and trials.
So what to do?  Google says we have to quit using the copy protection scheme. Using LVL will break hundreds if not thousands of my users.  Doesn't sound like there are many options, does it?

11 December 2011

Publishing for GoogleTV

Yesterday I received the 3.1 update to my Logitech Revue box.  Definitely better than it was, if for no other reason than the Market is finally there.  So what's a developer to do besides install their own apps?

Unfortunately, FetLife wasn't available in the Market.  Luckily, I had already expected that.  I head over to the migrating page and try to figure out what all I need to change.

Turns out, the only thing I had to do for it to show up in the Market (for GoogleTV) was add this one line to my manifest.

   
    <uses-feature android:name="android.hardware.touchscreen" android:required="false">*lt;/uses-feature>


This effectively makes the market quit filtering it out.  After republishing, I go back to my GoogleTV and check the Market.  Yep, there it is. (Note: the Market DOES allow multiple user accounts, so if you are using an account other than the one you purchased the app with; you have to add that account as well, or repurchase).

Now, at first, while it showed up, it said it was incompatible.  I looked around online for a bit, then found this excellent resource on how to use ADB with my GoogleTV.  You can walk through the article, but the jist of it is:

  1. Tell GoogleTV that your dev box is going to be the debugging IP
  2. adb connect googletv-ip-address
  3. adb devices/logcat/etc
So, I fire up logcat, relaunch the Market and... oh, it will let me install it now.  It appears that it just takes a little while (15 minutes?) before the Market has analyzed it?

Anyways, app published and installed on the big screen.  Now to disable things like camera and vibrate and....

23 February 2011

One of my apps has hit 1000 users!

Just thought I would share the great news that my FetLife for Android app (recently acquired by Golden Spiral Software) has hit 1000 users!

10 July 2010

Publishing to the Android Market

I wanted to give publishing a shot, so I made a small tool to browse prime numbers and then started down the publishing notes...

After you finish cleaning up your code (remove debugging logging, etc) and make sure it still works....

Add versioning to your AndroidManifest.xml.  I'm hoping that eventually this piece can be replaced with something that reads the pom.xml... but, in the meantime attach these to the top level manifest:
android:versionCode="1"
android:versionName="1.0"

Then let's add a uses-sdk element:
   
    <uses-sdk android:minSdkVersion="7"
          android:targetSdkVersion="8"/>
Update your pom.xml:
           
               
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>maven-android-plugin</artifactId>
                <version>2.5.0</version>
                <configuration>
                    <androidManifestFile>${project.basedir}/src/AndroidManifest.xml</androidManifestFile>
                    <assetsDirectory>${project.basedir}/src/main/assets</assetsDirectory>
                    <resourceDirectory>${project.basedir}/src/main/android/res</resourceDirectory>
                    <!--<resourceOverlayDirectory>${project.basedir}/src/main/android/overlay</resourceOverlayDirectory>-->
                    <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
                    <sdk><platform>7</platform></sdk>
                    <deleteConflictingFiles>true</deleteConflictingFiles>
                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
                    <sign>
                        <debug>false</debug>
                    </sign>
                </configuration>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>android-undeploy</id>
                        <phase>pre-clean</phase>
                        <goals><goal>undeploy</goal></goals>
                    </execution>
                    <execution>
                        <id>alignApk</id>
                        <phase>install</phase>
                        <goals>
                            <goal>zipalign</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>android-deploy</id>
                        <phase>install</phase>
                        <goals><goal>deploy</goal></goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jarsigner-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>signing</id>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <phase>package</phase>
                        <inherited>true</inherited>
                        <configuration>
                            <archiveDirectory></archiveDirectory>
                            <includes>
                                <include>target/*.apk</include>
                            </includes>
                            <keystore>android.keystore</keystore>
                            <storepass>{{YOUR_PASSWORD}}</storepass>
                            <keypass>{{YOUR_PASSWORD}}</keypass>
                            <alias>android</alias>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Now when you redeploy (mvn clean install) it will also create a target\YOURAPP-1.0-SNAPSHOT-aligned.apk...  That will be the one we upload to Google.

Make sure you are registered with the Android Market.

Click on the "Upload Application".



Fill in the form...  Here are a few notes/gotchas:

1. If your app's icon is not a 48x48 PNG, it will give you these error messages:
The icon for your application is not valid. Please use a 48x48 PNG.
Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml.
Market requires versionName to be set in AndroidManifest.xml.
Market requires the minSdkVersion to be set to a positive 32-bit integer in AndroidManifest.xml.
Fixing the icon resolves all of these.

2. You can't just browse and hit publish.  You have to hit "Upload" on each item.  The APK has to be uploaded before you can upload pictures.  Make sure to choose the -aligned.apk one.

3. Screenshots vs Promo graphics... Screenshots are the ones that show up on the app description page.  Promos are the tiny ones that scroll across the top (ie: Featured Apps).  Note the commentary in the side.  If you take a picture from the emulator, strip off the skin and resize it as suggested.

4. You can NOT have just 1 screenshot.  You can have 0.  You can have 2. You can not have 1.  Weird, I know.


If you still have your app installed on your phone for testing, uninstall it now.

And for a little fluff....
Go to the QR-Code Generator and specify a market url using the package name (not class name) of your app.  For example, for the Prime Browser, I used 'market://details?id=org.eoti.android.primebrowser'.  Choose whatever size you want (I did small on mine) and generate a QR Code... as such:

Once you have the QR code, you can put it on your blog (as I did on the left side of this page) or email it, or whatever you like.

The real key is that now you can pull out your phone, scan it with your Barcode Scanner and whala - you can see your app in the market place.

Go ahead and install it.  Enjoy =)