[android-developers] Re: For a published application if I upgrade minSdk requirement to higher level what will happen?

2010-08-23 Thread Warren
I have a similar situation and would like to know. I have posted a
similar question in this group and gotten the answer, "use reflection
instead."  That may be useful in many situations, and I always
appreciate suggestions, but it is not always feasible. It's good to
know so as not to leave existing users with a bad experience.



On Aug 22, 10:54 pm, scadaguru  wrote:
> Hi All,
> I have a published application now if I upgrade minSdk requirement to
> higher level what will happen?
> 1. Published application has minSdk set to 3 that is OS V1.5
> 2. Now if I increase it to 5 (OS v2.0) and republish (upload upgrade)
> people using older OS than 2.0 who already have installed my
> application I believe will not see in the market but still will be
> able to run from the phone. And once they uninstall it will be gone
> for ever. Is that right?
> 3. What is good practice? What should I do? Have another application
> published with higher OS version requirement or upgrade original. My
> application is free app so no money is involve. 4
> 4. If I publish new application while keeping old one with lower OS
> version in the market intact, how the people will know that they have
> update available who already have installed my applicaiton but has the
> phone with higher OS and could run my second application?
>
> Please advice.
> Thanks,
> JP

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: For a published application if I upgrade minSdk requirement to higher level what will happen?

2010-08-23 Thread mort
> Update your current app to do nothing more than show a dialog with a link to
> your new app in the market.

This would annoy users of old devices even more. Imagine you download
an update, and then it's just a dialog that tells you to download an
app you can't find in the Market.
However, you could query the system version in e.g. onCreate of the
main activity (android.os.Build.VERSION.SDK, do NOT use SDK_INT, it
doesn't exist in 1.5!), and if it's Android 2.0 (5) or higher, show an
AlertDialog that points to the new version. You might linkt to the
Market entry with one button, like
dialog.setButton(getString(R.string.market), new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
try {
Uri uri = Uri.parse("market://details?
id=your.package.name");
startActivity(new Intent(Intent.ACTION_VIEW, uri));
}
catch( Exception e ) {}
}
});


> On Mon, Aug 23, 2010 at 8:10 AM, Warren  wrote:
> > That may be useful in many situations, and I always appreciate suggestions,
> > but it is not always feasible.
> Why not?

Because the code can get pretty messy and bloated with lots of version
checks and reflection. It also forces you to do lots of things in code
that could otherwise be done in XML files, like using THEME_WALLPAPER.
Last not least there are some possibilities that can't be easily
worked around with reflection, especially added interface methods like
BaseExpandableListAdapter.getChild/ParentType(Count) that only work
since FroYo (while with older versions you have to bloat memory by
creating a new view for each element). I think there's also some
simlyfied button listener concept that was established after 1.5, but
I can't find it currently...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en