Re: [android-developers] Get an app's api level programmatically

2012-04-05 Thread Kamal Kambe
I need to retrieve minSdkVersion from AndroidManifest.xml programmatically. I need to enable a flag based on its value. Is there no way to do it? On Saturday, March 24, 2012 2:50:22 AM UTC+5:30, Chris Stratton wrote: On Friday, March 23, 2012 2:50:13 PM UTC-4, Kostya Vasilyev wrote: Perhaps

Re: [android-developers] Get an app's api level programmatically

2012-04-05 Thread Justin Anderson
I need to retrieve minSdkVersion from AndroidManifest.xml programmatically. I need to enable a flag based on its value. Is there no way to do it? You already asked this in your own thread, which I have responded to. Thanks, Justin Anderson MagouyaWare Developer

Re: [android-developers] Get an app's api level programmatically

2012-03-29 Thread Alger Lin
I release a tool to dumping all classes (includes disclosed and undocumented) at Android device, maybe this tool can help you to check if undocumented API was available at target Android version. You can get my tool by URL below.

Re: [android-developers] Get an app's api level programmatically

2012-03-23 Thread Chris Stratton
On Thursday, March 22, 2012 10:55:00 PM UTC-4, exiquio wrote: My intent is to write and app that pulls the targetSdkVersion from all of a user's installed apps in order to present them with a clear picture of what should and should not run on their device in the event that they update to a

Re: [android-developers] Get an app's api level programmatically

2012-03-23 Thread Chris Stratton
Oh, sorry, didn't see that the specific information you need is part of what is available from stable APIs. On Friday, March 23, 2012 2:26:44 PM UTC-4, Chris Stratton wrote: On Thursday, March 22, 2012 10:55:00 PM UTC-4, exiquio wrote: My intent is to write and app that pulls the

Re: [android-developers] Get an app's api level programmatically

2012-03-23 Thread Kostya Vasilyev
But what does the targetSdk have to do with the stated goal? present them with a clear picture of what should and should not run on their device in the event that they update to a newer build of Android An app with targetSdk set to 4 should run on API 15, Android 4.0.3, and hopefully

Re: [android-developers] Get an app's api level programmatically

2012-03-23 Thread exiquio
I should have taken a lot more time to both think about the problem and to explain it. My apologies. An app with targetSdk set to 4 should run on API 15, Android 4.0.3, and hopefully beyond (or may not, although this should be very rare). An app with targetSdk set to 15 most likely will run

Re: [android-developers] Get an app's api level programmatically

2012-03-23 Thread Dianne Hackborn
The platform never looks at maxSdkVersion. The entire concept of maxSdkVersion is broken as shown by what you are trying to do -- having your apps suddenly not work when you get a platform update just because they have declared a maxSdkVersion in their manifest is a horrible user experience.

Re: [android-developers] Get an app's api level programmatically

2012-03-23 Thread exiquio
Fair enough. Looks like my little plan is dead in the water unless I try something as daunting as what Kostya suggested. -1 on my ego +1 on my learning This has been educational in more ways than one. Thanks. On Friday, March 23, 2012 2:31:56 PM UTC-6, Dianne Hackborn wrote: The platform

Re: [android-developers] Get an app's api level programmatically

2012-03-23 Thread Chris Stratton
On Friday, March 23, 2012 2:50:13 PM UTC-4, Kostya Vasilyev wrote: Perhaps a better test would be to check for undocumented APIs that are known to have disappeared in a particular Andorid version, but just collecting the data for this type of checking is going to be a large task.

[android-developers] Get an app's api level programmatically

2012-03-22 Thread exiquio
I see that almost everything from an apps AndroidManifest.xml file get be retrieved programmatically. What I do see is how to pull the apps min and max API levels for the SDK as in: uses-sdk android:targetSdkVersion=15 / uses-sdk android:minSdkVersion=7 / Is it possible and can anyone

Re: [android-developers] Get an app's api level programmatically

2012-03-22 Thread Dianne Hackborn
You can only easily get targetSdkVersion, from here: http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#targetSdkVersion There generally isn't a reason to what minSdkVersion. (Or really targetSdkVersion unless you are writing compatibility code within the platform.)

Re: [android-developers] Get an app's api level programmatically

2012-03-22 Thread exiquio
I am not looking for the min sdk. I should have made that clear. My intent is to write and app that pulls the targetSdkVersion from all of a user's installed apps in order to present them with a clear picture of what should and should not run on their device in the event that they update to a