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

[import]uid: 8872 topic_id: 8986 reply_id: 308986[/import]

Thanks for the great info - and here I thought I was close to release! Now I’ve got more to do. :wink:

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.) [import]uid: 39515 topic_id: 8986 reply_id: 32787[/import]

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

Thanks :slight_smile: [import]uid: 8872 topic_id: 8986 reply_id: 32793[/import]

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

/Leif [import]uid: 10329 topic_id: 8986 reply_id: 32846[/import]

@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. [import]uid: 46116 topic_id: 8986 reply_id: 32851[/import]

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! [import]uid: 1606 topic_id: 8986 reply_id: 32855[/import]

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! [import]uid: 8872 topic_id: 8986 reply_id: 32938[/import]

@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 [import]uid: 39515 topic_id: 8986 reply_id: 33464[/import]

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?

[import]uid: 8872 topic_id: 8986 reply_id: 33468[/import]

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

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

was instead
<br><manifest android:versioncode="2" android:versionname="1.0" package="...&lt;br">

(notice the versionCode=“2” instead of “1”. I am using Daily Build 319, so I don’t think that’s the source of that difference.)

I just changed it to “1” and did all the other changes. Now that I know that works, I’ll experiment with leaving it as “2” to see if that also works.

Thanks! [import]uid: 39515 topic_id: 8986 reply_id: 33484[/import]

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. [import]uid: 8872 topic_id: 8986 reply_id: 33488[/import]

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

Well done! +1000 kudos to you sir!

[import]uid: 7901 topic_id: 8986 reply_id: 51708[/import]

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 :slight_smile: [import]uid: 8872 topic_id: 8986 reply_id: 53551[/import]

I cant use build 319. how can i build for armv6? [import]uid: 84344 topic_id: 8986 reply_id: 53821[/import]

Why can’t you use 319 exactly? [import]uid: 8872 topic_id: 8986 reply_id: 54482[/import]

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 [import]uid: 87384 topic_id: 8986 reply_id: 55659[/import]

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 [import]uid: 87384 topic_id: 8986 reply_id: 55667[/import]

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) [import]uid: 87384 topic_id: 8986 reply_id: 55668[/import]

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) [import]uid: 87384 topic_id: 8986 reply_id: 55669[/import]

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

Kam. [import]uid: 8872 topic_id: 8986 reply_id: 55736[/import]