0

I have a fully functional phone app and I am converting it to a dedicated tablet app. I was hoping to support 3.0 and upwards but when I set the minsdk to 11 (Android 3.0) all of my network code breaks, (everything. It's something to do with strict mode). If I set the minsdk to 9 or lower, all of the code works just fine on my Android 3.0 tablet.

The problem will arise when I go to put this on the market. I want to rule out all tablets pre 3.0, but this will not be possible it I set the minsdk to 9. Does anyone know of a fix for this? Is this a common problem?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
NotACleverMan
  • 12,107
  • 12
  • 47
  • 67
  • 1
    if you want to make it a dedicated tablet app you should set minsdk to 11 and fix your code ;) – MrJre Jul 28 '11 at 09:57
  • My code isn't broken. You mean rewrite my code :) and I would like to, but with the time constraint I am on I would prefer not to if it is an option – NotACleverMan Jul 28 '11 at 10:39

1 Answers1

2

Is there any problem in using same code base by setting minSDK = 9 and targetSDK as 11, in your code you can write version specific things wherever needed. Or i believe the other solution is only to have seperate packages, quite a few apps do this in market.

Naresh
  • 1,336
  • 9
  • 14
  • I have separate packages at the moment because I want the UI to be different. Setting the minSDK as 9 and the target as 11 works fine, but people using Android 2.3.1 are still able to see it on the market this way. – NotACleverMan Jul 28 '11 at 11:56
  • if there are two apps then you can set min sdk as 11 for other app rite? – Naresh Jul 28 '11 at 12:04
  • If I set the minsdk as 11 then all of my network code breaks. – NotACleverMan Jul 28 '11 at 12:06
  • any specific reason? compilation errors or it wont work? when you meant network code are you talking about HttpClient usage? – Naresh Jul 28 '11 at 12:31
  • "HTTPClient usage" - yes. I have a lot of it in my code and I'm not sure I have the time to rewrite, so I'm looking for a way to restrict pre 3.0 devices without setting the minsdk at 11. – NotACleverMan Jul 28 '11 at 12:40
  • Check this new feature from google http://developer.android.com/guide/market/publishing/multiple-apks.html, might be relevant to you – Naresh Jul 31 '11 at 19:23