My tips on targeting HoneyComb and other stuff :)

Hey guys,

I started a guide on the things i've learnt making Walkabout. Some of this suff is a must read, even for you well seasoned developers.

I have just added a section on editing the AndroidManifest to support more devices and target honeycomb!

http://www.base2solutions.com/walkabout/Corona%20Tips.html

EDIT:
Justa a quick note.

With regards to modifying the manifest (section 7), you will need to update the file apktool.jar in the 'Other' directory to support the latest corona.

Even if you're using an older corona, i'd advise you to update the file anyway. It adds some new references for new API levels which you may end up using at some point.

http://www.mediafire.com/?f354aq5u71w5jp6

Thanks for the great info - and here I thought I was close to release! Now I've got more to do. ;)

I think you left out the link to your tips which I found at: http://www.base2solutions.com/walkabout/Corona%20Tips.html

Very interesting and helpful! (And I did download Walkabout and rated it highly.)

Ahh lol Thats what happens when I try to do 10 things at once :P

Thanks :)

Excellent collection of tips & tricks - much appreciated and very useful information!

/Leif

@kam187. Your article is a Godsend! I too have issues with needing to run on Armv6 and remain stable. I believe there are many others here in the forums that might benefit from this article, I will lead them to this thread.

This is crazy... I have that article up on another screen. I found it last night and was too tired to read it and kept it for coffee this morning. Now here is a thread telling me to read it.

I guess I have better read it!

Thanks guys. I'll be updating that guide every few days - when I get some time!

If there's any topics in particular you want discussed let me know!

@kam187, my apologies if I'm just being dense, but in section 7 (Android Manifest Customisation) of your tips, in the part where you talk about the apk_manager and a "1.apk" file, step 5) says

5) ONLY ONCE. Browse to c:\users\<yourusername>\apktool\frameworks\resource and replace the 1.apk with the one you downloaded above.

This path has not been referred to yet, nor has apktool, so I'm not clear on exactly what is needed.

Does this mean the Android SDK has to be installed on the windows machine, along with apktool? Or does it mean that Corona for Windows has to be installed? Or both?

You might be making assumptions about people's setups that aren't true. For instance, I've been doing my Corona dev on a Mac and just copied my .apk over to a Windows box to try your stuff. I don't have an Android dev environment set up on the Windows machine but could certainly do so.

So at this point I don't know what to do in step 5), although I did download and run apkmanager successfully and can see the decompiled app and manifest file.

There's a lot of great info in your post and I'd love to be able to make the tweaks to my manifest you talk about - just need to know what's required on the Windows machine to do it.

Thanks, and again my apologies if this is crystal clear to everyone else.
Matt

Hi mattlmattlmattl,

You don't need to install the android SDK or anything else...

Apk manager uses another tool called apktool. This is included in the zip that you download, and on its first execution stores a copy of the framework it uses in the path:

c:\users\[yourusername]\apktool\frameworks\resource

You should replace [yourusername] with your windows username. Just click my computer, then users, and then your username directory etc.

When you pressed option 9 to extract, apktool ran for the first time and extracted its framework in that directory.

The framework included in apktool does not contain honeycomb additions. Therefore you need to download the second meadiafire file I refer to and replace the one in that directory. You only need to do this once,

Are you saying that path doesn't exist after you extracted your apk?

Thanks for the rapid response! Exactly what I needed to know.

I'm actually on XP, so the path to the 1.apk file is c:\Documents and Settings\<username>\apktool\framework

Everything worked as you said and I now have a much smaller .apk that should run on more machines (works on my HTC Hero and Evo).

The only difference was that in my manifest file the line you reference as

1
<manifest android:versionCode="1" android:versionName="1.0" package="com.base2.walkaboutdemo" xmlns:android="http://schemas.android.com/apk/res/android">

The version code is the 'version number' you put in Corona.

The version number HAS to be a integer. So 1,2,3,4 etc. 1.0 is invalid.

The version name is the number you want the user to see. So for example:

Walkabout Version 1.0 would have a version number 1 and version name 1.0
Walkabout Version 1.1 could have a version number 2 and version name 1.1

But its more sensible to just drop the decimal points and use:

Walkabout Version 1.1 could have a version number 11 and version name 1.1

The version number HAS to increase every time you upload a new build to the maret. Its actual number doesn't matter, but it makes sense to keep it inline with your version name.

Just re-read the tips again - there are some *REALLY* top class tips on that page!

Well done! +1000 kudos to you sir!

Justa a quick note.

With regards to modifying the manifest (section 7), you will need to update the file apktool.jar in the 'Other' directory to support the latest corona.

Even if you're using an older corona, i'd advise you to update the file anyway. It adds some new references for new API levels which you may end up using at some point.

http://www.mediafire.com/?f354aq5u71w5jp6

Oh and btw. Thanks for the thanks :)

I cant use build 319. how can i build for armv6?

Why can't you use 319 exactly?

Sir I have the apk tool but it is not working properly and u have any proper step by step tutorial regaring that then provide me . I am also suffering for version issue

Sir I have the apk tool but it is not working properly and u have any proper step by step tutorial regaring that then provide me . I am also suffering for version issue

on Using the apk manager according to the link

I got this error

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f030003 layout/of_native_loader, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readType(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readTable(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(Unknown Source)
at brut.androlib.res.AndrolibResources.loadMainPkg(Unknown Source)
at brut.androlib.res.AndrolibResources.getResTable(Unknown Source)
at brut.androlib.Androlib.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)

on Using the apk manager according to the link

I got this error

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f030003 layout/of_native_loader, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readType(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readTable(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(Unknown Source)
at brut.androlib.res.AndrolibResources.loadMainPkg(Unknown Source)
at brut.androlib.res.AndrolibResources.getResTable(Unknown Source)
at brut.androlib.Androlib.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)

I just edited the first post. Please update that file in the 'Other' directory!

Kam.

It's been several months now, does the current build have official / built-in support for targeting Honeycomb? Perhaps Ansca is waiting on ICS?

I haven't purchased Corona for any platform yet (and I have no iOS devices) so I can't tell where the most current paid release offers Android 3.x official support yet. It would appear not though.

Anyway, if we still have to go through the process(es) described in this thread (and linked elsewhere) that's at least better than nothing. Thanks!

views:2188 update:2011/10/7 17:24:19
corona forums © 2003-2011