> 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 <warrenba...@gmail.com> 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